🐛 Fix search not showing when main menu empty

pull/231/head
James Panther 2022-06-25 10:40:24 +10:00
parent 7fa433ddab
commit 84e5e46971
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 17 additions and 11 deletions

View File

@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Upgrade to Tailwind v3.1.4 ([#225](https://github.com/jpanther/congo/pull/225))
### Fixed
- Search would not appear in header if main menu had no links to display
## [2.2.3] - 2022-06-22
### Changed

View File

@ -27,9 +27,10 @@
{{ partial "translations.html" . }}
</div>
{{/* Main menu */}}
{{ if .Site.Menus.main }}
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
<nav>
<ul class="flex flex-col list-none sm:flex-row">
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
<li
class="mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"
@ -42,6 +43,7 @@
>
</li>
{{ end }}
{{ end }}
{{ if .Site.Params.enableSearch | default false }}
<li
class="ltr:text-right rtl:text-left ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"