Skip to content

Commit

Permalink
increase font-weight of h2 in sidebar navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslav_yudi committed Nov 29, 2022
1 parent addbc48 commit 8f0d4cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/doks-theme/_sass/components/_micro-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ ul.submenu {
a {
color: #000000;
padding-left: 19px;
&.header {
font-weight: 600;
}
}
& + li {
margin-top: 0;
Expand Down
3 changes: 2 additions & 1 deletion docs/doks-theme/assets/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ function createNavSubMenu() {
}
let array = []
for (let index = 0; index < items.length; index++) {
array.push( '<li><a href="#' + items[index].id + '" class="js-smooth-scroll">' + items[index].innerText + '</a></li>' )
let customClass = items[index].tagName === 'H2' ? 'header' : ''
array.push( '<li><a href="#' + items[index].id + '" class="js-smooth-scroll ' + customClass + '">' + items[index].innerText + '</a></li>' )
}

return '<ul class="submenu">' + array.join('') + '</ul>';
Expand Down

0 comments on commit 8f0d4cd

Please sign in to comment.