Moved from re-terminal to terminal theme

This commit is contained in:
2025-04-08 22:02:09 +02:00
parent be98c1d9dd
commit 04254c81a4
84 changed files with 266 additions and 392 deletions

View File

@@ -0,0 +1,57 @@
{{ define "main" }}
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
<!--<style>
.post:first-of-type {
margin: 0px auto 10px !important;
padding: 0px 0px 45px !important;
}
</style>-->
{{ range .Paginator.Pages }}
<article class="post on-list" style="padding-bottom: 45px;">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- .Date.Format "2006-01-02" -}}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{- . -}}</span>
{{- end -}}
<!-- comments counter -->
{{ partial "comments_counter.html" . }}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urls.JoinPath "tags" (urlize .) "/") | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary | safeHTML | strings.Truncate 300 "..." }}
{{ end }}
<p></p><a style="color: var(--accent); display: inline; text-decoration: none;" href="{{.RelPermalink}}">[ {{ $.Site.Params.ReadMore }} → ]</a>
</div>
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}

View File

@@ -0,0 +1,58 @@
{{ define "main" }}
<article class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- .Date.Format "2006-01-02" -}}
{{- if $.Site.Params.showLastUpdated -}}
[{{- or $.Site.Params.updatedDatePrefix "Updated" -}} :: {{- .Lastmod.Format "2006-01-02" -}}]
{{- end -}}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{ . }}</span>
{{- end -}}
{{- if and (.Param "ShowReadingTime") (eq (.Param "ShowReadingTime") true) -}}{{ $customReadingTime := div (float .WordCount) .Site.Params.readingSpeed }}{{ $customReadingTime = math.Ceil $customReadingTime }}<!-- (browsers insert spaces sometimes)
--><span class="post-reading-time">{{ $customReadingTime }} {{ if eq $customReadingTime 1 }}{{ $.Site.Params._minute | default "minute" }}{{ else }}{{ $.Site.Params._minutes | default "minutes" }}{{ end }} {{$.Site.Params._readingTime | default "to read" }} ({{ .WordCount }} {{ if eq .WordCount 1 }}{{ $.Site.Params._word | default "word" }}{{ else }}{{ $.Site.Params._words | default "words" }}{{ end }})</span>
{{- end -}}
<!-- comments counter -->{{ partial "comments_counter.html" . }}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urls.JoinPath "tags" (urlize .) "/") | absLangURL }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" (dict "ctx" . "isCoverCaptionEnabled" true) }}
{{ if (.Params.Toc | default .Site.Params.Toc) }}
<div class="table-of-contents">
<h2>
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
</h2>
{{ .TableOfContents }}
</div>
{{ end }}
<div class="post-content">
{{- with .Content -}}
<div>
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">&#8983;</a> ${3}` | safeHTML }}
</div>
{{- end -}}
</div>
{{ if eq .Type $.Site.Params.contentTypeName }}
{{ partial "posts_pagination.html" . }}
{{ end }}
{{ if not (.Params.hideComments | default false) }}
{{ partial "comments.html" . }}
{{ end }}
</article>
{{ end }}

View File

@@ -0,0 +1,57 @@
{{ define "main" }}
<h1>Posts for: <b style="opacity: 0.5;">#{{ .Title | strings.ToLower }}</b></h1>
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- .Date.Format "2006-01-02" -}}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{- . -}}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urls.JoinPath "tags" (urlize .) "/") | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}

View File

@@ -0,0 +1,22 @@
{{ define "main" }}
<div class="terms">
<h1>{{ .Title }}</h1>
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<ul>
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name | strings.ToLower }} [{{ $count }}]</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}