Merge pull request #129 from madoke/main

Optionally disable footer menu. Enabled by default
This commit is contained in:
Nuno Coração 2022-10-28 18:36:18 +01:00 committed by GitHub
commit 5a734c1a51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 11 deletions

View file

@ -16,6 +16,7 @@ enableCodeCopy = true
# robots = "" # robots = ""
[footer] [footer]
# showMenu = true
showCopyright = true showCopyright = true
showThemeAttribution = true showThemeAttribution = true
showAppearanceSwitcher = true showAppearanceSwitcher = true

View file

@ -134,6 +134,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| |`mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.|
|`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|
|`disableImageZoom`|`false`|Disables image zoom feature across all the images in the site.| |`disableImageZoom`|`false`|Disables image zoom feature across all the images in the site.|
|`footer.showMenu`|`true`|Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file.|
|`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).| |`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).|
|`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).| |`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).|
|`footer.showAppearanceSwitcher`|`false`|Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference.| |`footer.showAppearanceSwitcher`|`false`|Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference.|

View file

@ -1,16 +1,18 @@
<footer class="py-10 print:hidden"> <footer class="py-10 print:hidden">
{{/* Footer menu */}} {{/* Footer menu */}}
{{ if .Site.Menus.footer }} {{ if .Site.Params.footer.showMenu | default true }}
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400"> {{ if .Site.Menus.footer }}
<ul class="flex flex-col list-none sm:flex-row"> <nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
{{ range .Site.Menus.footer }} <ul class="flex flex-col list-none sm:flex-row">
<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"> {{ range .Site.Menus.footer }}
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2" href="{{ .URL }}" <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">
title="{{ .Title }}">{{ .Name | markdownify | emojify }}</a> <a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2" href="{{ .URL }}"
</li> title="{{ .Title }}">{{ .Name | markdownify | emojify }}</a>
{{ end }} </li>
</ul> {{ end }}
</nav> </ul>
</nav>
{{ end }}
{{ end }} {{ end }}
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">