Add mainMenuAlignment param

This commit is contained in:
vimux 2019-02-17 17:10:19 -05:00
parent 59d1afeca1
commit 2375b2313d
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
3 changed files with 8 additions and 3 deletions

View file

@ -132,6 +132,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
dateFormat = "January 02, 2006" # Change the format of dates dateFormat = "January 02, 2006" # Change the format of dates
colorTheme = "" # dark-green, dark-blue, dark-red, dark-violet colorTheme = "" # dark-green, dark-blue, dark-red, dark-violet
customCSS = ["css/custom.css"] # Include custom CSS files 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 authorbox = true # Show authorbox at bottom of single pages if true
toc = true # Enable Table of Contents for all site pages toc = true # Enable Table of Contents for all site pages
tocOpen = true # Open Table of Contents block. Optional tocOpen = true # Open Table of Contents block. Optional

View file

@ -8,7 +8,7 @@
</svg> </svg>
</div> </div>
</button> </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 := . }} {{- $currentNode := . }}
{{- range sort .Site.Menus.main }} {{- range sort .Site.Menus.main }}
{{- if .Name}} {{- if .Name}}

View file

@ -598,7 +598,7 @@ button:not(:-moz-focusring):focus > .main-nav__btn-box {
} }
.main-nav { .main-nav {
display: inline-block; display: flex;
} }
.main-nav__item { .main-nav__item {
@ -606,6 +606,10 @@ button:not(:-moz-focusring):focus > .main-nav__btn-box {
border: 0; border: 0;
} }
.main-nav__list--right {
margin-left: auto;
}
.main-nav__list.main-nav__list--active { .main-nav__list.main-nav__list--active {
position: initial; position: initial;
border: 0; border: 0;