Skip to content

Commit

Permalink
Merge pull request #179 from MarekPikula/navbar-separator
Browse files Browse the repository at this point in the history
Add optional navbar separator
  • Loading branch information
gurusabarish authored Jun 15, 2024
2 parents 8987e0e + 08ac7bf commit 4eb45a4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions exampleSite/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ params:
stickyNavBar:
enable : true
showOnScrollUp : true
enableSeparator: false
menus:
disableAbout: false
disableExperience: false
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/sections/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@
</li>
{{ end }}

{{ if and .Site.Menus.main (.Site.Params.navbar.enableSeparator | default false) }}
<li class="nav-item navbar-text d-none d-lg-block d-xl-block"><div class="nav-link nav-link-sep"></div></li>
<div class="dropdown-divider"></div>
{{ end }}

<!-- custom menus from the user -->
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
Expand Down
9 changes: 9 additions & 0 deletions static/css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ header .navbar .navbar-nav a {
.navbar-text {
font-size: 16px !important;
opacity: 0.95;
white-space: nowrap;
}
header .nav-link{
transition: none !important;
Expand All @@ -45,6 +46,10 @@ header .nav-link{
.navbar .nav-link:hover {
color: var(--primary-color) !important;
}
.nav-link.nav-link-sep:after {
content: "|";
color: var(--text-color) !important;
}

li > .dropdown-toggle:focus{
color: var(--primary-color) !important;
Expand All @@ -65,6 +70,10 @@ li > .dropdown-toggle:focus{
background-color: var(--secondary-color) !important;
}

.dropdown-divider {
border-top: 1px solid var(--lt-color-border-dark);
}

#search {
border-radius: 1rem !important;
background-color: var(--secondary-color);
Expand Down

0 comments on commit 4eb45a4

Please sign in to comment.