mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Add styling to active integrations filter (#15164)
Co-authored-by: Richard Leurs <7275740+EarthlingRich@users.noreply.github.com>
This commit is contained in:
parent
1e3337d168
commit
887faf6b9d
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user