new posts and layouts from thailand

This commit is contained in:
2024-04-05 16:45:07 +02:00
parent 7e7deef055
commit 6c14bd9e35
101 changed files with 242 additions and 72472 deletions
@@ -0,0 +1,13 @@
{{- $image := .Page.Resources.GetMatch .Destination -}}
{{- if $image -}}
{{ $image_resize := $image.Resize "1024x webp q80" }}
<div class="flex justify-center">
<a href="{{- $image.RelPermalink -}}">
<img loading="lazy" src="{{ $image_resize.RelPermalink }}" alt="{{ .Text }}" class="max-h-96">
</a>
</div>
{{- else -}}
<img loading="lazy" class="img-fluid" src="{{ .Destination | safeURL }}" {{ with .Text}} alt="{{ . }}" {{ else }} alt="{{ .Page.Title }}" {{ end }} {{ with .Title}} title="{{ . }}"{{ end }} />
<p>Fallback</p>
{{- end -}}
+5 -4
View File
@@ -1,18 +1,19 @@
{{ define "main"}}
<article class="prose prose-lg mt-10">
<article class="prose prose-lg prose-h2:text-neutral-600 prose-h2:text-4xl mt-10">
<div class="text-xs md:text-sm mb-4">{{ .Date | time.Format ":date_long" }}</div>
<h1 class="text-neutral-600">{{ .Title }}</h1>
{{ .Content }}
</article>
<div class="flex flex-row justify-between">
<div class="flex flex-row justify-between mt-8">
<div>
{{ if .PrevPage }}
<a href="{{ .PrevPage.Permalink}}">{{ .PrevPage.Title }}</a>
<a class="underline text-tertiary-600 hover:text-tertiary-500 visited:text-primary-400" href="{{ .PrevPage.Permalink}}">Vorheriger: {{ .PrevPage.Title }}</a>
{{ end }}
</div>
<div>
{{ if .NextPage }}
<a href="{{ .NextPage.Permalink}}">{{ .NextPage.Title }}</a>
<a class="underline text-tertiary-600 hover:text-tertiary-500 visited:text-primary-400" href="{{ .NextPage.Permalink}}">Nächster: {{ .NextPage.Title }}</a>
{{ end }}
</div>
</div>
@@ -1,6 +1,6 @@
<div class="m-4">
<div class="mt-6 mb-4">
<div class="mb-4">
<a class="text-3xl font-bold text-neutral-800" href="{{ .Permalink }}"
<a class="text-3xl font-bold text-neutral-600" href="{{ .Permalink }}"
>{{ .Title }}</a
>
</div>
@@ -8,8 +8,8 @@
<div class="flex flex-col justify-center h-fit mb-2">
{{ $image := .Resources.GetMatch "header" }}
{{ with $image }}
{{ $image := $image.Crop "512x512 Center" }}
<img class="" src="{{ $image.RelPermalink }}" />
{{ $image := $image.Fill "512x512 Center webp" }}
<img class="md:mt-2" src="{{ $image.RelPermalink }}" />
{{ end }}
<span class="mt-4 text-neutral-500">{{ .Param "author" }}</span>
<span class="text-neutral-500"
@@ -18,9 +18,9 @@
</div>
<div class="prose lg:col-span-2">
{{ .Summary }}
<div class="mt-6">
<div class="mt-4 md:mt-6">
<a
class="underline text-primary-600 hover:text-primary-500"
class="underline text-tertiary-600 hover:text-tertiary-500 visited:text-primary-400"
href="{{ .Permalink }}"
>Weiterlesen...</a
>
@@ -0,0 +1,14 @@
{{ printf "%#v" . }}
{{/* Step 1: A default image as fallback */}}
{{ $image := "/images/placeholder.png" }}
{{/* Step 2: now check if passed image exists with same as title */}}
{{ $image_url := .Resources.Match .ImageSrc }}
{{ $img_param := .ImgParam }}
{{ if $image_url }}
{{/* Resize and convert the image */}}
{{ $image_url = $image_url.Resize $img_param }}
{{ $image = $image_url.RelPermalink }}
{{end}}
{{return .ImageSrc}}