Add an Active State for Expand (...) in the Top Section Navigation

This commit is contained in:
Mark Drake
2020-02-11 15:10:28 -05:00
committed by GitHub
parent 53ca5eec88
commit 3296021907
3 changed files with 20 additions and 2 deletions

View File

@@ -133,6 +133,17 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
}
};
scope.currentSectionInOverflow = function () {
if (scope.overflowingSections === 0) {
return false;
}
var currentSection = scope.sections.filter(s => s.alias === scope.currentSection);
return (scope.sections.indexOf(currentSection[0]) >= scope.maxSections);
};
loadSections();
}

View File

@@ -55,7 +55,7 @@ ul.sections {
transition: opacity .1s linear, box-shadow .1s;
}
&.current a {
&.current > a {
color: @ui-active;
&::after {
@@ -76,6 +76,13 @@ ul.sections {
transition: opacity .1s linear;
}
&.current {
i {
opacity: 1;
background: @ui-active;
}
}
&:hover i {
opacity: 1;
}

View File

@@ -11,7 +11,7 @@
</a>
</li>
<li data-element="section-expand" class="expand" ng-class="{ 'open': showTray === true }" ng-show="needTray">
<li data-element="section-expand" class="expand" ng-class="{ 'open': showTray === true, current: currentSectionInOverflow() }" ng-show="needTray">
<a href="#" ng-click="trayClick()" prevent-default>
<span class="section__name"><i></i><i></i><i></i></span>
</a>