mirror of
https://github.com/Vimux/Binario.git
synced 2024-12-22 04:29:05 +00:00
Add mainMenuAlignment param
This commit is contained in:
parent
59d1afeca1
commit
2375b2313d
3 changed files with 8 additions and 3 deletions
|
@ -132,6 +132,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
|
|||
dateFormat = "January 02, 2006" # Change the format of dates
|
||||
colorTheme = "" # dark-green, dark-blue, dark-red, dark-violet
|
||||
customCSS = ["css/custom.css"] # Include custom CSS files
|
||||
mainMenuAlignment = "right" # Align main menu (desktop version) to the right side
|
||||
authorbox = true # Show authorbox at bottom of single pages if true
|
||||
toc = true # Enable Table of Contents for all site pages
|
||||
tocOpen = true # Open Table of Contents block. Optional
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
<ul id="menu" class="main-nav__list">
|
||||
<ul id="menu" class="main-nav__list{{ if eq .Site.Params.mainMenuAlignment "right" }} main-nav__list--right{{ end }}">
|
||||
{{- $currentNode := . }}
|
||||
{{- range sort .Site.Menus.main }}
|
||||
{{- if .Name}}
|
||||
<li class="main-nav__item{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} main-nav__item--active{{end}}">{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}{{ .Name }}{{ else }}<a class="main-nav__link" href="{{ .URL }}">{{ .Name }}</a>{{end}}</li>
|
||||
<li class="main-nav__item{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} main-nav__item--active{{end}}">{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}{{ .Name }}{{ else }}<a class="main-nav__link" href="{{ .URL }}">{{ .Name }}</a>{{ end }}</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
|
|
@ -598,7 +598,7 @@ button:not(:-moz-focusring):focus > .main-nav__btn-box {
|
|||
}
|
||||
|
||||
.main-nav {
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.main-nav__item {
|
||||
|
@ -606,6 +606,10 @@ button:not(:-moz-focusring):focus > .main-nav__btn-box {
|
|||
border: 0;
|
||||
}
|
||||
|
||||
.main-nav__list--right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.main-nav__list.main-nav__list--active {
|
||||
position: initial;
|
||||
border: 0;
|
||||
|
|
Loading…
Reference in a new issue