mirror of https://github.com/jpanther/congo.git
🎨 Code cleanup
parent
4c8e536b64
commit
6415614513
|
@ -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"
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
/assets/css/compiled/
|
||||||
|
/assets/lib/
|
||||||
|
|
||||||
|
/layouts/_default/_markup/*.html
|
||||||
|
/layouts/shortcodes/figure.html
|
||||||
|
/layouts/shortcodes/screenshot.html
|
||||||
|
|
||||||
|
/exampleSite/content/docs/version-2/lighthouse.html
|
|
@ -9,7 +9,7 @@
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html", "layouts/_default/*.json"],
|
||||||
"options": {
|
"options": {
|
||||||
"parser": "go-template"
|
"parser": "go-template"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
|
@ -1,4 +1,3 @@
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
quicklink.listen();
|
quicklink.listen();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,7 @@ 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">
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ tags: ["content", "example"]
|
||||||
|
|
||||||
## ブランチページ
|
## ブランチページ
|
||||||
|
|
||||||
Hugoのブランチページバンドルは、ホームページ、セクションリスト、Taxonomyページのような項目をカバーしています。ブランチバンドルについて覚えておくべき重要なことは、このコンテンツタイプのファイル名は **_index.md`** であるということです。
|
Hugoのブランチページバンドルは、ホームページ、セクションリスト、Taxonomyページのような項目をカバーしています。ブランチバンドルについて覚えておくべき重要なことは、このコンテンツタイプのファイル名は **`_index.md`** であるということです。
|
||||||
|
|
||||||
Congoはブランチページで指定されたフロントマターを尊重し、デフォルト設定を上書きします。例えば、ブランチページで `title` パラメーターを設定すると、ページタイトルを上書きすることができます。
|
Congoはブランチページで指定されたフロントマターを尊重し、デフォルト設定を上書きします。例えば、ブランチページで `title` パラメーターを設定すると、ページタイトルを上書きすることができます。
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ Congoは、テーマ全体で使用される3色のパレットを定義して
|
||||||
|
|
||||||
## コンテンツの整理
|
## コンテンツの整理
|
||||||
|
|
||||||
Congoは特定のコンテンツタイプを強制しません。そのため、自由にコンテンツを定義することができます。静的なサイトには_pages_、ブログには_posts_、ポートフォリオには_projects_がいいかもしれません。
|
Congoは特定のコンテンツタイプを強制しません。そのため、自由にコンテンツを定義することができます。静的なサイトには*pages*、ブログには*posts*、ポートフォリオには*projects*がいいかもしれません。
|
||||||
|
|
||||||
### ディレクトリ構造
|
### ディレクトリ構造
|
||||||
|
|
||||||
|
|
|
@ -195,5 +195,4 @@ Congo 2.0では `figure` ショートコードの振る舞いが変わります
|
||||||
|
|
||||||
エラーに遭遇した場合は、設定が正しいことを確認し、[ドキュメント]({{<ref "docs" >}})を参照してください。テーマに同梱されている設定ファイルの例には、デフォルトのパラメーターがすべて含まれており、出発点として最適です。
|
エラーに遭遇した場合は、設定が正しいことを確認し、[ドキュメント]({{<ref "docs" >}})を参照してください。テーマに同梱されている設定ファイルの例には、デフォルトのパラメーターがすべて含まれており、出発点として最適です。
|
||||||
|
|
||||||
|
🙋♀️ それでもまだ助けが必要な場合は、[GitHub Discussions](https://github.com/jpanther/congo/discussions)で遠慮なく質問してください。
|
||||||
🙋♀️ それでもまだ助けが必要な場合は、[GitHub Discussions](https://github.com/jpanther/congo/discussions)で遠慮なく質問してください。
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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" />
|
||||||
|
|
|
@ -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" />
|
||||||
|
|
|
@ -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" />
|
||||||
|
|
|
@ -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 |
|
||||||
|
|
|
@ -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 |
|
||||||
|
|
|
@ -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 |
|
||||||
|
|
|
@ -5,4 +5,9 @@
|
||||||
<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 defer type="text/javascript" src="{{ $jsHome.RelPermalink }}" integrity="{{ $jsHome.Data.Integrity }}"></script>
|
<script
|
||||||
|
defer
|
||||||
|
type="text/javascript"
|
||||||
|
src="{{ $jsHome.RelPermalink }}"
|
||||||
|
integrity="{{ $jsHome.Data.Integrity }}"
|
||||||
|
></script>
|
||||||
|
|
|
@ -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"
|
||||||
line: "Sdílejte na Weibo"
|
weibo: "Sdílejte na Weibo"
|
||||||
|
|
||||||
shortcode:
|
shortcode:
|
||||||
recent_articles: "Nedávné"
|
recent_articles: "Nedávné"
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -14,4 +14,5 @@
|
||||||
{{ 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>
|
|
@ -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" -}}"
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
"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 -}}
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
<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 defer
|
<script
|
||||||
|
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 }}"></script>
|
src="{{ default "https://plausible.io/js/script.js" site.Params.plausibleAnalytics.script }}"
|
||||||
|
></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ template "_internal/google_analytics.html" . }}
|
{{ template "_internal/google_analytics.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -1,4 +1,4 @@
|
||||||
<article class="mt-6 flex max-w-prose flex-row">
|
<article class="flex flex-row mt-6 max-w-prose">
|
||||||
{{- $images := $.Resources.ByType "image" }}
|
{{- $images := $.Resources.ByType "image" }}
|
||||||
{{- $thumbnail := $images.GetMatch (.Params.thumbnail | default "*thumb*") }}
|
{{- $thumbnail := $images.GetMatch (.Params.thumbnail | default "*thumb*") }}
|
||||||
{{- $feature := $images.GetMatch (.Params.feature | default "*feature*") | default $thumbnail }}
|
{{- $feature := $images.GetMatch (.Params.feature | default "*feature*") | default $thumbnail }}
|
||||||
|
@ -21,9 +21,7 @@
|
||||||
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 }}"
|
src="{{ (.Fill "160x120 smart").RelPermalink }}" width="160" height="120"
|
||||||
width="160"
|
|
||||||
height="120"
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $.Site.Params.enableImageLazyLoading | default true }}
|
{{ if $.Site.Params.enableImageLazyLoading | default true }}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
|
@ -44,7 +42,7 @@
|
||||||
>{{ $.Title | emojify }}</a
|
>{{ $.Title | emojify }}</a
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="cursor-default align-top text-xs text-neutral-400 dark:text-neutral-500"
|
class="text-xs align-top cursor-default text-neutral-400 dark:text-neutral-500"
|
||||||
title="{{ i18n "list.externalurl_title" }}"
|
title="{{ i18n "list.externalurl_title" }}"
|
||||||
>
|
>
|
||||||
<span class="rtl:hidden">↗</span>
|
<span class="rtl:hidden">↗</span>
|
||||||
|
@ -71,7 +69,7 @@
|
||||||
{{ partial "article-meta.html" . }}
|
{{ partial "article-meta.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
|
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
|
||||||
<div class="prose py-1 dark:prose-invert">
|
<div class="py-1 prose dark:prose-invert">
|
||||||
{{ .Summary | emojify }}
|
{{ .Summary | emojify }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -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="flex flex-wrap my-1 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 }}
|
||||||
|
|
|
@ -7,18 +7,19 @@
|
||||||
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{{ if $logo_dark }} hidden dark:flex{{ end }}"
|
class="max-h-[10rem] max-w-[10rem] object-scale-down object-left
|
||||||
|
{{ 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 }}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
{{- 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="flex flex-row mt-8">
|
<ul class="flex flex-row mt-8">
|
||||||
{{- with .Prev }}
|
{{- with .Prev }}
|
||||||
<li>
|
<li>
|
||||||
|
@ -18,7 +17,6 @@
|
||||||
</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">
|
||||||
|
@ -35,7 +33,6 @@
|
||||||
{{- 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 }}
|
||||||
|
@ -57,7 +54,6 @@
|
||||||
{{- 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)) }}
|
||||||
|
@ -74,7 +70,6 @@
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Next }}
|
{{- with .Next }}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -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="
|
srcset=" {{- (.Resize "330x webp").RelPermalink }} 330w,
|
||||||
{{- (.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="
|
srcset=" {{- (.Resize "330x").RelPermalink }} 330w,
|
||||||
{{- (.Resize "330x").RelPermalink }} 330w,
|
{{- (.Resize "660x").RelPermalink }}
|
||||||
{{- (.Resize "660x").RelPermalink }} 660w
|
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 }}
|
|
@ -4,7 +4,12 @@
|
||||||
{{ $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 defer type="text/javascript" src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
|
<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" }}
|
||||||
|
@ -12,23 +17,38 @@
|
||||||
{{ $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 defer type="text/javascript" src="{{ $chartJS.RelPermalink }}" integrity="{{ $chartJS.Data.Integrity }}"></script>
|
<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" rel="stylesheet"
|
type="text/css"
|
||||||
|
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 defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
|
<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 defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}" onload="renderMathInElement(document.body);"></script>
|
<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 }}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
{{ $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 }}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{{ 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" }}">
|
||||||
|
|
|
@ -1 +1,21 @@
|
||||||
{"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"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue