File tree Expand file tree Collapse file tree 4 files changed +18
-5
lines changed
Expand file tree Collapse file tree 4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 4242 flex-wrap : wrap;
4343 align-items : center;
4444 justify-content : space-between;
45+ }
46+
47+ .navbar-new-top {
4548 padding : 0.5rem 0 ;
4649}
4750
8386
8487.navbar-new-bottom .nav-item {
8588 margin : 0 var (--base-space );
89+ padding : 0.5rem ;
8690}
8791
8892.navbar-nav .nav-link {
213217 left : -0.75em ;
214218}
215219
220+ .nav-item-selected {
221+ background-color : var (--color-brand-red );
222+ }
223+
216224@media screen and (min-width : 1024px ) {
217225 .navbar-start > a .navbar-item : hover ,
218226 .navbar-start > .navbar-item : hover > .navbar-link {
267275}
268276
269277@media screen and (max-width : 992px ) {
270- .navbar {
278+ .navbar-new-top {
271279 padding : 0.8rem 0 ;
272280 }
273281
Original file line number Diff line number Diff line change 11'use strict'
22
3- module . exports = ( haystack , needle ) => ~ ( haystack || '' ) . indexOf ( needle )
3+ module . exports = ( haystack , needle ) => {
4+ return ~ ( haystack || '' ) . indexOf ( needle )
5+ }
Original file line number Diff line number Diff line change 22
33module . exports = ( {
44 data : {
5- root : { contentCatalog = { resolvePage : ( ) => undefined } , site } ,
5+ root : { contentCatalog = { resolvePage : ( ) => undefined } , site, page } ,
66 } ,
77} ) => {
88 let navGroups = site . keys . navGroups
@@ -42,6 +42,8 @@ module.exports = ({
4242 }
4343 }
4444 navGroups . _compiled = true
45+ console . log ( navGroups )
46+ console . log ( page )
4547 return ( site . keys . navGroups = navGroups )
4648}
4749
Original file line number Diff line number Diff line change 3333
3434 <div class =" navbar-collapse collapse" id =" navbar2" >
3535 <ul class =" navbar-nav w-100 justify-content-start" >
36- <li class =" nav-item" >
36+ <li class =" nav-item {{ #if ( eq " home " page.component.name ) }} nav-item-selected {{ /if }} " " >
3737 <a href=" {{ #with (and site.url site.homeUrl )}} {{ @root.site.url }}{{ this }} {{ else }} {{ siteRootPath }} {{ /with }} " class=" nav-link" >
3838 <i class=" fas fa-home" ></i>
3939 </a>
4040 </li>
4141 {{ #each (nav-groups )}}
4242 {{ #if ./url }}
43- <li class =" nav-item" >
43+ <li class=" nav-item {{ #if ( or ( eq ./url @ root.page.url ) ( includes ./components @ root.page.component.name )) }} nav-item-selected {{ /if }} " >
4444 <a class=" nav-link" href=" {{ relativize ./url }} " >
4545 {{{ ./title }}}
46+
4647 {{ #if (eq ./title ' Tutorials' )}}
4748 <span class=" arrow" >
4849 <i class=" fas fa-arrow-right" ></i>
You can’t perform that action at this time.
0 commit comments