From fd26c84391f9891523ba38ed94a87fe69af61d81 Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Sun, 02 Nov 2025 12:28:16 +0000
Subject: [PATCH] update templates #134

---
 layouts/single.html |   43 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/layouts/single.html b/layouts/single.html
index d300530..77649ea 100644
--- a/layouts/single.html
+++ b/layouts/single.html
@@ -1,7 +1,40 @@
 {{- define "main" }}
-<div class="content">
-	<h1>{{ .Title }}</h1>
-	{{ with .Params.description }}<div>{{ markdownify . }}</div>{{ end }}
-  {{- .Content }}
-</div>
+	{{- $blog := site.Params.blogDir }}
+	{{- if eq .Section $blog }}
+		<div class="wrap mt post">
+			<div>
+				{{- $date := (dateFormat "02. January 2006" .Date) -}}
+				<p class="post_date">{{ $date }}</p>
+				<h1 class="post_title">{{ .Title }}</h1>
+				<div class="post_body">
+					<div class="post_inner">
+					{{- with .Params.image }}
+						{{- $image := . }}
+						{{- if ne (in . "images") true }}
+							{{- $image = printf "images/%s" . }}
+						{{- end }}
+						{{- $image = absURL $image }}
+						{{- if in . "https://" }}
+							{{- $image = . }}
+						{{- end }}
+						<img src="{{ $image }}" alt="{{ . }}" class="post_thumbnail">
+					{{- end }}
+						{{- .Content }}
+					</div>
+					<div class="post_extra mb-2">
+						{{- partialCached "share" . }}
+					</div>
+					<div>
+					{{ partial "disqus.html" . }}
+					</div>
+				</div>
+			</div>
+		</div>
+	{{ else }}
+		<div class="content">
+			<h1>{{ .Title }}</h1>
+			{{ with .Params.description }}<div>{{ markdownify . }}</div>{{ end }}
+			{{- .Content }}
+		</div>
+	{{ end }}
 {{- end }}

--
Gitblit v1.10.0