Compare commits

..

No commits in common. "a7fa3be37d1b735dbf73c562d7f1b72dead0a754" and "679898570c8c1d09c2e2312ca19ad1bc4201902b" have entirely different histories.

53 changed files with 200 additions and 254 deletions

View File

@ -1,7 +1,7 @@
i18n: i18n:
- changed-files: - changed-files:
- any-glob-to-any-file: i18n/* - any-glob-to-any-file: i18n/*
documentation: documentation:
- changed-files: - changed-files:
- any-glob-to-any-file: "**/*.md" - any-glob-to-any-file: '**/*.md'

View File

@ -1,8 +0,0 @@
/assets/css/compiled/
/assets/lib/
/layouts/_default/_markup/*.html
/layouts/shortcodes/figure.html
/layouts/shortcodes/screenshot.html
/exampleSite/content/docs/version-2/lighthouse.html

View File

@ -1,5 +1,5 @@
{ {
"plugins": ["prettier-plugin-go-template", "prettier-plugin-tailwindcss"], "plugins": ["prettier-plugin-go-template"],
"goTemplateBracketSpacing": true, "goTemplateBracketSpacing": true,
"htmlWhitespaceSensitivity": "css", "htmlWhitespaceSensitivity": "css",
"printWidth": 100, "printWidth": 100,
@ -9,7 +9,7 @@
"trailingComma": "es5", "trailingComma": "es5",
"overrides": [ "overrides": [
{ {
"files": ["*.html", "layouts/_default/*.json"], "files": ["*.html"],
"options": { "options": {
"parser": "go-template" "parser": "go-template"
} }

View File

@ -1192,8 +1192,8 @@ body:has(#menu-controller:checked) {
.copy-button { .copy-button {
visibility: hidden; visibility: hidden;
position: absolute; position: absolute;
right: 0px;
top: 0px; top: 0px;
right: 0px;
z-index: 10; z-index: 10;
width: 5rem; width: 5rem;
cursor: pointer; cursor: pointer;

View File

@ -67,7 +67,7 @@ body:has(#menu-controller:checked) {
.toc ul, .toc ul,
.toc li { .toc li {
@apply list-none px-0 leading-snug; @apply px-0 leading-snug list-none;
} }
.toc ul ul { .toc ul ul {
@apply ps-4; @apply ps-4;
@ -90,7 +90,7 @@ body:has(#menu-controller:checked) {
@apply visible; @apply visible;
} }
.copy-button { .copy-button {
@apply invisible absolute right-0 top-0 z-10 w-20 cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 py-1 font-mono text-sm text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200; @apply absolute top-0 right-0 z-10 invisible w-20 py-1 font-mono text-sm cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
} }
.copy-button:hover, .copy-button:hover,
.copy-button:focus, .copy-button:focus,
@ -122,20 +122,20 @@ code {
/* -- Chroma Highlight -- */ /* -- Chroma Highlight -- */
/* Background */ /* Background */
.chroma { .chroma {
@apply rounded-md bg-neutral-50 py-3 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200; @apply py-3 rounded-md bg-neutral-50 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200;
} }
.chroma pre { .chroma pre {
@apply m-0 p-0; @apply p-0 m-0;
} }
/* LineTable */ /* LineTable */
.chroma .lntable { .chroma .lntable {
@apply m-0 block w-auto overflow-auto text-base; @apply block w-auto m-0 overflow-auto text-base;
} }
/* LineNumbersTable */ /* LineNumbersTable */
/* LineNumbers */ /* LineNumbers */
.chroma .lnt, .chroma .lnt,
.chroma .ln { .chroma .ln {
@apply mr-2 px-2 text-neutral-600 dark:text-neutral-300; @apply px-2 mr-2 text-neutral-600 dark:text-neutral-300;
} }
.chroma .lntd { .chroma .lntd {
@apply p-0 align-top; @apply p-0 align-top;
@ -297,7 +297,7 @@ code {
} }
/* CommentHashbang */ /* CommentHashbang */
.chroma .ch { .chroma .ch {
@apply font-semibold italic text-neutral-500 dark:text-neutral-400; @apply italic font-semibold text-neutral-500 dark:text-neutral-400;
} }
/* GenericEmph */ /* GenericEmph */
.chroma .ge { .chroma .ge {

View File

@ -2,5 +2,5 @@
Closes the hamburger menu when a link is clicked. Closes the hamburger menu when a link is clicked.
*/ */
function close_menu() { function close_menu() {
document.getElementById("menu-controller").checked = false; document.getElementById('menu-controller').checked=false
} }

View File

@ -1,3 +1,4 @@
window.addEventListener("load", () => { window.addEventListener("load", () => {
quicklink.listen(); quicklink.listen();
}); });

View File

@ -133,7 +133,6 @@ function executeQuery(term) {
let resultsHTML = ""; let resultsHTML = "";
if (results.length > 0) { if (results.length > 0) {
// prettier-ignore
resultsHTML = results.map(function (value, key) { resultsHTML = results.map(function (value, key) {
return `<li class="mb-2"> return `<li class="mb-2">
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0"> <a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">

View File

@ -46,7 +46,7 @@
}, },
"weibo": { "weibo": {
"icon": "weibo", "icon": "weibo",
"title": "sharing.weibo", "title":"sharing.weibo",
"url": "https://service.weibo.com/share/share.php?url=%s&appkey=&title=%s&pic=&ralateUid=&lang" "url": "https://service.weibo.com/share/share.php?url=%s&appkey=&title=%s&pic=&ralateUid=&lang"
} }
} }

View File

@ -18,7 +18,7 @@ tags: ["content", "example"]
## ブランチページ ## ブランチページ
Hugoのブランチページバンドルは、ホームページ、セクションリスト、Taxonomyページのような項目をカバーしています。ブランチバンドルについて覚えておくべき重要なことは、このコンテンツタイプのファイル名は **`_index.md`** であるということです。 Hugoのブランチページバンドルは、ホームページ、セクションリスト、Taxonomyページのような項目をカバーしています。ブランチバンドルについて覚えておくべき重要なことは、このコンテンツタイプのファイル名は **_index.md`** であるということです。
Congoはブランチページで指定されたフロントマターを尊重し、デフォルト設定を上書きします。例えば、ブランチページで `title` パラメーターを設定すると、ページタイトルを上書きすることができます。 Congoはブランチページで指定されたフロントマターを尊重し、デフォルト設定を上書きします。例えば、ブランチページで `title` パラメーターを設定すると、ページタイトルを上書きすることができます。

View File

@ -100,7 +100,7 @@ Congoは、テーマ全体で使用される3色のパレットを定義して
## コンテンツの整理 ## コンテンツの整理
Congoは特定のコンテンツタイプを強制しません。そのため、自由にコンテンツを定義することができます。静的なサイトには*pages*、ブログには*posts*、ポートフォリオには*projects*がいいかもしれません。 Congoは特定のコンテンツタイプを強制しません。そのため、自由にコンテンツを定義することができます。静的なサイトには_pages_、ブログには_posts_、ポートフォリオには_projects_がいいかもしれません。
### ディレクトリ構造 ### ディレクトリ構造

View File

@ -176,7 +176,7 @@ Congoでのダークモードの動作方法が変更され、より柔軟に設
ファビコンを除くすべてのassetsが、Hugo Pipesにて最適化されるようになりました。テーマがあなたのファイルを見つけるためには、以前の `static/` から `assets/` ディレクトリに移動する必要があります。主に、著者画像とサイトロゴです: ファビコンを除くすべてのassetsが、Hugo Pipesにて最適化されるようになりました。テーマがあなたのファイルを見つけるためには、以前の `static/` から `assets/` ディレクトリに移動する必要があります。主に、著者画像とサイトロゴです:
`static/me.jpg` **&rarr;** `assets/me.jpg` `static/me.jpg` **&rarr;** `assets/me.jpg`
`static/logo.jpg` **&rarr;** `assets/logo.jpg` `static/logo.jpg` **&rarr;** `assets/logo.jpg`
著者画像やサイトロゴを提供した場合は、これらのアセットを `static/` から `assets/` に移動するだけです。同じディレクトリ構造を使用している場合、テーマはこれらのファイルがどこにあるかを自動的に認識します。新しいパスを指定したい場合は、 `logo``author.image` の設定値を適宜更新してください。 著者画像やサイトロゴを提供した場合は、これらのアセットを `static/` から `assets/` に移動するだけです。同じディレクトリ構造を使用している場合、テーマはこれらのファイルがどこにあるかを自動的に認識します。新しいパスを指定したい場合は、 `logo``author.image` の設定値を適宜更新してください。
@ -195,4 +195,5 @@ Congo 2.0では `figure` ショートコードの振る舞いが変わります
エラーに遭遇した場合は、設定が正しいことを確認し、[ドキュメント]({{<ref "docs" >}})を参照してください。テーマに同梱されている設定ファイルの例には、デフォルトのパラメーターがすべて含まれており、出発点として最適です。 エラーに遭遇した場合は、設定が正しいことを確認し、[ドキュメント]({{<ref "docs" >}})を参照してください。テーマに同梱されている設定ファイルの例には、デフォルトのパラメーターがすべて含まれており、出発点として最適です。
🙋‍♀️ それでもまだ助けが必要な場合は、[GitHub Discussions](https://github.com/jpanther/congo/discussions)で遠慮なく質問してください。
🙋‍♀️ それでもまだ助けが必要な場合は、[GitHub Discussions](https://github.com/jpanther/congo/discussions)で遠慮なく質問してください。

View File

@ -67,7 +67,7 @@ Tabellen sind nicht Teil der Markdown-Kernspezifikation, aber Hugo unterstützt
### Code-Block mit backticks ### Code-Block mit backticks
```html ```html
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
@ -134,7 +134,7 @@ Tabellen sind nicht Teil der Markdown-Kernspezifikation, aber Hugo unterstützt
## Andere Elemente — abbr, sub, sup, kbd, mark ## Andere Elemente — abbr, sub, sup, kbd, mark
<abbr title="Graphics Interchange Format">GIF</abbr> ist ein Bitmap-Bildformat. <abbr title="Graphics Interchange Format">GIF</abbr> ist ein Bitmap-Bildformat.
H<sub>2</sub>O H<sub>2</sub>O

View File

@ -59,7 +59,7 @@ Las tablas no forman parte de la especificación principal de Markdown, pero Hug
### Markdown dentro de las tablas ### Markdown dentro de las tablas
| Cursiva | Negritas | Código | | Cursiva | Negritas | Código |
| --------- | ----------- | -------- | | --------- | ---------- | -------- |
| _Cursiva_ | **Negrita** | `Código` | | _Cursiva_ | **Negrita** | `Código` |
## Bloques de código ## Bloques de código
@ -67,7 +67,7 @@ Las tablas no forman parte de la especificación principal de Markdown, pero Hug
### Bloque de código con acentos graves ### Bloque de código con acentos graves
```html ```html
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -52,9 +52,9 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
表はMarkdownのコア仕様には含まれていませんが、Hugoはサポートしています。 表はMarkdownのコア仕様には含まれていませんが、Hugoはサポートしています。
| 名前 | 年齢 | | 名前 | 年齢 |
| ----- | ---- | | ----- | --- |
| Bob | 27 | | Bob | 27 |
| Alice | 23 | | Alice | 23 |
### 表中のMarkdown ### 表中のMarkdown
@ -67,7 +67,7 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
### Code block with backticks ### Code block with backticks
```html ```html
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -67,7 +67,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
### Code block with backticks ### Code block with backticks
```html ```html
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -44,7 +44,7 @@ La lista a continuación es solo un puñado de sitios web creados con el tema Co
| [medical-humanities](https://medical-humanities.org) | Academic site | | [medical-humanities](https://medical-humanities.org) | Academic site |
| [boyersnet.com](https://boyersnet.com) | Personal site and Blog | | [boyersnet.com](https://boyersnet.com) | Personal site and Blog |
| [major.io](https://major.io) | Personal site and Blog | | [major.io](https://major.io) | Personal site and Blog |
| [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) | | [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) |
| [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog | | [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog |
| [adam.sr](https://adam.sr) | Personal site and Blog | | [adam.sr](https://adam.sr) | Personal site and Blog |
| [kpavlov.me](https://kpavlov.me) | Personal site and Blog | | [kpavlov.me](https://kpavlov.me) | Personal site and Blog |

View File

@ -44,7 +44,7 @@ Congoを使用して構築された実際のウェブサイト。
| [medical-humanities](https://medical-humanities.org) | Academic site | | [medical-humanities](https://medical-humanities.org) | Academic site |
| [boyersnet.com](https://boyersnet.com) | Personal site and Blog | | [boyersnet.com](https://boyersnet.com) | Personal site and Blog |
| [major.io](https://major.io) | Personal site and Blog | | [major.io](https://major.io) | Personal site and Blog |
| [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) | | [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) |
| [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog | | [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog |
| [adam.sr](https://adam.sr) | Personal site and Blog | | [adam.sr](https://adam.sr) | Personal site and Blog |
| [kpavlov.me](https://kpavlov.me) | Personal site and Blog | | [kpavlov.me](https://kpavlov.me) | Personal site and Blog |

View File

@ -44,7 +44,7 @@ The list below is just a handful of the websites that are built using the Congo
| [medical-humanities](https://medical-humanities.org) | Academic site | | [medical-humanities](https://medical-humanities.org) | Academic site |
| [boyersnet.com](https://boyersnet.com) | Personal site and Blog | | [boyersnet.com](https://boyersnet.com) | Personal site and Blog |
| [major.io](https://major.io) | Personal site and Blog | | [major.io](https://major.io) | Personal site and Blog |
| [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) | | [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) |
| [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog | | [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog |
| [adam.sr](https://adam.sr) | Personal site and Blog | | [adam.sr](https://adam.sr) | Personal site and Blog |
| [kpavlov.me](https://kpavlov.me) | Personal site and Blog | | [kpavlov.me](https://kpavlov.me) | Personal site and Blog |

View File

@ -5,9 +5,4 @@
<div id="profile" class="hidden h-full"> <div id="profile" class="hidden h-full">
{{ partial "partials/home/profile.html" . }} {{ partial "partials/home/profile.html" . }}
</div> </div>
<script <script defer type="text/javascript" src="{{ $jsHome.RelPermalink }}" integrity="{{ $jsHome.Data.Integrity }}"></script>
defer
type="text/javascript"
src="{{ $jsHome.RelPermalink }}"
integrity="{{ $jsHome.Data.Integrity }}"
></script>

View File

@ -53,7 +53,7 @@ sharing:
twitter: "Tweet na Twitter" twitter: "Tweet na Twitter"
telegram: "Sdílejte na Telegram" telegram: "Sdílejte na Telegram"
line: "Sdílejte na LINE" line: "Sdílejte na LINE"
weibo: "Sdílejte na Weibo" line: "Sdílejte na Weibo"
shortcode: shortcode:
recent_articles: "Nedávné" recent_articles: "Nedávné"

View File

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
<h1 class="mb-3 text-4xl font-extrabold">{{ i18n "error.404_title" | emojify }}</h1> <h1 class="mb-3 text-4xl font-extrabold">{{ i18n "error.404_title" | emojify }}</h1>
<p class="mb-12 mt-8 text-neutral-400 dark:text-neutral-500"> <p class="mt-8 mb-12 text-neutral-400 dark:text-neutral-500">
{{ i18n "error.404_error" | emojify }} {{ i18n "error.404_error" | emojify }}
</p> </p>
<div class="prose dark:prose-invert"> <div class="prose dark:prose-invert">

View File

@ -6,8 +6,8 @@
{{ $file := $url.Path }} {{ $file := $url.Path }}
{{ $img := .Page.Resources.GetMatch $file }} {{ $img := .Page.Resources.GetMatch $file }}
{{- if and (not $img) .Page.File }} {{- if and (not $img) .Page.File }}
{{ $path := path.Join .Page.File.Dir $file }} {{ $path := path.Join .Page.File.Dir $file }}
{{ $img = resources.Get $path }} {{ $img = resources.Get $path }}
{{ end -}} {{ end -}}
{{/* https://github.com/gohugoio/hugo/pull/10666 */}} {{/* https://github.com/gohugoio/hugo/pull/10666 */}}
@ -15,14 +15,14 @@
{{- $x2Param := $params.Get "2x" -}} {{- $x2Param := $params.Get "2x" -}}
{{- $x2 := false -}} {{- $x2 := false -}}
{{- if eq $x2Param "true" -}} {{- if eq $x2Param "true" -}}
{{- $x2 = true -}} {{- $x2 = true -}}
{{- end -}} {{- end -}}
<figure> <figure>
{{- with $img -}} {{- with $img -}}
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "x2" $x2) }} {{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "x2" $x2) }}
{{- else -}} {{- else -}}
<img src="{{ .Destination | safeURL }}" alt="{{ $altText }}" class="{{ $class }}" /> <img src="{{ .Destination | safeURL }}" alt="{{ $altText }}" class="{{ $class }}"/>
{{- end -}} {{- end -}}
{{ with $caption }}<figcaption class="text-center">{{ . | markdownify }}</figcaption>{{ end }} {{ with $caption }}<figcaption class="text-center">{{ . | markdownify }}</figcaption>{{ end }}
</figure> </figure>

View File

@ -14,5 +14,4 @@
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
<!-- prettier-ignore -->
<a href="{{ $link | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank" rel="noreferrer"{{ end }}>{{- .Text | safeHTML -}}</a> <a href="{{ $link | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank" rel="noreferrer"{{ end }}>{{- .Text | safeHTML -}}</a>

View File

@ -1,6 +1,6 @@
{{- partial "partials/functions/warnings.html" .Site -}} {{- partial "partials/functions/warnings.html" .Site -}}
{{- partial "partials/functions/init.html" . -}} {{- partial "partials/functions/init.html" . -}}
<!doctype html> <!DOCTYPE html>
<html <html
lang="{{- site.Language.LanguageCode | default "" -}}" lang="{{- site.Language.LanguageCode | default "" -}}"
dir="{{- site.Language.LanguageDirection | default "ltr" -}}" dir="{{- site.Language.LanguageDirection | default "ltr" -}}"
@ -10,13 +10,13 @@
> >
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body <body
class="m-auto flex h-screen max-w-7xl flex-col bg-neutral px-6 text-lg leading-7 text-neutral-900 sm:px-14 md:px-24 lg:px-32 dark:bg-neutral-800 dark:text-neutral" class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32"
> >
<div id="the-top" class="absolute flex self-center"> <div id="the-top" class="absolute flex self-center">
<a <a
class="-translate-y-8 rounded-b-lg bg-primary-200 px-3 py-1 text-sm focus:translate-y-0 dark:bg-neutral-600" class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
href="#main-content" href="#main-content"
><span class="pe-2 font-bold text-primary-600 dark:text-primary-400">&darr;</span ><span class="font-bold pe-2 text-primary-600 dark:text-primary-400">&darr;</span
>{{ i18n "nav.skip_to_main" }}</a >{{ i18n "nav.skip_to_main" }}</a
> >
</div> </div>
@ -26,7 +26,7 @@
{{ else }} {{ else }}
{{ partial "partials/header/basic.html" . }} {{ partial "partials/header/basic.html" . }}
{{ end }} {{ end }}
<div class="relative flex grow flex-col"> <div class="relative flex flex-col grow">
<main id="main-content" class="grow"> <main id="main-content" class="grow">
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 200) }} {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 200) }}

View File

@ -9,7 +9,6 @@
"summary" (.Summary | emojify | safeJS) "summary" (.Summary | emojify | safeJS)
"content" (.Plain | emojify | safeJS) "content" (.Plain | emojify | safeJS)
"permalink" .RelPermalink "permalink" .RelPermalink
) ) -}}
-}}
{{- end -}} {{- end -}}
{{- $index | jsonify -}} {{- $index | jsonify -}}

View File

@ -20,7 +20,7 @@
</div> </div>
</div> </div>
{{ end }} {{ end }}
<div class="min-h-0 min-w-0 max-w-prose grow"> <div class="min-w-0 min-h-0 max-w-prose grow">
{{ .Content | emojify }} {{ .Content | emojify }}
</div> </div>
</section> </section>
@ -31,7 +31,7 @@
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300"> <h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }} {{ .Key }}
</h2> </h2>
<hr class="w-36 border-dotted border-neutral-400" /> <hr class="border-dotted w-36 border-neutral-400" />
{{ range .Pages }} {{ range .Pages }}
{{ partial "article-link.html" . }} {{ partial "article-link.html" . }}
{{ end }} {{ end }}
@ -44,8 +44,8 @@
</section> </section>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{ else }} {{ else }}
<section class="prose mt-10 dark:prose-invert"> <section class="mt-10 prose dark:prose-invert">
<p class="border-t py-8"> <p class="py-8 border-t">
<em>{{ i18n "list.no_articles" | emojify }}</em> <em>{{ i18n "list.no_articles" | emojify }}</em>
</p> </p>
</section> </section>

View File

@ -8,7 +8,7 @@
{{ .Title | emojify }} {{ .Title | emojify }}
</h1> </h1>
</header> </header>
<section class="prose mt-6 max-w-full dark:prose-invert"> <section class="max-w-full mt-6 prose dark:prose-invert">
{{ .Content | emojify }} {{ .Content | emojify }}
</section> </section>
<footer class="pt-8"> <footer class="pt-8">

View File

@ -10,22 +10,21 @@
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral"> <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
{{ .Title | emojify }} {{ .Title | emojify }}
</h1> </h1>
<div class="mb-12 mt-8 text-base text-neutral-500 print:hidden dark:text-neutral-400"> <div class="mt-8 mb-12 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
{{ partial "article-meta.html" (dict "context" . "scope" "single") }} {{ partial "article-meta.html" (dict "context" . "scope" "single") }}
</div> </div>
ß
{{ with $feature }} {{ with $feature }}
<div class="prose"> <div class="prose">
{{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }} {{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
{{ $class := "mb-6 -mt-4 rounded-md" }} {{ $class := "mb-6 -mt-4 rounded-md" }}
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" false) }} {{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" false) }}
{{ with $.Params.coverCaption }} {{ with $.Params.coverCaption }}
<figcaption class="-mt-3 mb-6 text-center">{{ . | markdownify }}</figcaption> <figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
</header> </header>
<section class="prose mt-0 flex max-w-full flex-col dark:prose-invert lg:flex-row"> <section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }} {{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }}
<div class="order-first px-0 lg:order-last lg:max-w-xs lg:ps-8"> <div class="order-first px-0 lg:order-last lg:max-w-xs lg:ps-8">
<div class="toc pe-5 print:hidden lg:sticky lg:top-10"> <div class="toc pe-5 print:hidden lg:sticky lg:top-10">
@ -33,11 +32,11 @@
</div> </div>
</div> </div>
{{ end }} {{ end }}
<div class="min-h-0 min-w-0 max-w-prose grow"> <div class="min-w-0 min-h-0 max-w-prose grow">
{{ .Content | emojify }} {{ .Content | emojify }}
</div> </div>
</section> </section>
<footer class="max-w-prose pt-8 print:hidden"> <footer class="pt-8 max-w-prose print:hidden">
{{ partial "author.html" . }} {{ partial "author.html" . }}
{{ partial "sharing-links.html" . }} {{ partial "sharing-links.html" . }}
{{ partial "article-pagination.html" . }} {{ partial "article-pagination.html" . }}

View File

@ -6,15 +6,15 @@
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1> <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
</header> </header>
{{ if .Content }} {{ if .Content }}
<section class="prose mt-0 flex max-w-full flex-col dark:prose-invert lg:flex-row"> <section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
<div class="min-h-0 min-w-0 max-w-prose grow"> <div class="min-w-0 min-h-0 max-w-prose grow">
{{ .Content | emojify }} {{ .Content | emojify }}
</div> </div>
</section> </section>
{{ end }} {{ end }}
<section class="-mx-2 flex flex-wrap overflow-hidden"> <section class="flex flex-wrap -mx-2 overflow-hidden">
{{ range .Data.Terms }} {{ range .Data.Terms }}
<article class="my-3 w-full overflow-hidden px-2 sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5"> <article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5">
<h2 class="flex items-center"> <h2 class="flex items-center">
<a <a
class="text-xl font-medium decoration-primary-500 hover:underline hover:underline-offset-2" class="text-xl font-medium decoration-primary-500 hover:underline hover:underline-offset-2"

View File

@ -6,8 +6,8 @@
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1> <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
</header> </header>
{{ if .Content }} {{ if .Content }}
<section class="prose mt-0 flex max-w-full flex-col dark:prose-invert lg:flex-row"> <section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
<div class="min-h-0 min-w-0 max-w-prose grow"> <div class="min-w-0 min-h-0 max-w-prose grow">
{{ .Content | emojify }} {{ .Content | emojify }}
</div> </div>
</section> </section>
@ -20,7 +20,7 @@
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300"> <h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }} {{ .Key }}
</h2> </h2>
<hr class="w-36 border-dotted border-neutral-400" /> <hr class="border-dotted w-36 border-neutral-400" />
{{ range .Pages }} {{ range .Pages }}
{{ partial "article-link.html" . }} {{ partial "article-link.html" . }}
{{ end }} {{ end }}
@ -33,8 +33,8 @@
</section> </section>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{ else }} {{ else }}
<section class="prose mt-10 dark:prose-invert"> <section class="mt-10 prose dark:prose-invert">
<p class="border-t py-8"> <p class="py-8 border-t">
<em>{{ i18n "list.no_articles" | emojify }}</em> <em>{{ i18n "list.no_articles" | emojify }}</em>
</p> </p>
</section> </section>

View File

@ -3,12 +3,10 @@
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script> <script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
{{ end }} {{ end }}
{{ with site.Params.plausibleAnalytics.domain }} {{ with site.Params.plausibleAnalytics.domain }}
<script <script defer
defer
data-domain="{{ . }}" data-domain="{{ . }}"
data-api="{{ default "https://plausible.io/api/event" site.Params.plausibleAnalytics.event }}" data-api="{{ default "https://plausible.io/api/event" site.Params.plausibleAnalytics.event }}"
src="{{ default "https://plausible.io/js/script.js" site.Params.plausibleAnalytics.script }}" src="{{ default "https://plausible.io/js/script.js" site.Params.plausibleAnalytics.script }}"></script>
></script>
{{ end }} {{ end }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{ end }} {{ end }}

View File

@ -21,7 +21,9 @@
class="w-24 rounded-md sm:w-40" srcset=" class="w-24 rounded-md sm:w-40" srcset="
{{- (.Fill "160x120 smart").RelPermalink }} {{- (.Fill "160x120 smart").RelPermalink }}
160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x" 160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x"
src="{{ (.Fill "160x120 smart").RelPermalink }}" width="160" height="120" src="{{ (.Fill "160x120 smart").RelPermalink }}"
width="160"
height="120"
{{ end }} {{ end }}
{{ if $.Site.Params.enableImageLazyLoading | default true }} {{ if $.Site.Params.enableImageLazyLoading | default true }}
loading="lazy" loading="lazy"

View File

@ -50,7 +50,7 @@
(and (ne $scope "single") (.Params.showTaxonomies | default (.Site.Params.list.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false)))) (and (ne $scope "single") (.Params.showTaxonomies | default (.Site.Params.list.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false))))
(and (eq $scope "single") (.Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false))) (and (eq $scope "single") (.Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false)))
}} }}
<div class="my-1 flex flex-wrap text-xs leading-relaxed text-neutral-500 dark:text-neutral-400"> <div class="flex flex-wrap my-1 text-xs leading-relaxed text-neutral-500 dark:text-neutral-400 ">
{{ range $taxonomy, $terms := .Site.Taxonomies }} {{ range $taxonomy, $terms := .Site.Taxonomies }}
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
{{ range $context.GetTerms $taxonomy }} {{ range $context.GetTerms $taxonomy }}

View File

@ -1,4 +1,4 @@
<ol class="text-sm text-neutral-500 print:hidden dark:text-neutral-400"> <ol class="text-sm text-neutral-500 dark:text-neutral-400 print:hidden">
{{ template "crumb" (dict "p1" . "p2" .) }} {{ template "crumb" (dict "p1" . "p2" .) }}
</ol> </ol>
{{ define "crumb" }} {{ define "crumb" }}
@ -7,9 +7,9 @@
{{ else if not .p1.IsHome }} {{ else if not .p1.IsHome }}
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }} {{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }} {{ end }}
<li class="{{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }} inline"> <li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
<a <a
class="dark:underline-neutral-600 decoration-neutral-300 hover:underline" class="hover:underline decoration-neutral-300 dark:underline-neutral-600"
href="{{ .p1.RelPermalink }}" href="{{ .p1.RelPermalink }}"
>{{ if .p1.Title }} >{{ if .p1.Title }}
{{- .p1.Title -}} {{- .p1.Title -}}

View File

@ -2,12 +2,12 @@
{{/* Footer menu */}} {{/* Footer menu */}}
{{ if .Site.Menus.footer }} {{ if .Site.Menus.footer }}
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400"> <nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
<ul class="flex list-none flex-col sm:flex-row"> <ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.footer }} {{ range .Site.Menus.footer }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="group mb-1 text-end sm:mb-0 sm:me-7 sm:last:me-0"> <li class="mb-1 group text-end sm:mb-0 sm:me-7 sm:last:me-0">
{{ if eq .Params.action "search" }} {{ if eq .Params.action "search" }}
{{ $.Scratch.Add "searchCount" 1 }} {{ $.Scratch.Add "searchCount" 1 }}
{{ if $.Site.Params.enableSearch | default false }} {{ if $.Site.Params.enableSearch | default false }}
@ -17,7 +17,7 @@
> >
{{ with .Params.icon }} {{ with .Params.icon }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -37,13 +37,13 @@
aria-label="appearance switcher" aria-label="appearance switcher"
> >
<span <span
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden" class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ partial "icon.html" "moon" }} {{ partial "icon.html" "moon" }}
</span> </span>
<span <span
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline" class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
title="{{ i18n "footer.light_appearance" }}" title="{{ i18n "footer.light_appearance" }}"
> >
{{ partial "icon.html" "sun" }} {{ partial "icon.html" "sun" }}
@ -59,7 +59,7 @@
{{ with .Params.target }}target="{{ . }}"{{ end }} {{ with .Params.target }}target="{{ . }}"{{ end }}
>{{ with .Params.icon }} >{{ with .Params.icon }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -117,13 +117,13 @@
> >
<button id="appearance-switcher-0" type="button" aria-label="appearance switcher"> <button id="appearance-switcher-0" type="button" aria-label="appearance switcher">
<div <div
class="flex h-12 w-12 items-center justify-center dark:hidden" class="flex items-center justify-center w-12 h-12 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ partial "icon.html" "moon" }} {{ partial "icon.html" "moon" }}
</div> </div>
<div <div
class="hidden h-12 w-12 items-center justify-center dark:flex" class="items-center justify-center hidden w-12 h-12 dark:flex"
title="{{ i18n "footer.light_appearance" }}" title="{{ i18n "footer.light_appearance" }}"
> >
{{ partial "icon.html" "sun" }} {{ partial "icon.html" "sun" }}

View File

@ -1,4 +1,4 @@
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral"> <header class="py-6 font-semibold text-neutral-900 dark:text-neutral print:hidden sm:py-10">
<nav class="flex items-start justify-between sm:items-center"> <nav class="flex items-start justify-between sm:items-center">
{{/* Site logo/title */}} {{/* Site logo/title */}}
<div class="flex flex-row items-center"> <div class="flex flex-row items-center">
@ -6,7 +6,7 @@
</div> </div>
{{/* Main menu */}} {{/* Main menu */}}
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }} {{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
<ul class="flex list-none flex-col text-end sm:flex-row"> <ul class="flex flex-col list-none text-end sm:flex-row">
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
@ -22,7 +22,7 @@
> >
{{ with .Params.icon | default "search" }} {{ with .Params.icon | default "search" }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -42,7 +42,7 @@
aria-label="appearance switcher" aria-label="appearance switcher"
> >
<span <span
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden" class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ with .Params.icon | default "moon" }} {{ with .Params.icon | default "moon" }}
@ -56,7 +56,7 @@
{{ end }} {{ end }}
</span> </span>
<span <span
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline" class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
title="{{ i18n "footer.light_appearance" }}" title="{{ i18n "footer.light_appearance" }}"
> >
{{ with .Params.icon | default "sun" }} {{ with .Params.icon | default "sun" }}
@ -80,7 +80,7 @@
{{ with .Params.target }}target="{{ . }}"{{ end }} {{ with .Params.target }}target="{{ . }}"{{ end }}
>{{ with .Params.icon }} >{{ with .Params.icon }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -95,10 +95,10 @@
</li> </li>
{{ end }} {{ end }}
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }} {{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0"> <li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}"> <button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{ partial "icon.html" "search" }} {{ partial "icon.html" "search" }}
</span> </span>

View File

@ -1,4 +1,4 @@
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral"> <header class="py-6 font-semibold text-neutral-900 dark:text-neutral print:hidden sm:py-10">
<nav class="flex items-start justify-between sm:items-center"> <nav class="flex items-start justify-between sm:items-center">
{{/* Site logo/title */}} {{/* Site logo/title */}}
<div class="z-40 flex flex-row items-center"> <div class="z-40 flex flex-row items-center">
@ -13,10 +13,10 @@
</div> </div>
<div <div
id="menu-wrapper" id="menu-wrapper"
class="invisible fixed inset-0 z-30 m-auto h-full w-full cursor-default overflow-auto bg-neutral-100/50 opacity-0 backdrop-blur-sm transition-opacity dark:bg-neutral-900/50" class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
> >
<ul <ul
class="mx-auto flex w-full max-w-7xl list-none flex-col overflow-visible px-6 py-6 text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32" class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
> >
<li class="mb-1"> <li class="mb-1">
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400" <span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
@ -28,7 +28,7 @@
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="group mb-1"> <li class="mb-1 group">
{{ if eq .Params.action "search" }} {{ if eq .Params.action "search" }}
{{ $.Scratch.Add "searchCount" 1 }} {{ $.Scratch.Add "searchCount" 1 }}
{{ if $.Site.Params.enableSearch | default false }} {{ if $.Site.Params.enableSearch | default false }}
@ -38,7 +38,7 @@
> >
{{ with .Params.icon | default "search" }} {{ with .Params.icon | default "search" }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -58,7 +58,7 @@
aria-label="appearance switcher" aria-label="appearance switcher"
> >
<span <span
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden" class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ with .Params.icon | default "moon" }} {{ with .Params.icon | default "moon" }}
@ -72,7 +72,7 @@
{{ end }} {{ end }}
</span> </span>
<span <span
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline" class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
title="{{ i18n "footer.light_appearance" }}" title="{{ i18n "footer.light_appearance" }}"
> >
{{ with .Params.icon | default "sun" }} {{ with .Params.icon | default "sun" }}
@ -97,7 +97,7 @@
{{ with .Params.target }}target="{{ . }}"{{ end }} {{ with .Params.target }}target="{{ . }}"{{ end }}
>{{ with .Params.icon }} >{{ with .Params.icon }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -112,10 +112,10 @@
</li> </li>
{{ end }} {{ end }}
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }} {{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
<li class="group mb-1"> <li class="mb-1 group">
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}"> <button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{ partial "icon.html" "search" }} {{ partial "icon.html" "search" }}
</span> </span>

View File

@ -1,4 +1,4 @@
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral"> <header class="py-6 font-semibold text-neutral-900 dark:text-neutral print:hidden sm:py-10">
<nav class="flex items-start justify-between sm:items-center"> <nav class="flex items-start justify-between sm:items-center">
{{/* Site logo/title */}} {{/* Site logo/title */}}
<div class="z-40 flex flex-row items-center"> <div class="z-40 flex flex-row items-center">
@ -13,10 +13,10 @@
</div> </div>
<div <div
id="menu-wrapper" id="menu-wrapper"
class="invisible fixed inset-0 z-30 m-auto h-full w-full cursor-default overflow-auto bg-neutral-100/50 opacity-0 backdrop-blur-sm transition-opacity dark:bg-neutral-900/50" class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
> >
<ul <ul
class="mx-auto flex w-full max-w-7xl list-none flex-col overflow-visible px-6 py-6 text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32" class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
> >
<li class="mb-1"> <li class="mb-1">
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400" <span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
@ -28,7 +28,7 @@
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="group mb-1"> <li class="mb-1 group">
{{ if eq .Params.action "search" }} {{ if eq .Params.action "search" }}
{{ $.Scratch.Add "searchCount" 1 }} {{ $.Scratch.Add "searchCount" 1 }}
{{ if $.Site.Params.enableSearch | default false }} {{ if $.Site.Params.enableSearch | default false }}
@ -38,7 +38,7 @@
> >
{{ with .Params.icon | default "search" }} {{ with .Params.icon | default "search" }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -58,7 +58,7 @@
aria-label="appearance switcher" aria-label="appearance switcher"
> >
<span <span
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden" class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ with .Params.icon | default "moon" }} {{ with .Params.icon | default "moon" }}
@ -72,7 +72,7 @@
{{ end }} {{ end }}
</span> </span>
<span <span
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline" class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
title="{{ i18n "footer.light_appearance" }}" title="{{ i18n "footer.light_appearance" }}"
> >
{{ with .Params.icon | default "sun" }} {{ with .Params.icon | default "sun" }}
@ -97,7 +97,7 @@
{{ with .Params.target }}target="{{ . }}"{{ end }} {{ with .Params.target }}target="{{ . }}"{{ end }}
>{{ with .Params.icon }} >{{ with .Params.icon }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -112,10 +112,10 @@
</li> </li>
{{ end }} {{ end }}
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }} {{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
<li class="group mb-1"> <li class="mb-1 group">
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}"> <button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{ partial "icon.html" "search" }} {{ partial "icon.html" "search" }}
</span> </span>
@ -127,13 +127,13 @@
</div> </div>
</label> </label>
{{/* Basic menu */}} {{/* Basic menu */}}
<ul class="hidden list-none flex-row text-end sm:flex"> <ul class="flex-row hidden list-none text-end sm:flex">
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0"> <li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
{{ if eq .Params.action "search" }} {{ if eq .Params.action "search" }}
{{ $.Scratch.Add "searchCount" 1 }} {{ $.Scratch.Add "searchCount" 1 }}
{{ if $.Site.Params.enableSearch | default false }} {{ if $.Site.Params.enableSearch | default false }}
@ -143,7 +143,7 @@
> >
{{ with .Params.icon | default "search" }} {{ with .Params.icon | default "search" }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -163,7 +163,7 @@
aria-label="appearance switcher" aria-label="appearance switcher"
> >
<span <span
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden" class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ with .Params.icon | default "moon" }} {{ with .Params.icon | default "moon" }}
@ -177,7 +177,7 @@
{{ end }} {{ end }}
</span> </span>
<span <span
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline" class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
title="{{ i18n "footer.light_appearance" }}" title="{{ i18n "footer.light_appearance" }}"
> >
{{ with .Params.icon | default "sun" }} {{ with .Params.icon | default "sun" }}
@ -201,7 +201,7 @@
{{ with .Params.target }}target="{{ . }}"{{ end }} {{ with .Params.target }}target="{{ . }}"{{ end }}
>{{ with .Params.icon }} >{{ with .Params.icon }}
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{- partial "icon.html" . -}} {{- partial "icon.html" . -}}
</span> </span>
@ -216,10 +216,10 @@
</li> </li>
{{ end }} {{ end }}
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }} {{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0"> <li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
<button id="search-button-m1" title="{{ i18n "search.open_button_title" }}"> <button id="search-button-m1" title="{{ i18n "search.open_button_title" }}">
<span <span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600" class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{ partial "icon.html" "search" }} {{ partial "icon.html" "search" }}
</span> </span>

View File

@ -1,4 +1,4 @@
<article class="prose max-w-full dark:prose-invert"> <article class="max-w-full prose dark:prose-invert">
{{ with .Title }} {{ with .Title }}
<header> <header>
<h1>{{ . | emojify }}</h1> <h1>{{ . | emojify }}</h1>

View File

@ -1,6 +1,6 @@
{{- $icon := resources.Get (print "icons/" . ".svg") -}} {{- $icon := resources.Get (print "icons/" . ".svg") -}}
{{- if $icon -}} {{- if $icon -}}
<span class="icon relative inline-block px-1 align-text-bottom"> <span class="relative inline-block align-text-bottom px-1 icon">
{{- $icon.Content | safeHTML -}} {{- $icon.Content | safeHTML -}}
</span> </span>
{{- end -}} {{- end -}}

View File

@ -3,24 +3,22 @@
{{- $logo_dark := resources.Get .Site.Params.header.logoDark }} {{- $logo_dark := resources.Get .Site.Params.header.logoDark }}
{{- if $logo }} {{- if $logo }}
<a href="{{ "" | relLangURL }}" class="mr-2"> <a href="{{ "" | relLangURL }}" class="mr-2">
<!-- prettier-ignore-attribute -->
<img <img
src="{{ $logo.RelPermalink }}" src="{{ $logo.RelPermalink }}"
width="{{ div $logo.Width 2 }}" width="{{ div $logo.Width 2 }}"
height="{{ div $logo.Height 2 }}" height="{{ div $logo.Height 2 }}"
class="max-h-[10rem] max-w-[10rem] object-scale-down object-left class="max-h-[10rem] max-w-[10rem] object-scale-down object-left{{ if $logo_dark }} hidden dark:flex{{ end }}"
{{ if $logo_dark }}hidden dark:flex{{ end }}"
alt="{{ .Site.Title }}" alt="{{ .Site.Title }}"
/> />
{{- if $logo_dark }} {{- if $logo_dark }}
<img <img
src="{{ $logo_dark.RelPermalink }}" src="{{ $logo_dark.RelPermalink }}"
width="{{ div $logo_dark.Width 2 }}" width="{{ div $logo_dark.Width 2 }}"
height="{{ div $logo_dark.Height 2 }}" height="{{ div $logo_dark.Height 2 }}"
class="max-h-[10rem] max-w-[10rem] object-scale-down object-left dark:hidden" class="max-h-[10rem] max-w-[10rem] object-scale-down object-left dark:hidden"
alt="{{ .Site.Title }}" alt="{{ .Site.Title }}"
/> />
{{- end }} {{- end}}
</a> </a>
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -4,7 +4,8 @@
{{- if gt .TotalPages 1 }} {{- if gt .TotalPages 1 }}
{{- $start := math.Max 1 (sub .PageNumber $width) }} {{- $start := math.Max 1 (sub .PageNumber $width) }}
{{- $end := math.Min .TotalPages (add $start (mul $width 2)) }} {{- $end := math.Min .TotalPages (add $start (mul $width 2)) }}
<ul class="mt-8 flex flex-row">
<ul class="flex flex-row mt-8">
{{- with .Prev }} {{- with .Prev }}
<li> <li>
<a <a
@ -17,6 +18,7 @@
</a> </a>
</li> </li>
{{- end }} {{- end }}
{{- with .First }} {{- with .First }}
{{- if gt $currentPageNumber (add 1 $width) }} {{- if gt $currentPageNumber (add 1 $width) }}
<li class="mx-1 min-w-[1.8rem] text-center"> <li class="mx-1 min-w-[1.8rem] text-center">
@ -33,13 +35,14 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- range $i := seq $start $end }} {{- range $i := seq $start $end }}
<li class="mx-1 min-w-[1.8rem] text-center"> <li class="mx-1 min-w-[1.8rem] text-center">
{{- if eq $.Paginator.PageNumber $i }} {{- if eq $.Paginator.PageNumber $i }}
<span <span
aria-current="page" aria-current="page"
aria-label="Page {{ $i }}" aria-label="Page {{ $i }}"
class="block rounded bg-primary-200 font-semibold text-primary-700 dark:bg-primary-400 dark:text-neutral-800" class="block font-semibold rounded bg-primary-200 text-primary-700 dark:bg-primary-400 dark:text-neutral-800"
> >
{{ $i }} {{ $i }}
</span> </span>
@ -54,6 +57,7 @@
{{- end }} {{- end }}
</li> </li>
{{- end }} {{- end }}
{{- with .Last }} {{- with .Last }}
{{- if and (lt $currentPageNumber (sub .TotalPages $width)) (lt $end .TotalPages) }} {{- if and (lt $currentPageNumber (sub .TotalPages $width)) (lt $end .TotalPages) }}
{{- if lt $currentPageNumber (sub .TotalPages (add $width 1)) }} {{- if lt $currentPageNumber (sub .TotalPages (add $width 1)) }}
@ -70,6 +74,7 @@
</li> </li>
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with .Next }} {{- with .Next }}
<li> <li>
<a <a

View File

@ -8,8 +8,8 @@
{{ with $img }} {{ with $img }}
{{ if (eq .MediaType.SubType "svg") }} {{ if (eq .MediaType.SubType "svg") }}
{{ $width := "" }} {{ $width := ""}}
{{ $height := "" }} {{ $height := ""}}
{{ $svgContent := .Content }} {{ $svgContent := .Content }}
{{ range (findRESubmatch `<svg[^>]*width=["']([.0-9]*)["'a-zA-Z]` $svgContent 1) }} {{ range (findRESubmatch `<svg[^>]*width=["']([.0-9]*)["'a-zA-Z]` $svgContent 1) }}
{{ $width = index . 1 }} {{ $width = index . 1 }}
@ -28,39 +28,39 @@
{{/* do not use lazy without dimensions */}} {{/* do not use lazy without dimensions */}}
{{ $lazy = false }} {{ $lazy = false }}
{{ end }} {{ end }}
<!-- prettier-ignore -->
<picture {{ with $class }} class="{{ . }}" {{ end }}> <picture {{ with $class }} class="{{ . }}" {{ end }}>
<img <img
src="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
{{ with $width }}width="{{ . }}"{{ end }} {{ with $width }} width="{{ . }}" {{ end }}
{{ with $height }}height="{{ . }}"{{ end }} {{ with $height }} height="{{ . }}" {{ end }}
{{ with $class }}class="{{ . }}"{{ end }} {{ with $class }} class="{{ . }}" {{ end }}
{{ with $alt }}alt="{{ . }}"{{ end }} {{ with $alt }} alt="{{ . }}" {{ end }}
{{ with $lazy }}loading="lazy" decoding="async"{{ end }} {{ with $lazy }} loading="lazy" decoding="async" {{ end }}
/> >
</picture> </picture>
{{ else }} {{ else }}
<picture <picture
{{ with $class }}class="{{ . }}"{{ end }} {{ with $class }} class="{{ . }}" {{ end }}
{{ if $lqip }} {{ if $lqip }}
{{ $bg := (.Resize "20x webp q20").Content | base64Encode }} {{ $bg := (.Resize "20x webp q20").Content | base64Encode }}
style="background-image:url(data:image/webp;base64,{{ $bg }});background-size:cover" style="background-image:url(data:image/webp;base64,{{ $bg }});background-size:cover"
{{ end }} {{ end }}
> >
{{ $width := .Width }} {{ $width := .Width }}
{{ $height := .Height }} {{ $height := .Height }}
{{ if $x2 }} {{ if $x2 }}
{{ $width = div .Width 2 }} {{ $width = div .Width 2 }}
{{ $height = div .Height 2 }} {{ $height = div .Height 2 }}
{{ end }} {{ end }}
{{ if $webp }} {{ if $webp }}
<source <source
{{ if lt .Width 660 }} {{ if lt .Width 660 }}
{{ with .Resize (printf "%dx%d webp" .Width .Height) }} {{ with .Resize (printf "%dx%d webp" .Width .Height) }}
src="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
{{ end }} {{ end }}
{{ else }} {{ else }}
srcset=" {{- (.Resize "330x webp").RelPermalink }} 330w, srcset="
{{- (.Resize "330x webp").RelPermalink }} 330w,
{{- (.Resize "660x webp").RelPermalink }} 660w {{- (.Resize "660x webp").RelPermalink }} 660w
{{ if gt .Width 1024 }} {{ if gt .Width 1024 }}
,{{ (.Resize "1024x webp").RelPermalink }} 1024w ,{{ (.Resize "1024x webp").RelPermalink }} 1024w
@ -76,24 +76,24 @@
,{{ .RelPermalink }} {{ .Width }}w ,{{ .RelPermalink }} {{ .Width }}w
{{ end }} {{ end }}
{{ end }}" {{ end }}"
src="{{ (.Resize "660x webp").RelPermalink }}" src="{{ (.Resize "660x webp").RelPermalink }}"
{{ end }} {{ end }}
type="image/webp" type="image/webp"
/> />
{{ end }} {{ end }}
<img <img
src="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
width="{{ $width }}" width="{{ $width }}"
height="{{ $height }}" height="{{ $height }}"
{{ with $class }}class="{{ . }}"{{ end }} {{ with $class }} class="{{ . }}" {{ end }}
{{ with $alt }}alt="{{ . }}"{{ end }} {{ with $alt }} alt="{{ . }}" {{ end }}
{{ with $lazy }}loading="lazy" decoding="async"{{ end }} {{ with $lazy }} loading="lazy" decoding="async" {{ end }}
{{ if lt .Width 660 }} {{ if lt .Width 660 }}
src="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
{{ else }} {{ else }}
srcset=" {{- (.Resize "330x").RelPermalink }} 330w, srcset="
{{- (.Resize "660x").RelPermalink }} {{- (.Resize "330x").RelPermalink }} 330w,
660w {{- (.Resize "660x").RelPermalink }} 660w
{{ if gt .Width 1024 }} {{ if gt .Width 1024 }}
,{{ (.Resize "1024x").RelPermalink }} 1024w ,{{ (.Resize "1024x").RelPermalink }} 1024w
{{ else }} {{ else }}
@ -106,7 +106,7 @@
{{ end }}" {{ end }}"
src="{{ (.Resize "660x").RelPermalink }}" src="{{ (.Resize "660x").RelPermalink }}"
{{ end }} {{ end }}
/> >
</picture> </picture>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -1,34 +1,34 @@
<div <div
id="search-wrapper" id="search-wrapper"
class="invisible fixed inset-0 z-50 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm sm:p-6 md:p-[10vh] lg:p-[12vh] dark:bg-neutral-900/50" class="invisible fixed inset-0 z-50 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm dark:bg-neutral-900/50 sm:p-6 md:p-[10vh] lg:p-[12vh]"
data-url="{{ "" | absLangURL }}" data-url="{{ "" | absLangURL }}"
> >
<div <div
id="search-modal" id="search-modal"
class="top-20 mx-auto flex min-h-0 w-full max-w-3xl flex-col rounded-md border border-neutral-200 bg-neutral shadow-lg dark:border-neutral-700 dark:bg-neutral-800" class="flex flex-col w-full max-w-3xl min-h-0 mx-auto border rounded-md shadow-lg top-20 border-neutral-200 bg-neutral dark:border-neutral-700 dark:bg-neutral-800"
> >
<header class="relative z-10 flex flex-none items-center justify-between px-2"> <header class="relative z-10 flex items-center justify-between flex-none px-2">
<form class="flex min-w-0 flex-auto items-center"> <form class="flex items-center flex-auto min-w-0">
<div class="flex h-8 w-8 items-center justify-center text-neutral-400"> <div class="flex items-center justify-center w-8 h-8 text-neutral-400">
{{ partial "icon.html" "search" }} {{ partial "icon.html" "search" }}
</div> </div>
<input <input
type="search" type="search"
id="search-query" id="search-query"
class="mx-1 flex h-12 flex-auto appearance-none bg-transparent focus:outline-dotted focus:outline-2 focus:outline-transparent" class="flex flex-auto h-12 mx-1 bg-transparent appearance-none focus:outline-dotted focus:outline-2 focus:outline-transparent"
placeholder="{{ i18n "search.input_placeholder" }}" placeholder="{{ i18n "search.input_placeholder" }}"
tabindex="0" tabindex="0"
/> />
</form> </form>
<button <button
id="close-search-button" id="close-search-button"
class="flex h-8 w-8 items-center justify-center text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400" class="flex items-center justify-center w-8 h-8 text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400"
title="{{ i18n "search.close_button_title" }}" title="{{ i18n "search.close_button_title" }}"
> >
{{ partial "icon.html" "xmark" }} {{ partial "icon.html" "xmark" }}
</button> </button>
</header> </header>
<section class="flex-auto overflow-auto px-2"> <section class="flex-auto px-2 overflow-auto">
<ul id="search-results"> <ul id="search-results">
<!-- <li class="mb-2"> <!-- <li class="mb-2">
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0"> <a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">

View File

@ -1,6 +1,6 @@
<details open class="-ms-5 mt-0 overflow-hidden rounded-lg ps-5"> <details open class="-ms-5 mt-0 overflow-hidden rounded-lg ps-5">
<summary <summary
class="-ms-5 block cursor-pointer bg-neutral-100 py-1 ps-5 text-lg font-semibold text-neutral-800 lg:hidden dark:bg-neutral-700 dark:text-neutral-100" class="-ms-5 block cursor-pointer bg-neutral-100 py-1 ps-5 text-lg font-semibold text-neutral-800 dark:bg-neutral-700 dark:text-neutral-100 lg:hidden"
> >
{{ i18n "article.table_of_contents" }} {{ i18n "article.table_of_contents" }}
</summary> </summary>

View File

@ -10,9 +10,9 @@
{{ if .IsTranslated }} {{ if .IsTranslated }}
{{ $currentLang := .Page.Lang }} {{ $currentLang := .Page.Lang }}
{{ if site.IsMultiLingual }} {{ if site.IsMultiLingual }}
<div class="group relative"> <div class="relative group">
<button <button
class="group-dark:hover:text-primary-400 flex w-full items-center justify-end transition-colors group-hover:text-primary-600" class="flex items-center justify-end w-full transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
> >
{{ partial "icon.html" "translate" }}<span class="text-sm">{{ .Lang | upper }}</span {{ partial "icon.html" "translate" }}<span class="text-sm">{{ .Lang | upper }}</span
><span class="text-[0.6rem]" ><span class="text-[0.6rem]"
@ -20,10 +20,10 @@
> >
</button> </button>
{{ if eq $dir "down" }} {{ if eq $dir "down" }}
<div class="invisible h-2 w-full bg-transparent group-hover:visible"></div> <div class="invisible w-full h-2 bg-transparent group-hover:visible"></div>
{{ end }} {{ end }}
<div <div
class="{{ cond (eq $dir "down") "top-8" "bottom-7" }} invisible absolute z-50 flex flex-col whitespace-nowrap rounded border border-neutral-300 bg-neutral text-start text-base shadow group-hover:visible ltr:right-0 rtl:left-0 dark:border-neutral-600 dark:bg-neutral-800" class="{{ cond (eq $dir "down") "top-8" "bottom-7" }} invisible absolute ltr:right-0 rtl:left-0 z-50 flex flex-col whitespace-nowrap rounded border border-neutral-300 bg-neutral text-start text-base shadow group-hover:visible dark:border-neutral-600 dark:bg-neutral-800"
> >
{{ $siteLanguages := site.Languages }} {{ $siteLanguages := site.Languages }}
{{ $pageLang := .Page.Lang }} {{ $pageLang := .Page.Lang }}
@ -36,9 +36,9 @@
{{ if eq $pageLang .Lang }} {{ if eq $pageLang .Lang }}
<a <a
href="{{ $translation.RelPermalink }}" href="{{ $translation.RelPermalink }}"
class="flex w-full items-center justify-between bg-primary-100 px-2 py-1 dark:bg-primary-900" class="flex items-center justify-between w-full px-2 py-1 bg-primary-100 dark:bg-primary-900"
>{{ .LanguageName }}<span >{{ .LanguageName }}<span
class="ms-2 w-6 text-primary-600 dark:text-primary-400" class="w-6 ms-2 text-primary-600 dark:text-primary-400"
>{{ partial "icon.html" "check" }}</span >{{ partial "icon.html" "check" }}</span
></a ></a
> >

View File

@ -4,12 +4,7 @@
{{ $mermaidConfig := resources.Get "js/mermaid.js" }} {{ $mermaidConfig := resources.Get "js/mermaid.js" }}
{{ $mermaidConfig := $mermaidConfig | resources.Minify }} {{ $mermaidConfig := $mermaidConfig | resources.Minify }}
{{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint "sha512" }} {{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint "sha512" }}
<script <script defer type="text/javascript" src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
defer
type="text/javascript"
src="{{ $mermaidJS.RelPermalink }}"
integrity="{{ $mermaidJS.Data.Integrity }}"
></script>
{{ end }} {{ end }}
{{/* Chart */}} {{/* Chart */}}
{{ if .Page.HasShortcode "chart" }} {{ if .Page.HasShortcode "chart" }}
@ -17,38 +12,23 @@
{{ $chartConfig := resources.Get "js/chart.js" }} {{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }} {{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }} {{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
<script <script defer type="text/javascript" src="{{ $chartJS.RelPermalink }}" integrity="{{ $chartJS.Data.Integrity }}"></script>
defer
type="text/javascript"
src="{{ $chartJS.RelPermalink }}"
integrity="{{ $chartJS.Data.Integrity }}"
></script>
{{ end }} {{ end }}
{{/* Katex */}} {{/* Katex */}}
{{ if .Page.HasShortcode "katex" }} {{ if .Page.HasShortcode "katex" }}
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }} {{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }} {{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }}
<link <link
type="text/css" type="text/css" rel="stylesheet"
rel="stylesheet"
href="{{ $katexCSS.RelPermalink }}" href="{{ $katexCSS.RelPermalink }}"
integrity="{{ $katexCSS.Data.Integrity }}" integrity="{{ $katexCSS.Data.Integrity }}"
/> />
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }} {{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint "sha512" }} {{ $katexJS := $katexJS | resources.Fingerprint "sha512" }}
<script <script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
defer
src="{{ $katexJS.RelPermalink }}"
integrity="{{ $katexJS.Data.Integrity }}"
></script>
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }} {{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }} {{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }}
<script <script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}" onload="renderMathInElement(document.body);"></script>
defer
src="{{ $katexRenderJS.RelPermalink }}"
integrity="{{ $katexRenderJS.Data.Integrity }}"
onload="renderMathInElement(document.body);"
></script>
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }} {{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }} {{ range $katexFonts }}
{{ .Publish }} {{ .Publish }}

View File

@ -1,4 +1,4 @@
<div class="flex rounded-md bg-primary-100 px-4 py-3 dark:bg-primary-900"> <div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
<span class="pe-3 text-primary-400"> <span class="pe-3 text-primary-400">
{{ partial "icon.html" (.Get 0 | default "triangle-exclamation") }} {{ partial "icon.html" (.Get 0 | default "triangle-exclamation") }}
</span> </span>

View File

@ -14,7 +14,6 @@
{{ $img = resources.Get $path }} {{ $img = resources.Get $path }}
{{ end -}} {{ end -}}
<!-- prettier-ignore -->
<figure{{ with $class }} class="{{ . }}"{{ end }}> <figure{{ with $class }} class="{{ . }}"{{ end }}>
{{ with $href }}<a href="{{ . }}">{{ end }} {{ with $href }}<a href="{{ . }}">{{ end }}

View File

@ -1,6 +1,6 @@
{{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }} {{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }}
{{ if $icon }} {{ if $icon }}
<span class="icon relative inline-block align-text-bottom"> <span class="relative inline-block align-text-bottom icon">
{{ $icon.Content | safeHTML }} {{ $icon.Content | safeHTML }}
</span> </span>
{{ else }} {{ else }}

View File

@ -1,6 +1,5 @@
{{ if .Get "src" }} {{ if .Get "src" }}
{{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }} {{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
<!-- prettier-ignore -->
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}> <figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
{{- if .Get "href" -}} {{- if .Get "href" -}}
<a href="{{ .Get "href" }}"> <a href="{{ .Get "href" }}">

View File

@ -1,21 +1 @@
{ {"name":"Congo","short_name":"Congo","icons":[{"src": "/android-chrome-192x192.png","sizes": "192x192","type": "image/png","purpose": "any maskable"},{"src": "/android-chrome-512x512.png","sizes": "512x512","type": "image/png","purpose": "any maskable"}],"theme_color":"#ffffff","background_color":"#7c3aed","display":"standalone"}
"name": "Congo",
"short_name": "Congo",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#7c3aed",
"display": "standalone"
}