mirror of https://github.com/jpanther/congo.git
Compare commits
11 Commits
979ae35b52
...
864901e25b
Author | SHA1 | Date |
---|---|---|
Wen Junhua | 864901e25b | |
James Panther | 0c5d6d1125 | |
James Panther | 5142e27a62 | |
dependabot[bot] | d23e94b820 | |
dependabot[bot] | adc5f4a80d | |
James Panther | 153e6a60d1 | |
James Panther | 84379f67ff | |
dependabot[bot] | cf6f3bed58 | |
Yoganath | 71af1b71ac | |
Wen Junhua | 8355a69cba | |
Wen Junhua | c75289eea7 |
|
@ -12,7 +12,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Label
|
||||
uses: actions/labeler@v4
|
||||
uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/labeller.yml
|
||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
days-before-stale: 120
|
||||
days-before-close: 30
|
||||
|
|
|
@ -19,7 +19,7 @@ enableQuicklink = true
|
|||
fingerprintAlgorithm = "sha256"
|
||||
|
||||
[header]
|
||||
layout = "basic" # valid options: basic, hamburger, hybrid, custom
|
||||
layout = "hybrid" # valid options: basic, hamburger, hybrid, custom
|
||||
# logo = "img/logo.jpg"
|
||||
# logoDark = "img/dark-logo.jpg"
|
||||
showTitle = true
|
||||
|
|
|
@ -64,5 +64,6 @@ The list below is just a handful of the websites that are built using the Congo
|
|||
| [simaosilva.com](https://simaosilva.com) | Personal Site |
|
||||
| [kom.al](https://kom.al) | Personal Site |
|
||||
| [andrea.mortaro.it](https://andrea.mortaro.it) | Personal Site and Blog |
|
||||
| [yoganath.me](https://yoganath.me) | Personal Site and Blog |
|
||||
|
||||
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md).
|
||||
|
|
|
@ -7,105 +7,7 @@
|
|||
{{/* Main menu */}}
|
||||
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
|
||||
<ul class="flex flex-col list-none text-end sm:flex-row">
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0.5">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
<button
|
||||
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
||||
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
||||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ else if eq .Params.action "appearance" }}
|
||||
{{ $.Scratch.Add "switchCount" 1 }}
|
||||
<button
|
||||
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
||||
type="button"
|
||||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
{{ partial "icon.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Params.showName | default true }}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
</button>
|
||||
{{ else if eq .Params.action "locale" }}
|
||||
{{ $.Scratch.Add "localeCount" 1 }}
|
||||
{{ partial "translations.html" . }}
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}"
|
||||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "header/basic/basic-content.html" . }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
<button
|
||||
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
||||
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
||||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ else if eq .Params.action "appearance" }}
|
||||
{{ $.Scratch.Add "switchCount" 1 }}
|
||||
<button
|
||||
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
||||
type="button"
|
||||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
{{ partial "icon.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Params.showName | default true }}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
</button>
|
||||
{{ else if eq .Params.action "locale" }}
|
||||
{{ $.Scratch.Add "localeCount" 1 }}
|
||||
{{ partial "translations.html" . }}
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}"
|
||||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -7,124 +7,7 @@
|
|||
{{/* Hamburger menu */}}
|
||||
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
|
||||
<label id="menu-button" for="menu-controller" class="block">
|
||||
<input type="checkbox" id="menu-controller" class="hidden" />
|
||||
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ partial "icon.html" "bars" }}
|
||||
</div>
|
||||
<div
|
||||
id="menu-wrapper"
|
||||
class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
|
||||
>
|
||||
<ul
|
||||
class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
||||
>
|
||||
<li class="mb-1">
|
||||
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
|
||||
>{{ partial "icon.html" "xmark" }}</span
|
||||
>
|
||||
</li>
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
<button
|
||||
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
||||
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
||||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ else if eq .Params.action "appearance" }}
|
||||
{{ $.Scratch.Add "switchCount" 1 }}
|
||||
<button
|
||||
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
||||
type="button"
|
||||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
</button>
|
||||
{{ else if eq .Params.action "locale" }}
|
||||
{{ $.Scratch.Add "localeCount" 1 }}
|
||||
{{ partial "translations.html" . }}
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}"
|
||||
onclick="close_menu()"
|
||||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ partial "header/hamburger/hamburger-content.html" . }}
|
||||
</label>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
<input type="checkbox" id="menu-controller" class="hidden" />
|
||||
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ partial "icon.html" "bars" }}
|
||||
</div>
|
||||
<div
|
||||
id="menu-wrapper"
|
||||
class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
|
||||
>
|
||||
<ul
|
||||
class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
||||
>
|
||||
<li class="mb-1">
|
||||
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
|
||||
>{{ partial "icon.html" "xmark" }}</span
|
||||
>
|
||||
</li>
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
<button
|
||||
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
||||
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
||||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ else if eq .Params.action "appearance" }}
|
||||
{{ $.Scratch.Add "switchCount" 1 }}
|
||||
<button
|
||||
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
||||
type="button"
|
||||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
</button>
|
||||
{{ else if eq .Params.action "locale" }}
|
||||
{{ $.Scratch.Add "localeCount" 1 }}
|
||||
{{ partial "translations.html" . }}
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}"
|
||||
onclick="close_menu()"
|
||||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
|
@ -5,229 +5,13 @@
|
|||
{{ partial "logo.html" . }}
|
||||
</div>
|
||||
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
|
||||
{{/* Hamburger menu */}}
|
||||
<label id="menu-button" for="menu-controller" class="block sm:hidden">
|
||||
<input type="checkbox" id="menu-controller" class="hidden" />
|
||||
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ partial "icon.html" "bars" }}
|
||||
</div>
|
||||
<div
|
||||
id="menu-wrapper"
|
||||
class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
|
||||
>
|
||||
<ul
|
||||
class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
||||
>
|
||||
<li class="mb-1">
|
||||
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
|
||||
>{{ partial "icon.html" "xmark" }}</span
|
||||
>
|
||||
</li>
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
<button
|
||||
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
||||
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
||||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ else if eq .Params.action "appearance" }}
|
||||
{{ $.Scratch.Add "switchCount" 1 }}
|
||||
<button
|
||||
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
||||
type="button"
|
||||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
</button>
|
||||
{{ else if eq .Params.action "locale" }}
|
||||
{{ $.Scratch.Add "localeCount" 1 }}
|
||||
{{ partial "translations.html" . }}
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}"
|
||||
onclick="close_menu()"
|
||||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group">
|
||||
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{/* Hamburger menu */}}
|
||||
{{ partial "header/hamburger/hamburger-content.html" . }}
|
||||
</label>
|
||||
{{/* Basic menu */}}
|
||||
<ul class="flex-row hidden list-none text-end sm:flex">
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
{{ if eq .Params.action "search" }}
|
||||
{{ $.Scratch.Add "searchCount" 1 }}
|
||||
{{ if $.Site.Params.enableSearch | default false }}
|
||||
<button
|
||||
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
||||
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
||||
>
|
||||
{{ with .Params.icon | default "search" }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ else if eq .Params.action "appearance" }}
|
||||
{{ $.Scratch.Add "switchCount" 1 }}
|
||||
<button
|
||||
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
||||
type="button"
|
||||
aria-label="appearance switcher"
|
||||
>
|
||||
<span
|
||||
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
||||
title="{{ i18n "footer.dark_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "moon" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span
|
||||
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
||||
title="{{ i18n "footer.light_appearance" }}"
|
||||
>
|
||||
{{ with .Params.icon | default "sun" }}
|
||||
{{- partial "icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</span>
|
||||
</button>
|
||||
{{ else if eq .Params.action "locale" }}
|
||||
{{ $.Scratch.Add "localeCount" 1 }}
|
||||
{{ partial "translations.html" . }}
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}"
|
||||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||
>{{ with .Params.icon }}
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{- partial "icon.html" . -}}
|
||||
</span>
|
||||
{{- end -}}{{- if .Params.showName | default true -}}
|
||||
<span
|
||||
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
||||
>{{ .Name | markdownify | emojify }}</span
|
||||
>
|
||||
{{ end }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
||||
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
||||
<button id="search-button-m1" title="{{ i18n "search.open_button_title" }}">
|
||||
<span
|
||||
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
||||
>
|
||||
{{ partial "icon.html" "search" }}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{ partial "header/basic/basic-content.html" . }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"mermaid": "^10.6.1",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier-plugin-go-template": "^0.0.15",
|
||||
"prettier-plugin-tailwindcss": "^0.5.7",
|
||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||
"quicklink": "^2.3.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"tailwindcss": "^3.3.6",
|
||||
|
@ -2363,9 +2363,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier-plugin-tailwindcss": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.7.tgz",
|
||||
"integrity": "sha512-4v6uESAgwCni6YF6DwJlRaDjg9Z+al5zM4JfngcazMy4WEf/XkPS5TEQjbD+DZ5iNuG6RrKQLa/HuX2SYzC3kQ==",
|
||||
"version": "0.5.9",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.9.tgz",
|
||||
"integrity": "sha512-9x3t1s2Cjbut2QiP+O0mDqV3gLXTe2CgRlQDgucopVkUdw26sQi53p/q4qvGxMLBDfk/dcTV57Aa/zYwz9l8Ew==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=14.21.3"
|
||||
|
@ -2374,13 +2374,13 @@
|
|||
"@ianvs/prettier-plugin-sort-imports": "*",
|
||||
"@prettier/plugin-pug": "*",
|
||||
"@shopify/prettier-plugin-liquid": "*",
|
||||
"@shufo/prettier-plugin-blade": "*",
|
||||
"@trivago/prettier-plugin-sort-imports": "*",
|
||||
"prettier": "^3.0",
|
||||
"prettier-plugin-astro": "*",
|
||||
"prettier-plugin-css-order": "*",
|
||||
"prettier-plugin-import-sort": "*",
|
||||
"prettier-plugin-jsdoc": "*",
|
||||
"prettier-plugin-marko": "*",
|
||||
"prettier-plugin-organize-attributes": "*",
|
||||
"prettier-plugin-organize-imports": "*",
|
||||
"prettier-plugin-style-order": "*",
|
||||
|
@ -2396,9 +2396,6 @@
|
|||
"@shopify/prettier-plugin-liquid": {
|
||||
"optional": true
|
||||
},
|
||||
"@shufo/prettier-plugin-blade": {
|
||||
"optional": true
|
||||
},
|
||||
"@trivago/prettier-plugin-sort-imports": {
|
||||
"optional": true
|
||||
},
|
||||
|
@ -4863,9 +4860,9 @@
|
|||
}
|
||||
},
|
||||
"prettier-plugin-tailwindcss": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.7.tgz",
|
||||
"integrity": "sha512-4v6uESAgwCni6YF6DwJlRaDjg9Z+al5zM4JfngcazMy4WEf/XkPS5TEQjbD+DZ5iNuG6RrKQLa/HuX2SYzC3kQ==",
|
||||
"version": "0.5.9",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.9.tgz",
|
||||
"integrity": "sha512-9x3t1s2Cjbut2QiP+O0mDqV3gLXTe2CgRlQDgucopVkUdw26sQi53p/q4qvGxMLBDfk/dcTV57Aa/zYwz9l8Ew==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"mermaid": "^10.6.1",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier-plugin-go-template": "^0.0.15",
|
||||
"prettier-plugin-tailwindcss": "^0.5.7",
|
||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||
"quicklink": "^2.3.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"tailwindcss": "^3.3.6",
|
||||
|
|
Loading…
Reference in New Issue