Add styling to active integrations filter (#15164)

Co-authored-by: Richard Leurs <7275740+EarthlingRich@users.noreply.github.com>
This commit is contained in:
Richard Leurs 2020-10-12 17:06:47 +02:00 committed by GitHub
parent 1e3337d168
commit 887faf6b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -46,6 +46,10 @@
@media only screen and (min-width: $desk-start) {
#components-page {
.filter-button-group {
.active {
font-weight: bold;
}
.featured {
margin: 12px 0;
}

View File

@ -206,6 +206,13 @@ allComponents.pop(); // remove placeholder element at the end
rendered = Mustache.render(template, data);
// set active class on active menu item
jQuery('.filter-button-group a.active').removeClass('active');
jQuery(`.filter-button-group a[href*="${hash}"]`).addClass('active');
if (hash === "") {
jQuery('.filter-button-group a[href*="#featured"]').addClass('active');
}
// remove previous elements and css classes, add the new stuff and then trigger the fade-in css animation
$('#componentContainer').html('').removeClass('show-items remove-items').html(rendered).addClass('show-items');
logoLazyLoad.update();