summaryrefslogtreecommitdiffstats
path: root/layouts/articles/single.html
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-22 12:42:56 +0200
committerDanilo M. <danix@danix.xyz>2026-04-22 12:42:56 +0200
commit631547a75142326a7c71bdf123e1475217a5ad73 (patch)
treef3cfef6b3c5b42bf626fc823ddcf63b8dcf4cdbb /layouts/articles/single.html
parent77ccbe72fad5a4870185fff374f75471c16a9043 (diff)
downloaddanixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.tar.gz
danixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.zip
chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme)
Diffstat (limited to 'layouts/articles/single.html')
-rw-r--r--layouts/articles/single.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/layouts/articles/single.html b/layouts/articles/single.html
new file mode 100644
index 0000000..e646639
--- /dev/null
+++ b/layouts/articles/single.html
@@ -0,0 +1,50 @@
+{{ define "main" }}
+{{ $articleType := .Params.type | default "life" }}
+{{ $template := printf "article-types/%s.html" $articleType }}
+<article class="mx-auto px-4 py-12">
+ <div class="grid md:grid-cols-3 gap-8 max-w-7xl mx-auto content-grid">
+ <!-- Article section -->
+ <div class="md:col-span-2">
+ <!-- Top article navigation -->
+ {{ partial "article-nav.html" (dict "page" . "variant" "top") }}
+
+ <!-- Breadcrumb -->
+ {{ partial "breadcrumb.html" . }}
+
+ <!-- Article header -->
+ {{ partial "article-header.html" . }}
+
+ <!-- Type-specific content -->
+ {{ partial $template . }}
+
+ <!-- Tags section -->
+ {{ if .Params.tags }}
+ <div class="border-t border-border pt-8">
+ <h3 class="text-lg font-semibold text-accent mb-4">{{ i18n "tags" }}</h3>
+ <div class="flex flex-wrap gap-2">
+ {{ $lang := .Lang }}
+ {{ range .Params.tags }}
+ {{ $tagUrl := printf "/tags/%s/" (. | urlize) }}
+ {{ if eq $lang "it" }}
+ {{ $tagUrl = printf "/it/tags/%s/" (. | urlize) }}
+ {{ end }}
+ <a
+ href="{{ $tagUrl }}"
+ class="inline-flex items-center px-3 py-1 border border-border/30 rounded hover:border-accent/50 hover:text-accent transition-colors text-sm"
+ >
+ {{ . }}
+ </a>
+ {{ end }}
+ </div>
+ </div>
+ {{ end }}
+
+ <!-- Bottom article navigation -->
+ {{ partial "article-nav.html" (dict "page" . "variant" "bottom") }}
+ </div>
+
+ <!-- Sidebar -->
+ {{ partial "sidebar.html" . }}
+ </div>
+</article>
+{{ end }}