move logic for 'btn-link' class on sidebar elements out of JS and into template