Merge branch 'master'

This commit is contained in:
Daniil Krymov 2022-02-12 22:34:53 +01:00
commit 6e296d0743
No known key found for this signature in database
GPG Key ID: 49FF57C32BD36752
19 changed files with 130 additions and 93 deletions

12
.github/FUNDING.yml vendored
View File

@ -1,12 +0,0 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: adityatelange
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.buymeacoffee.com/adityatelange']

View File

@ -41,8 +41,7 @@
}
button#theme-toggle {
font-size: 26px;
margin: auto 4px;
margin: none;
}
body.dark #moon {

View File

@ -27,7 +27,7 @@
display: inline-table;
border-radius: 50%;
pointer-events: none;
border: 3px #ffffff solid;
border: 3px #ffffff solid
}
.buttons {

9
assets/js/fuse.basic.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,11 @@
one: "1 Minute"
other: "{{ .Count }} Minuten"
- id: words
translation:
one : "Wort"
other: "{{ .Count }} Wörter"
- id: toc
translation: "Inhaltsverzeichnis"

View File

@ -9,6 +9,11 @@
one : "1 min"
other: "{{ .Count }} min"
- id: words
translation:
one : "word"
other: "{{ .Count }} words"
- id: toc
translation: "Table of Contents"

View File

@ -9,6 +9,11 @@
one : "1 min"
other: "{{ .Count }} min"
- id: words
translation:
one : "palabra"
other: "{{ .Count }} palabras"
- id: toc
translation: "Tabla de Contenidos"

View File

@ -9,6 +9,11 @@
one : "1 min"
other: "{{ .Count }} min"
- id: words
translation:
one : "mot"
other: "{{ .Count }} mots"
- id: toc
translation: "Table des Matières"

View File

@ -9,6 +9,11 @@
one: "1 minuto"
other: "{{ .Count }} minuti"
- id: words
translation:
one : "parola"
other: "{{ .Count }} parole"
- id: toc
translation: "Tabella dei Contenuti"

View File

@ -9,6 +9,11 @@
one: "1 min"
other: "{{ .Count }} min"
- id: words
translation:
one : "woord"
other: "{{ .Count }} woorden"
- id: toc
translation: "Inhoudsopgave"

View File

@ -9,6 +9,11 @@
one: "1 minuto"
other: "{{ .Count }} minutos"
- id: words
translation:
one : "palavra"
other: "{{ .Count }} palavras"
- id: toc
translation: "Conteúdo"

View File

@ -18,6 +18,9 @@
- id: home
translation: "首頁"
- id: edit_post
translation: "編輯"
- id: code_copy
translation: "複製"

View File

@ -18,6 +18,9 @@
- id: home
translation: "主页"
- id: edit_post
translation: "编辑"
- id: code_copy
translation: "复制"

View File

@ -3,7 +3,7 @@
{{- if .Site.Copyright }}
<span>{{ .Site.Copyright | markdownify }}</span>
{{- else }}
<span>&copy; {{ now.Year }} <a href="{{ "" | absLangURL }}">{{- .Site.Params.label.text | default .Site.Title }}</a></span>
<span>&copy; {{ if $.Site.Params.launchYear }}{{ .Site.Params.launchYear }}{{ end }}{{ now.Year }} {{ .Site.Title | default .Site.Params.label.text }}</span>
{{- end }}
{{- if not $.Site.Params.hideCredits }}
<span>

View File

@ -8,7 +8,7 @@
{{- end }}
{{- /* Title */}}
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }}</title>
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ (.Site.Params.label.text | default .Site.Title) }}</title>
{{- /* Meta */}}
{{- if .IsHome }}
@ -72,7 +72,7 @@
{{- if (eq .Layout `search`) -}}
<link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json">
{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" .Site.Params.fuseOpts)) }}
{{- $fusejs := resources.Get "js/fuse.js" }}
{{- $fusejs := resources.Get "js/fuse.basic.min.js" }}
{{- if not .Site.Params.assets.disableFingerprinting }}
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script>

View File

@ -53,29 +53,6 @@
</a>
{{- end }}
<span class="logo-switches">
{{- if (not .Site.Params.disableThemeToggle) }}
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
{{- end }}
{{- $lang := .Lang}}
{{- $separator := or $label_text (not .Site.Params.disableThemeToggle)}}
{{- with $.Site.Home.AllTranslations }}
@ -116,6 +93,30 @@
</a>
</li>
{{- end }}
{{- if (not .Site.Params.disableThemeToggle) }}
<li>
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</li>
{{- end }}
</ul>
</nav>
</header>

View File

@ -8,6 +8,10 @@
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
{{- end }}
{{- if (.Param "ShowWordCount") -}}
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
{{- end }}
{{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }}
{{- end }}

View File

@ -8,6 +8,9 @@
</summary>
<div class="inner">
{{- if (.Param "UseHugoToc") }}
{{- .TableOfContents -}}
{{- else }}
{{- $largest := 6 -}}
{{- range $headers -}}
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
@ -87,6 +90,7 @@
{{- end -}}
{{- end }}
</ul>
{{- end }}
</div>
</details>
</div>