we are back with 4.0

This commit is contained in:
panr 2024-08-20 12:11:39 +02:00
parent 7e13d24d10
commit 0b11e05735
57 changed files with 1840 additions and 1724 deletions

View file

@ -4,7 +4,7 @@
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
{{ if .Params.noindex }}
{{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
<meta name="robots" content="noindex" />
<meta name="robots" content="noindex" />
{{ end }}
{{ else }}
<meta name="robots" content="noodp" />
@ -13,34 +13,23 @@
{{ template "_internal/google_analytics.html" . }}
{{ $defaultStyles := resources.Get "css/style.scss" }}
<!-- Local Theme Variables -->
{{ if and (isset .Params "color") (not (eq .Params.color "")) }}
{{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }}
{{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }}
{{ $localColorStyles := $localCss | resources.ToCSS }}
<link rel="stylesheet" href="{{ $localColorStyles.Permalink }}">
{{ else }}
<!-- Theme Variables -->
{{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }}
{{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }}
{{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }}
{{ $styles := $css | resources.ToCSS $options }}
{{ $css := resources.Match "css/*.css" }}
{{ range $css }}
{{ $styles := . | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}">
{{ end }}
<!-- Custom Terminal.css styles -->
{{ if (fileExists "static/terminal.css") -}}
<link rel="stylesheet" href="{{ "terminal.css" | absURL }}">
{{- end }}
<!-- Custom CSS to override theme properties (/static/style.css) -->
{{ if (fileExists "static/style.css") -}}
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
{{- end }}
<!-- Icons -->
{{ if isset $.Site.Params "favicon" }}
<link rel="shortcut icon" href="{{ $.Site.Params.favicon | absURL }}">
{{ else }}
<link rel="shortcut icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
<link rel="apple-touch-icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
{{ end }}
<link rel="shortcut icon" href="{{ "favicon.png" | absURL }}">
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
@ -65,11 +54,7 @@
{{ end }}
<meta property="og:image" content="{{ $pageCover | absURL }}">
{{ else }}
{{ if isset $.Site.Params "favicon" }}
<meta property="og:image" content="{{ $.Site.Params.favicon | absURL }}">
{{ else }}
<meta property="og:image" content="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}">
{{ end }}
<meta property="og:image" content="{{ "og-image.png" | absURL }}">
{{ end }}
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">

View file

@ -1,7 +1,7 @@
<div class="pagination">
<div class="pagination__buttons">
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}" class="button previous">
<a href="{{ .Paginator.Prev.URL }}" class="button prev">
<span class="button__icon"></span>
<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>
</a>

View file

@ -1,26 +1,23 @@
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon"></span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon"></span>
</a>
</span>
{{ end }}
</div>
<div class="pagination__title">
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<a href="{{ .NextInSection.Permalink }}" class="button inline prev">
{{ .NextInSection.Title }}
</a>
{{ end }}
{{ if and .NextInSection .PrevInSection }}
::
{{ end }}
{{ if .PrevInSection }}
<a href="{{ .PrevInSection.Permalink }}" class="button inline next">
{{ .PrevInSection.Title }}
</a>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}