Fix: remove submodule

This commit is contained in:
psychhim
2025-11-11 18:07:05 +05:30
parent ea7284b910
commit 27a08b46f6
111 changed files with 4844 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
{{ $author := default site.Params.author .Params.author }}
{{- with $author -}}
{{- /* string or []string */ -}}
{{- $authorType := printf "%T" $author -}}
<span class="author">
{{- if eq $authorType "string" -}}
{{- . -}}
{{- else if eq $authorType "[]string" -}}
{{- delimit $author (i18n "authorDelimiter") -}}
{{- end -}}
</span>
<br>
{{- end -}}

View File

@@ -0,0 +1,4 @@
{{- /*
You can add commenting systems (e.g. Disqus, and Giscus) in this file,
which will be appended to the bottom of single page.
*/ -}}

View File

@@ -0,0 +1,11 @@
{{- $pages := where site.RegularPages "Section" "ne" "" -}} {{- /* exclude non-section pages, e.g. /content/about.md */ -}}
{{ if or ($pages.Next .) ($pages.Prev .) }}
<nav class="page-nav">
{{- with $pages.Next . }}
<a class="page-nav__previous-link" href="{{ .RelPermalink }}">{{ i18n "previousPage" }}{{.Title}}</a>
{{- end }}
{{- with $pages.Prev . }}
<a class="page-nav__next-link" href="{{ .RelPermalink }}">{{ i18n "nextPage" }}{{.Title}}</a>
{{- end }}
</nav>
{{ end }}

View File

@@ -0,0 +1,23 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<div>{{ $label }}{{ i18n "colon" }}</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}

View File

@@ -0,0 +1,14 @@
{{ $tocAvailable := gt (len .TableOfContents) 32 }} {{- /* length of empty TOC is 32 */ -}}
{{ $tocEnabled := default site.Params.toc .Params.toc }}
{{ $tocFolded := default site.Params.tocFolded .Params.tocFolded }}
{{ $tocStatus := "" }} {{- /* folded by default */ -}}
{{ if eq $tocFolded false }}
{{ $tocStatus = " open" }}
{{ end }}
{{ if and $tocEnabled $tocAvailable }}
<details class="toc"{{ $tocStatus | safeHTMLAttr }}>
<summary class="toc__summary">{{ i18n "tableOfContents" }}</summary>
{{ .TableOfContents }}
</details>
{{ end }}

View File

@@ -0,0 +1,17 @@
{{ $i18n := index site.Data "i18n" }} {{- /* data/i18n.yaml */ -}}
{{ if .IsTranslated }}
<ul class="translation-list">
{{ range .Translations -}}
{{- /*
i18n function can't use translated language inside .Translations .
This is a workaround for using translated string inside .Translations.
Background: https://github.com/CyrusYip/hugo-theme-yue/issues/5
*/ -}}
{{ $lang := .Language.Lang }}
{{ $colon := default ": " (index $i18n $lang "colonInTranslationList") }}
<li class="translation-list__item">
<a class="translation-list__link" href="{{ .RelPermalink }}">{{ or .Language.LanguageName .Language.Lang }}{{ $colon }}{{ .LinkTitle }}</a>
</li>
{{- end }}
</ul>
{{ end }}