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

@ -1,97 +1,96 @@
.nav { .nav {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
max-width: calc(var(--nav-width) + var(--gap) * 2); max-width: calc(var(--nav-width) + var(--gap) * 2);
margin-inline-start: auto; margin-inline-start: auto;
margin-inline-end: auto; margin-inline-end: auto;
line-height: var(--header-height); line-height: var(--header-height);
} }
.nav a { .nav a {
display: block; display: block;
} }
.logo, .logo,
#menu { #menu {
display: flex; display: flex;
margin: auto var(--gap); margin: auto var(--gap);
} }
.logo { .logo {
flex-wrap: inherit; flex-wrap: inherit;
} }
.logo a { .logo a {
font-size: 24px; font-size: 24px;
font-weight: 700; font-weight: 700;
} }
.logo a img { .logo a img {
display: inline; display: inline;
vertical-align: middle; vertical-align: middle;
pointer-events: none; pointer-events: none;
transform: translate(0, -10%); transform: translate(0, -10%);
border-radius: 6px; border-radius: 6px;
margin-inline-end: 8px; margin-inline-end: 8px;
} }
#theme-toggle svg { #theme-toggle svg {
height: 18px; height: 18px;
} }
button#theme-toggle { button#theme-toggle {
font-size: 26px; margin: none;
margin: auto 4px;
} }
body.dark #moon { body.dark #moon {
vertical-align: middle; vertical-align: middle;
display: none; display: none;
} }
body:not(.dark) #sun { body:not(.dark) #sun {
display: none; display: none;
} }
#menu { #menu {
list-style: none; list-style: none;
word-break: keep-all; word-break: keep-all;
overflow-x: auto; overflow-x: auto;
white-space: nowrap; white-space: nowrap;
} }
#menu li + li { #menu li + li {
margin-inline-start: var(--gap); margin-inline-start: var(--gap);
} }
#menu a { #menu a {
font-size: 16px; font-size: 16px;
} }
#menu .active { #menu .active {
font-weight: 500; font-weight: 500;
border-bottom: 2px solid currentColor; border-bottom: 2px solid currentColor;
} }
.lang-switch li, .lang-switch li,
.lang-switch ul, .lang-switch ul,
.logo-switches { .logo-switches {
display: inline-flex; display: inline-flex;
margin: auto 4px; margin: auto 4px;
} }
.lang-switch { .lang-switch {
display: flex; display: flex;
flex-wrap: inherit; flex-wrap: inherit;
} }
.lang-switch a { .lang-switch a {
margin: auto 3px; margin: auto 3px;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
} }
.logo-switches { .logo-switches {
flex-wrap: inherit; flex-wrap: inherit;
} }

View File

@ -24,10 +24,10 @@
} }
.profile img { .profile img {
display: inline-table; display: inline-table;
border-radius: 50%; border-radius: 50%;
pointer-events: none; pointer-events: none;
border: 3px #ffffff solid; border: 3px #ffffff solid
} }
.buttons { .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" one: "1 Minute"
other: "{{ .Count }} Minuten" other: "{{ .Count }} Minuten"
- id: words
translation:
one : "Wort"
other: "{{ .Count }} Wörter"
- id: toc - id: toc
translation: "Inhaltsverzeichnis" translation: "Inhaltsverzeichnis"

View File

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

View File

@ -9,6 +9,11 @@
one : "1 min" one : "1 min"
other: "{{ .Count }} min" other: "{{ .Count }} min"
- id: words
translation:
one : "palabra"
other: "{{ .Count }} palabras"
- id: toc - id: toc
translation: "Tabla de Contenidos" translation: "Tabla de Contenidos"
@ -25,4 +30,4 @@
translation: "copiar" translation: "copiar"
- id: code_copied - id: code_copied
translation: "¡copiado!" translation: "¡copiado!"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
{{- if .Site.Copyright }} {{- if .Site.Copyright }}
<span>{{ .Site.Copyright | markdownify }}</span> <span>{{ .Site.Copyright | markdownify }}</span>
{{- else }} {{- 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 }} {{- end }}
{{- if not $.Site.Params.hideCredits }} {{- if not $.Site.Params.hideCredits }}
<span> <span>

View File

@ -8,7 +8,7 @@
{{- end }} {{- end }}
{{- /* Title */}} {{- /* 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 */}} {{- /* Meta */}}
{{- if .IsHome }} {{- if .IsHome }}
@ -72,7 +72,7 @@
{{- if (eq .Layout `search`) -}} {{- if (eq .Layout `search`) -}}
<link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json"> <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)) }} {{- $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 }} {{- if not .Site.Params.assets.disableFingerprinting }}
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script> <script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script>

View File

@ -53,29 +53,6 @@
</a> </a>
{{- end }} {{- end }}
<span class="logo-switches"> <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}} {{- $lang := .Lang}}
{{- $separator := or $label_text (not .Site.Params.disableThemeToggle)}} {{- $separator := or $label_text (not .Site.Params.disableThemeToggle)}}
{{- with $.Site.Home.AllTranslations }} {{- with $.Site.Home.AllTranslations }}
@ -116,6 +93,30 @@
</a> </a>
</li> </li>
{{- end }} {{- 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> </ul>
</nav> </nav>
</header> </header>

View File

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

View File

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