Import theme

This commit is contained in:
DuN0z 2025-10-09 10:23:36 +02:00
parent 51769fa6be
commit c59ffbfeee
127 changed files with 13611 additions and 1 deletions

View file

@ -0,0 +1,4 @@
<div class="mermaid">
{{- .Inner | safeHTML }}
</div>
{{ .Page.Store.Set "hasMermaid" true }}

View file

@ -0,0 +1,9 @@
{{- $opts := dict "output" "htmlAndMathml" "displayMode" (eq .Type "block") }}
{{- with try (transform.ToMath .Inner $opts) }}
{{- with .Err }}
{{ errorf "Unable to render mathematical markup to HTML using the transform.ToMath function. The KaTeX display engine threw the following error: %s: see %s." . $.Position }}
{{- else }}
{{- .Value }}
{{- $.Page.Store.Set "hasMath" true }}
{{- end }}
{{- end -}}

View file

@ -0,0 +1,42 @@
<!doctype html>
<html
dir="{{ .Site.Language.LanguageDirection | default "ltr" }}"
lang="{{- site.Language.Lang -}}"
data-theme="{{- .Site.Params.displayMode -}}"
{{ if eq .Site.Params.displayMode "dark" }}
class="html theme--dark"
{{ else }}
class="html theme--light"
{{ end }}
>
{{- partial "head.html" . -}}
<body class="body">
<div class="wrapper">
<aside
{{ if (and (or (eq .Site.Params.hidesidebar true) (eq .Params.hidesidebar true)) (not .IsHome)) }}
class="wrapper__sidebar wrapper__sidebar--hidden"
{{ else }}
class="wrapper__sidebar"
{{ end }}
>
{{- partial "sidebar.html" . -}}
</aside>
<main
{{ if (and (or (eq .Site.Params.hidesidebar true) (eq .Params.hidesidebar true)) (not .IsHome)) }}
class="wrapper__main wrapper__main--fullscreen"
{{ else }}
class="wrapper__main"
{{ end }}
>
<header class="header">{{ partial "navbar.html" . }}</header>
{{- block "main" . }}{{- end }}
</main>
</div>
{{- partial "footer.html" (dict "context" . "footerClassModifier" "base") -}}
{{- if (eq .Site.Params.simpleAnalytics.enable true) -}}
{{- partial "analytics/simpleanalytics.html" . -}}
{{- end -}}
</body>
</html>

View file

@ -0,0 +1,42 @@
{{ define "main" }}
<div
class="archive {{ with .Site.Params.doNotLoadAnimations }}
.
{{ else }}
animated fadeInDown
{{ end }}"
>
{{ range .Data.Pages.GroupByDate "2006" }}
<div class="archive__heading">{{ .Key }}</div>
{{ range .Pages }}
<ul class="archive__list">
<li class="archive__list-item">
{{ if (eq .Site.Params.disableArchiveTitleStyling true) }}
<a class="archive__list-title" href="{{ .RelPermalink }}" title="{{ .Title }}">{{ .Title }}</a>
{{ else }}
<a class="archive__list-title" href="{{ .RelPermalink }}" title="{{ .Title }}">{{ upper .Title }}</a>
{{ end }}
<div class="archive__list-date">
{{ if isset .Site.Params "listdateformat" }}
{{ if .Site.Params.localizedDates }}
{{ time.Format .Site.Params.listDateFormat .Date }}
{{ else }}
{{ .Date.Format .Site.Params.listDateFormat }}
{{ end }}
{{ else }}
{{ if .Site.Params.localizedDates }}
{{ time.Format "Jan 2" .Date }}
{{ else }}
{{ .Date.Format "Jan 2" }}
{{ end }}
{{ end }}
</div>
</li>
</ul>
{{ end }}
{{ end }}
</div>
{{ end }}

45
layouts/_default/rss.xml Normal file
View file

@ -0,0 +1,45 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
{{ if eq .Site.Params.rssFullContent true }}
<description>{{ .Content | html }}</description>
{{ else if .Description }}
<description>{{ .Description }}</description>
{{ else }}
<description>{{ .Summary | html }}</description>
{{ end }}
</item>
{{ end }}
</channel>
</rss>

View file

@ -0,0 +1,117 @@
{{ define "main" }}
<div
class="post {{ with .Site.Params.doNotLoadAnimations }}
.
{{ else }}
animated fadeInDown
{{ end }}"
>
{{ if .Params.thumbnail }}
<div class="post__thumbnail-wrapper">
<img class="post__thumbnail" src="{{ .Params.thumbnail | relURL }}" alt="Thumbnail image" />
</div>
{{ end }}
<div class="post__content">
{{ if (eq .Site.Params.disableTitleCapitalization true) }}
<h1>{{ .Title }}</h1>
{{ else }}
<h1>{{ title .Title }}</h1>
{{ end }}
{{ if or (eq .Type "post") (eq .Type .Site.Params.postSectionName) }}
<ul class="post__meta">
<li class="post__meta-item">
<em class="fas fa-calendar-day post__meta-icon"></em>
<span class="post__meta-text"
>{{ if isset .Site.Params "singledateformat" }}
{{ if .Site.Params.localizedDates }}
{{ time.Format .Site.Params.singleDateFormat .Date }}
{{ else }}
{{ .Date.Format .Site.Params.singleDateFormat }}
{{ end }}
{{ else }}
{{ if .Site.Params.localizedDates }}
{{ time.Format "Mon, Jan 2, 2006" .Date }}
{{ else }}
{{ .Date.Format "Mon, Jan 2, 2006" }}
{{ end }}
{{ end }}
</span>
</li>
<li class="post__meta-item">
<em class="fas fa-stopwatch post__meta-icon"></em>
<span class="post__meta-text">{{ i18n "reading_time" .ReadingTime }}</span>
</li>
</ul>
{{ end }}
{{- partial "expirationnote.html" . -}}
{{- if (eq .Params.toc true) -}}
{{- partial "toc.html" . -}}
{{- end -}}
{{ .Content }}
{{- if isset .Params "series" -}}
{{- partial "series.html" . -}}
{{- end -}}
{{- if (eq .Site.Params.relatedPosts true) -}}
{{- partial "related.html" . -}}
{{- end -}}
{{- if (eq .Params.contact true) -}}
{{- partial "contact.html" . -}}
{{- end -}}
{{- if (eq .Site.Params.mermaid.enable true) -}}
{{- partial "mermaid.html" . -}}
{{- end -}}
</div>
<div class="post__footer">
{{ with .Page.Params.Categories }}
{{ partial "taxonomy/categories.html" . }}
{{ end }}
{{ with .Page.Params.Tags }}
{{ partial "taxonomy/tags.html" . }}
{{ end }}
</div>
{{ if and (or (eq .Type "post") (eq .Type .Site.Params.postSectionName)) (ne .Page.Params.disableComments true) }}
{{- if .Site.Config.Services.Disqus.Shortname -}}
<div id="comment">
<h2>{{ i18n "comments" }}</h2>
{{ template "_internal/disqus.html" . }}
</div>
{{- end -}}
{{- if .Site.Params.utterances.repo -}}
<div id="comment">
<h2>{{ i18n "comments" }}</h2>
{{ partial "comments/utterances.html" . }}
</div>
{{- end -}}
{{- if .Site.Params.giscus.repo -}}
<div id="comment">
<h2>{{ i18n "comments" }}</h2>
{{ partial "comments/giscus.html" . }}
</div>
{{- end -}}
{{- if .Site.Params.CommentoURL -}}
<div id="comment">
<h2>{{ i18n "comments" }}</h2>
{{ partial "comments/commento.html" . }}
</div>
{{- end -}}
{{- if .Site.Params.gitalk.repo -}}
<div id="comment">
<h2>{{ i18n "comments" }}</h2>
{{ partial "comments/gitalk.html" . }}
</div>
{{- end -}}
{{ end }}
</div>
{{ end }}