🚸 Make main menu optional

pull/14/head
James Panther 2021-10-19 15:44:23 +11:00
parent 586224fc7a
commit 07562ee7d4
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 22 additions and 14 deletions

View File

@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Slate colour scheme ([#9](https://github.com/jpanther/congo/pull/9)) - Slate colour scheme ([#9](https://github.com/jpanther/congo/pull/9))
- Icons for ORCID and ResearchGate ([#9](https://github.com/jpanther/congo/pull/9)) - Icons for ORCID and ResearchGate ([#9](https://github.com/jpanther/congo/pull/9))
### Changed
- Main menu is now optional
## [1.3.0] - 2021-09-29 ## [1.3.0] - 2021-09-29
### Added ### Added

View File

@ -1,6 +1,7 @@
<header <header
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-800 dark:text-neutral" class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-800 dark:text-neutral"
> >
{{/* Site logo/title */}}
<div> <div>
{{ if .Site.Params.Logo -}} {{ if .Site.Params.Logo -}}
{{ $logo := resources.Get .Site.Params.Logo }} {{ $logo := resources.Get .Site.Params.Logo }}
@ -21,6 +22,8 @@
> >
{{- end }} {{- end }}
</div> </div>
{{/* Main menu */}}
{{ if .Site.Menus.main }}
<nav> <nav>
<ul class="flex flex-col list-none sm:flex-row"> <ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
@ -35,4 +38,5 @@
{{ end }} {{ end }}
</ul> </ul>
</nav> </nav>
{{ end }}
</header> </header>