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,7 @@
{{ define "main" }}
<h1>404</h1>
<p>{{ i18n "404Message" }}</p>
<p>
<a href="{{ site.Home.RelPermalink }}">{{ i18n "404HomeLinkMessage" }}</a>
</p>
{{ end }}

View File

@@ -0,0 +1,3 @@
<h{{ .Level }} class="heading" id="{{ .Anchor }}">
{{ .Text | safeHTML }}<span class="heading__anchor"> <a href="#{{ .Anchor }}">#</a></span>
</h{{ .Level }}>

View File

@@ -0,0 +1,41 @@
{{- /* Wrapper is used to add horizontal scrollbar for table */ -}}
<div class="table-wrapper">
{{- /* Default table code */ -}}
<table
{{- range $k, $v := .Attributes }}
{{- if $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end }}>
<thead>
{{- range .THead }}
<tr>
{{- range . }}
<th
{{- with .Alignment }}
{{- printf " style=%q" (printf "text-align: %s" .) | safeHTMLAttr }}
{{- end -}}
>
{{- .Text -}}
</th>
{{- end }}
</tr>
{{- end }}
</thead>
<tbody>
{{- range .TBody }}
<tr>
{{- range . }}
<td
{{- with .Alignment }}
{{- printf " style=%q" (printf "text-align: %s" .) | safeHTMLAttr }}
{{- end -}}
>
{{- .Text -}}
</td>
{{- end }}
</tr>
{{- end }}
</tbody>
</table>
</div>

View File

@@ -0,0 +1 @@
{{- /* You can dynamically load scripts in this file */ -}}

View File

@@ -0,0 +1,3 @@
{{ partial "footer/rss_link.html" . }}
{{ partial "footer/copyright.html" . }}
{{ partial "footer/theme_info.html" . }}

View File

@@ -0,0 +1,13 @@
{{- $author := site.Params.footer.copyright.author }}
{{- $yearStart := string site.Params.footer.copyright.yearStart }}
{{- $yearEnd := string (default (now.Format "2006") site.Params.footer.copyright.yearEnd) }}
{{- $yearSpan := "" }}
{{- if not $yearStart }}
{{- /* Use $yearEnd if $yearStart doesn't exist */ -}}
{{- $yearSpan = $yearEnd }}
{{- else if eq $yearStart $yearEnd }}
{{- $yearSpan = $yearEnd }}
{{- else }}
{{- $yearSpan = printf "%s-%s" $yearStart $yearEnd }}
{{- end -}}
<p class="footer__copyright-notice">&copy; {{ $yearSpan }} {{ $author }}</p>

View File

@@ -0,0 +1,3 @@
{{- with .OutputFormats.Get "rss" -}}
<p class="footer__rss-link"><a href="{{ .RelPermalink }}">RSS</a></p>
{{- end }}

View File

@@ -0,0 +1,3 @@
{{- $hugo := "<a href='https://gohugo.io'>Hugo</a>" -}}
{{- $yue := "<a href='https://github.com/CyrusYip/hugo-theme-yue'>Yue</a>" -}}
<p class="footer__theme-info">{{ i18n "themeInfo" (dict "hugo" $hugo "yue" $yue) | safeHTML }}</p>

View File

@@ -0,0 +1,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partial "head/head-start.html" . }}
{{ partialCached "head/scss.html" . }}
{{ partial "head/favicon.html" . }}
{{ partial "head/description.html" . }}
{{ partial "opengraph.html" . }} {{/* embedded template */}}
{{ partial "schema.html" . }} {{/* embedded template */}}
{{ partial "head/rss_link.html" . }}
{{ partial "head/head-end.html" . }}

View File

@@ -0,0 +1,3 @@
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }}
<meta name="description" content="{{ . }}">
{{- end }}

View File

@@ -0,0 +1 @@
<link rel="icon" href="/favicon.ico" />

View File

@@ -0,0 +1 @@
{{- /* You can put scripts and styles in this file, e.g. Google Analytics */ -}}

View File

@@ -0,0 +1 @@
{{- /* You can preload scripts in this file */ -}}

View File

@@ -0,0 +1,3 @@
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .RelPermalink site.Title | safeHTML }}
{{ end }}

View File

@@ -0,0 +1,10 @@
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
{{- with resources.Get "scss/main.scss" | toCSS $opts }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,7 @@
<h1>{{ site.Title }}</h1>
<nav class="menu language">
<ul class="menu__list language__list">
{{- partial "header/menu.html" (dict "menuID" "main" "page" .) -}}
{{- partial "header/language_selector.html" . -}}
</ul>
</nav>

View File

@@ -0,0 +1,15 @@
{{ if hugo.IsMultilingual }}
{{ if .IsTranslated -}}
{{- /* link to translated page */ -}}
{{ range .Translations -}}
<li class="language__item"><a class="language__link" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
{{ end -}}
{{ else -}}
{{- /* link to home page */ -}}
{{ range site.Languages -}}
{{ if ne site.Language.Lang .Lang -}} {{- /* ignore current language */ -}}
<li class="language__item"><a class="language__link" href="{{ .Lang | relURL }}">{{ .LanguageName }}</a></li>
{{ end -}}
{{ end -}}
{{ end -}}
{{ end }}

View File

@@ -0,0 +1,48 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
{{- end }}
{{- define "partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- $attrs = merge $attrs (dict "class" "menu__link") }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "menu__link menu__link--active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "menu__link menu__link--ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li class="menu__item">
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}

View File

@@ -0,0 +1,5 @@
{{- /* Used by home.html, single.html, list.html */ -}}
{{- partial "main/dates/date.html" . }}
{{- if ne .Date .Lastmod }}
{{- partial "main/dates/lastmod_wrapper.html" . }}
{{- end }}

View File

@@ -0,0 +1,3 @@
{{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" -}}
{{- $dateHuman := .Date | time.Format (or site.Params.dateFormat "2006-01-02") -}}
<time class="published-date" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>

View File

@@ -0,0 +1,3 @@
{{- $lastmodMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" -}}
{{- $lastmodHuman := .Lastmod | time.Format (or site.Params.dateFormat "2006-01-02") -}}
<time class="lastmod-date" datetime="{{ $lastmodMachine }}">{{ i18n "lastmodWrapper" (dict "lastmod" $lastmodHuman) }}</time>

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 }}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html class="html" lang="{{ or site.Language.LanguageCode site.Language.Lang }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<body class="body">
<header class="header">
{{ partial "header.html" . }}
</header>
<main class="main">
{{ block "main" . }}{{ end }}
</main>
<footer class="footer">
{{ partial "footer.html" . }}
</footer>
{{ partial "body/body-end.html" . }}
</body>
</html>

View File

@@ -0,0 +1,20 @@
{{ define "main" }}
{{ $pages := where site.RegularPages "Section" "ne" "" }} {{- /* exclude non-section pages, e.g. /content/about.md */ -}}
{{ $homePagerSize := or site.Params.homePagerSize 10 }}
{{ $paginator := .Paginate $pages $homePagerSize }}
{{ .Content }}
{{ range $paginator.Pages }}
<h2 class="home-post-title"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ partial "main/dates.html" . }}
{{ with .Summary }}
{{- /*
Create deterministic summary output for styling.
See https://github.com/gohugoio/hugo/issues/8910
*/ -}}
<p class="summary">{{ . | plainify | htmlUnescape | chomp }}</p>
{{- end }}
{{ end }}
<nav class="paginator">
{{- partial "pagination.html" . }} {{/* embedded template */}}
</nav>
{{ end }}

View File

@@ -0,0 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "page/author.html" . }} {{ partial "main/dates.html" . }} {{ partial
"page/translation_list.html" . }} {{ partial "page/toc.html" . }} {{ .Content }} {{ partial
"page/terms.html" (dict "taxonomy" "tags" "page" .) }} {{ partial "page/terms.html" (dict "taxonomy"
"categories" "page" .) }} {{ partial "page/page_nav.html" . }} {{ partial "page/page-end.html" . }}
{{ end }}

View File

@@ -0,0 +1,75 @@
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
{{- $authorEmail := "" }}
{{- with site.Params.author }}
{{- if reflect.IsMap . }}
{{- with .email }}
{{- $authorEmail = . }}
{{- end }}
{{- end }}
{{- else }}
{{- with site.Author.email }}
{{- $authorEmail = . }}
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
{{- end }}
{{- end }}
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
{{- $authorName := "" }}
{{- with site.Params.author }}
{{- if reflect.IsMap . }}
{{- with .name }}
{{- $authorName = . }}
{{- end }}
{{- else }}
{{- $authorName = . }}
{{- end }}
{{- else }}
{{- with site.Author.name }}
{{- $authorName = . }}
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
{{- end }}
{{- end }}
{{- $pctx := . }}
{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
{{- $pages := slice }}
{{- if or $.IsHome $.IsSection }}
{{- $pages = $pctx.RegularPages }}
{{- else }}
{{- $pages = $pctx.Pages }}
{{- end }}
{{- $limit := .Site.Config.Services.RSS.Limit }}
{{- if ge $limit 1 }}
{{- $pages = $pages | first $limit }}
{{- end }}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo</generator>
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{- range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
{{ if site.Params.rssFullContent -}}
<description>{{ .Content | transform.XMLEscape | safeHTML }}</description>
{{- else -}}
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
{{- end }}
</item>
{{- end }}
</channel>
</rss>

View File

@@ -0,0 +1,9 @@
{{- /* paginate section */ -}} {{ define "main" }} {{ $pages := .Pages }} {{ $sectionPagerSize := or
site.Params.sectionPagerSize 10 }} {{ $paginator := .Paginate $pages $sectionPagerSize }} {{
.Content }} {{ range $paginator.Pages }} {{- /* show date and lastmod */ -}} {{ partial
"main/dates.html" . }}
<h2 class="section-post-title"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
<nav class="paginator">{{- partial "pagination.html" . }} {{/* embedded template */}}</nav>
{{ end }}

View File

@@ -0,0 +1 @@
{{ define "main" }} <div class="breadcrumbs"> You are here: <a href="{{ "/" | relURL }}">Home</a> / <span>{{ .Title }}</span> </div> <section class="term-list"> {{ range .Data.Terms.Alphabetical }} <h2 class="term-list__item"> <a class="term-list__link" href="{{ .Page.RelPermalink }}"> {{ .Page.Title }} <sup>{{ .Count }}</sup> </a> </h2> {{ end }} </section> {{ end }}

View File

@@ -0,0 +1,8 @@
{{ define "main" }}
<h1>{{ .Title }} <sup>{{ len .Pages }}</sup></h1>
{{ .Content }}
{{ range .Pages }}
{{ partial "main/dates.html" . }}
<h2 class="term-post-title"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ end }}