Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
43ee99bd53
72 changed files with 3338 additions and 3925 deletions
|
@ -67,7 +67,7 @@
|
|||
{{- end }}
|
||||
|
||||
{{- if (default false $.Site.Params.geekdocOverwriteHTMLBase) }}
|
||||
<base href="{{ .Site.BaseURL }}" />
|
||||
<base href="{{ .Site.Home.Permalink }}" />
|
||||
{{- end }}
|
||||
|
||||
{{ printf "<!-- %s -->" "Made with Geekdoc theme https://github.com/thegeeklab/hugo-geekdoc" | safeHTML }}
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
{{ $current.Scratch.Set "nextPage" false }}
|
||||
{{ $current.Scratch.Set "prevPage" false }}
|
||||
|
||||
{{ template "menu_nextprev" dict "sect" $.Site.Data.menu.main.main "current" $current "site" $site }}
|
||||
{{ template "menu-bundle-np" dict "sect" $.Site.Data.menu.main.main "current" $current "site" $site }}
|
||||
|
||||
{{ define "menu_nextprev" }}
|
||||
{{ define "menu-bundle-np" }}
|
||||
{{ $current := .current }}
|
||||
{{ $site := .site }}
|
||||
|
||||
|
@ -44,35 +44,32 @@
|
|||
|
||||
{{ $sub := default false .sub }}
|
||||
{{ if $sub }}
|
||||
{{ template "menu_nextprev" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
|
||||
{{ template "menu-bundle-np" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $showPrevNext := (and (default true .Site.Params.geekdocNextPrev) .Site.Params.geekdocMenuBundle) }}
|
||||
{{ if $showPrevNext }}
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "prevPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--prev flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
<i class="gdoc-icon">gdoc_arrow_left_alt</i>
|
||||
{{ .name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "nextPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--next flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
<i class="gdoc-icon">gdoc_arrow_right_alt</i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "prevPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--prev flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
<i class="gdoc-icon">gdoc_arrow_left_alt</i>
|
||||
{{ .name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "nextPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--next flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
<i class="gdoc-icon">gdoc_arrow_right_alt</i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
|
@ -52,7 +52,7 @@
|
|||
<svg class="gdoc-icon {{ .icon }}"><use xlink:href="#{{ .icon }}"></use></svg>
|
||||
{{ end }}
|
||||
<a
|
||||
href="{{ if .external }}
|
||||
href="{{ if .external -}}
|
||||
{{ .ref }}
|
||||
{{- else -}}
|
||||
{{ path.Join $this.RelPermalink $anchor }}
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
{{ if eq $target "header" }}
|
||||
<span>
|
||||
<a
|
||||
href="{{ if .external }}
|
||||
href="{{ if .external -}}
|
||||
{{ .ref }}
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
{{ relref $current .ref }}
|
||||
{{ end }}"
|
||||
{{- end }}"
|
||||
class="gdoc-header__link"
|
||||
>
|
||||
<svg class="gdoc-icon {{ .icon }}">
|
||||
|
|
107
layouts/partials/menu-filetree-np.html
Normal file
107
layouts/partials/menu-filetree-np.html
Normal file
|
@ -0,0 +1,107 @@
|
|||
{{ $current := . }}
|
||||
{{ $site := .Site }}
|
||||
{{ $current.Scratch.Set "prev" false }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
|
||||
{{ $current.Scratch.Set "nextPage" false }}
|
||||
{{ $current.Scratch.Set "prevPage" false }}
|
||||
|
||||
{{ template "menu-filetree-np" dict "sect" .Site.Home.Sections "current" $current "site" $site }}
|
||||
|
||||
{{ define "menu-filetree-np" }}
|
||||
{{ $current := .current }}
|
||||
{{ $site := .site }}
|
||||
|
||||
{{ $sortBy := (default "title" .current.Site.Params.geekdocFileTreeSortBy | lower) }}
|
||||
{{ range .sect.GroupBy "Weight" }}
|
||||
{{ $rangeBy := .ByTitle }}
|
||||
|
||||
{{ if eq $sortBy "title" }}
|
||||
{{ $rangeBy = .ByTitle }}
|
||||
{{ else if eq $sortBy "linktitle" }}
|
||||
{{ $rangeBy = .ByLinkTitle }}
|
||||
{{ else if eq $sortBy "date" }}
|
||||
{{ $rangeBy = .ByDate }}
|
||||
{{ else if eq $sortBy "publishdate" }}
|
||||
{{ $rangeBy = .ByPublishDate }}
|
||||
{{ else if eq $sortBy "expirydate" }}
|
||||
{{ $rangeBy = .ByExpiryDate }}
|
||||
{{ else if eq $sortBy "lastmod" }}
|
||||
{{ $rangeBy = .ByLastmod }}
|
||||
{{ else if eq $sortBy "title_reverse" }}
|
||||
{{ $rangeBy = .ByTitle.Reverse }}
|
||||
{{ else if eq $sortBy "linktitle_reverse" }}
|
||||
{{ $rangeBy = .ByLinkTitle.Reverse }}
|
||||
{{ else if eq $sortBy "date_reverse" }}
|
||||
{{ $rangeBy = .ByDate.Reverse }}
|
||||
{{ else if eq $sortBy "publishdate_reverse" }}
|
||||
{{ $rangeBy = .ByPublishDate.Reverse }}
|
||||
{{ else if eq $sortBy "expirydate_reverse" }}
|
||||
{{ $rangeBy = .ByExpiryDate.Reverse }}
|
||||
{{ else if eq $sortBy "lastmod_reverse" }}
|
||||
{{ $rangeBy = .ByLastmod.Reverse }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $rangeBy }}
|
||||
{{ $current.Scratch.Set "current" $current }}
|
||||
{{ $current.Scratch.Set "site" $site }}
|
||||
|
||||
{{ if not .Params.geekdocHidden }}
|
||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{ $site := $current.Scratch.Get "site" }}
|
||||
{{ $this := . }}
|
||||
{{ $current := $current.Scratch.Get "current" }}
|
||||
|
||||
{{ $current.Scratch.Set "refName" (partial "utils/title" .) }}
|
||||
{{ $name := $current.Scratch.Get "refName" }}
|
||||
|
||||
{{ if $current.Scratch.Get "getNext" }}
|
||||
{{ if or $this.Content $this.Params.geekdocFlatSection }}
|
||||
{{ $current.Scratch.Set "nextPage" (dict "name" $name "this" $this) }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $current.RelPermalink $this.RelPermalink }}
|
||||
{{ $current.Scratch.Set "prevPage" ($current.Scratch.Get "prev") }}
|
||||
{{ $current.Scratch.Set "getNext" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $this.Content $this.Params.geekdocFlatSection }}
|
||||
{{ $current.Scratch.Set "prev" (dict "name" $name "this" $this) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sub := and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
|
||||
{{ if $sub }}
|
||||
{{ template "menu-filetree-np" dict "sect" .Pages "current" $current }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "prevPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--prev flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
<i class="gdoc-icon">gdoc_arrow_left_alt</i>
|
||||
{{ .name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "nextPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--next flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
<i class="gdoc-icon">gdoc_arrow_right_alt</i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
|
@ -5,7 +5,7 @@
|
|||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"name": {{ .Site.Title }},
|
||||
"url": {{ .Site.BaseURL }},
|
||||
"url": {{ .Site.Home.Permalink }},
|
||||
{{- with partial "utils/description" . }}
|
||||
"description": "{{ . | plainify | htmlUnescape | chomp }}",
|
||||
{{- end }}
|
||||
|
@ -57,7 +57,7 @@
|
|||
"publisher":{
|
||||
"@type":"Organization",
|
||||
"name": {{ .Site.Title }},
|
||||
"url": {{ .Site.BaseURL }},
|
||||
"url": {{ .Site.Home.Permalink }},
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": {{ (default "brand.svg" .Site.Params.logo) | absURL }},
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
placeholder="{{ i18n "form_placeholder_search" }}..."
|
||||
aria-label="{{ i18n "form_placeholder_search" }}"
|
||||
maxlength="64"
|
||||
data-site-base-url="{{ .Site.BaseURL }}"
|
||||
data-site-base-url="{{ "" | absURL }}"
|
||||
data-site-lang="{{ .Site.Language.Lang }}"
|
||||
/>
|
||||
<ul id="gdoc-search-results" class="gdoc-search__list"></ul>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</label>
|
||||
{{ end }}
|
||||
<div>
|
||||
<a class="gdoc-brand gdoc-header__link" href="{{ .Root.Site.BaseURL }}">
|
||||
<a class="gdoc-brand gdoc-header__link" href="{{ .Root.Site.Home.Permalink }}">
|
||||
<span class="flex align-center">
|
||||
<img
|
||||
class="gdoc-brand__img"
|
||||
|
@ -47,7 +47,7 @@
|
|||
</span>
|
||||
|
||||
<span class="gdoc-menu-header__home">
|
||||
<a href="{{ .Root.Site.BaseURL }}" class="gdoc-header__link">
|
||||
<a href="{{ .Root.Site.Home.Permalink }}" class="gdoc-header__link">
|
||||
<svg class="gdoc-icon gdoc_home">
|
||||
<title>{{ i18n "button_homepage" }}</title>
|
||||
<use xlink:href="#gdoc_home"></use>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue