summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/layouts/_default
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-22 12:43:22 +0200
committerDanilo M. <danix@danix.xyz>2026-04-22 12:43:22 +0200
commit5b476f8905f411768e23cb01d577a60e5a5fd725 (patch)
tree0a08cc83d809dbea714f52826e822501ee7c0165 /themes/danix-xyz-hacker/layouts/_default
parent082e9246ffe453031894d32d3cee9d5d1bf2b67a (diff)
downloaddanixxyz-5b476f8905f411768e23cb01d577a60e5a5fd725.tar.gz
danixxyz-5b476f8905f411768e23cb01d577a60e5a5fd725.zip
chore: extract theme into git submodule (danix2-hugo-theme)
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/_default')
-rw-r--r--themes/danix-xyz-hacker/layouts/_default/_markup/render-codeblock.html23
-rw-r--r--themes/danix-xyz-hacker/layouts/_default/_markup/render-heading.html5
-rw-r--r--themes/danix-xyz-hacker/layouts/_default/baseof.html130
-rw-r--r--themes/danix-xyz-hacker/layouts/_default/list.html39
-rw-r--r--themes/danix-xyz-hacker/layouts/_default/single.html54
5 files changed, 0 insertions, 251 deletions
diff --git a/themes/danix-xyz-hacker/layouts/_default/_markup/render-codeblock.html b/themes/danix-xyz-hacker/layouts/_default/_markup/render-codeblock.html
deleted file mode 100644
index 6f3e357..0000000
--- a/themes/danix-xyz-hacker/layouts/_default/_markup/render-codeblock.html
+++ /dev/null
@@ -1,23 +0,0 @@
-{{- $lang := .Type -}}
-{{- $hasLang := gt (len $lang) 0 -}}
-{{- $highlightLang := $lang -}}
-{{- if not $hasLang -}}{{- $highlightLang = "text" -}}{{- end -}}
-{{- $opts := dict "lineNos" true "lineNumbersInTable" true -}}
-
-<div class="code-block-wrapper not-prose">
- {{- if $hasLang -}}
- <div class="code-header" data-lang="{{ $lang }}">
- <span class="code-lang-label">{{ $lang }}</span>
- <div class="code-copy-wrapper">
- <span role="status" aria-live="polite" class="sr-only code-copy-status"></span>
- <button class="code-copy-btn" aria-label="Copy code" data-copy-target>
- <i data-feather="copy" class="icon-copy" aria-hidden="true"></i>
- <i data-feather="check" class="icon-check hidden" aria-hidden="true"></i>
- </button>
- </div>
- </div>
- {{- end -}}
- <div class="code-body">
-{{- highlight .Inner $highlightLang $opts -}}
- </div>
-</div>
diff --git a/themes/danix-xyz-hacker/layouts/_default/_markup/render-heading.html b/themes/danix-xyz-hacker/layouts/_default/_markup/render-heading.html
deleted file mode 100644
index d0d5e05..0000000
--- a/themes/danix-xyz-hacker/layouts/_default/_markup/render-heading.html
+++ /dev/null
@@ -1,5 +0,0 @@
-{{- if eq .Level 1 -}}
-<h1 id="{{ .Anchor }}">{{ .Text | safeHTML }}</h1>
-{{- else -}}
-<h{{ .Level }} id="{{ .Anchor }}"><span aria-hidden="true" class="heading-prefix">//</span> {{ .Text | safeHTML }}</h{{ .Level }}>
-{{- end -}}
diff --git a/themes/danix-xyz-hacker/layouts/_default/baseof.html b/themes/danix-xyz-hacker/layouts/_default/baseof.html
deleted file mode 100644
index 482006e..0000000
--- a/themes/danix-xyz-hacker/layouts/_default/baseof.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!DOCTYPE html>
-<html lang="{{ .Lang }}" class="theme-dark">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- {{ partial "head-meta.html" . }}
- <title>{{ .Title }}{{ if ne .Title .Site.Title }} — {{ .Site.Title }}{{ end }}</title>
-
- <!-- Favicon -->
- <link rel="icon" type="image/png" href="/images/fav.png">
-
- <!-- Fonts -->
- <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Oxanium:wght@400;600;700&display=swap" rel="stylesheet">
-
- <!-- Feather Icons -->
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.css">
-
- <!-- Tailwind CSS -->
- {{ $css := resources.Get "css/main.min.css" }}
- <link rel="stylesheet" href="{{ $css.RelPermalink }}">
-
- <!-- Syntax highlighting (Chroma) -->
- {{ $chroma := resources.Get "css/chroma-custom.css" | minify }}
- <link rel="stylesheet" href="{{ $chroma.RelPermalink }}">
-</head>
-<body class="bg-bg text-text antialiased" data-page-kind="{{ if .IsHome }}home{{ else }}other{{ end }}">
- <!-- Reading progress bar (only on single pages/articles) -->
- {{ if eq .Kind "page" }}
- <div
- id="reading-progress"
- class="fixed top-0 left-0 h-1 transition-all duration-100"
- style="width: 0%; background: linear-gradient(to right, var(--accent), var(--accent2)); z-index: 9999;"
- ></div>
- {{ partial "back-to-top.html" . }}
- {{ end }}
- <!-- Skip to main content link -->
- <a href="#main" class="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-accent focus:text-white focus:rounded">
- {{ i18n "skipToContent" }}
- </a>
-
- <!-- Dot grid background pattern -->
- <div class="fixed inset-0 pointer-events-none opacity-5 dot-grid" style="
- background-image: radial-gradient(circle, currentColor 1px, transparent 1px);
- background-size: 30px 30px;
- z-index: -1;
- "></div>
-
- <!-- Matrix rain canvas background -->
- <canvas id="matrix-rain" aria-hidden="true"></canvas>
-
- <!-- Theme toggle & language toggle (before Alpine loads to prevent flash) -->
- <script>
- (function() {
- const theme = localStorage.getItem('theme') || 'dark';
- const html = document.documentElement;
- html.classList.remove('theme-light', 'theme-dark');
- html.classList.add('theme-' + theme);
- })();
- </script>
-
- <!-- Navigation -->
- {{ partial "header.html" . }}
-
- <!-- Main content (spaced for fixed header) -->
- <main id="main" class="mt-20 relative z-10">
- {{ block "main" . }}{{ end }}
- </main>
-
- <!-- Footer -->
- {{ partial "footer.html" . }}
-
- <!-- Search modal (desktop and mobile) -->
- {{ partial "search-modal.html" . }}
-
- <!-- Alpine.js -->
- <script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
-
- <!-- Feather Icons initialization -->
- <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
- <script>feather.replace();</script>
-
- <!-- Theme toggle script -->
- {{ $themeScript := resources.Get "js/theme-toggle.js" | minify }}
- <script src="{{ $themeScript.RelPermalink }}"></script>
-
- <!-- Menu script -->
- {{ $menuScript := resources.Get "js/menu.js" | minify }}
- <script src="{{ $menuScript.RelPermalink }}"></script>
-
- <!-- Contact form script -->
- {{ $contactScript := resources.Get "js/contact-form.js" | minify }}
- <script src="{{ $contactScript.RelPermalink }}"></script>
-
- <!-- 404 Not Found page script -->
- {{ $notFoundScript := resources.Get "js/not-found-page.js" | minify }}
- <script src="{{ $notFoundScript.RelPermalink }}"></script>
-
- <!-- Reading progress bar script (on single pages/articles) -->
- {{ if eq .Kind "page" }}
- {{ $progressScript := resources.Get "js/reading-progress.js" | minify }}
- <script src="{{ $progressScript.RelPermalink }}"></script>
- {{ end }}
-
- <!-- Code block copy button -->
- {{ if eq .Kind "page" }}
- {{ $codeScript := resources.Get "js/code-copy.js" | minify }}
- <script src="{{ $codeScript.RelPermalink }}"></script>
- {{ end }}
-
- <!-- Matrix rain background effect -->
- {{ with resources.Get "js/matrix-rain.js" }}
- {{ $s := . | minify }}
- <script src="{{ $s.RelPermalink }}"></script>
- {{ end }}
-
- <!-- Search functionality script -->
- {{ $searchScript := resources.Get "js/search.js" | minify }}
- <script src="{{ $searchScript.RelPermalink }}"></script>
-
- <!-- Timeline lazy-reveal (scroll-triggered reveal animation) -->
- {{ if eq .Kind "section" }}
- {{ $lazyScript := resources.Get "js/article-lazy.js" | minify }}
- <script src="{{ $lazyScript.RelPermalink }}"></script>
- {{ end }}
-
- <!-- Tag cloud spiral layout -->
- {{ $tagCloudScript := resources.Get "js/tag-cloud-spiral.js" | minify }}
- <script src="{{ $tagCloudScript.RelPermalink }}"></script>
-</body>
-</html>
diff --git a/themes/danix-xyz-hacker/layouts/_default/list.html b/themes/danix-xyz-hacker/layouts/_default/list.html
deleted file mode 100644
index 09c0cbb..0000000
--- a/themes/danix-xyz-hacker/layouts/_default/list.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{{ define "main" }}
-<div class="mx-auto px-4 py-12 max-w-5xl">
- <h1 class="text-4xl md:text-5xl font-bold text-accent mb-12">
- {{ .Title }}
- </h1>
-
- {{ $pinned := where .Pages "Params.pinned" true }}
- {{ $unpinned := where .Pages "Params.pinned" false }}
- {{ if eq (len $unpinned) 0 }}
- {{ $unpinned = where .Pages "Params.pinned" nil }}
- {{ if eq (len $unpinned) 0 }}
- {{ $unpinned = where .Pages "Params.pinned" "" }}
- {{ end }}
- {{ end }}
-
- {{ $allPages := ($pinned | append $unpinned) }}
-
- {{ if eq (len $allPages) 0 }}
- <div class="py-12 text-center text-text-dim">
- {{ i18n "noRelated" }}
- </div>
- {{ else }}
- <ol class="timeline" aria-label="{{ .Title }}">
- {{ range $i, $page := (sort $pinned "Date" "desc") }}
- {{ $side := "left" }}
- {{ if eq (mod $i 2) 0 }}{{ $side = "left" }}{{ else }}{{ $side = "right" }}{{ end }}
- {{ partial "article-list-item.html" (dict "Page" $page "side" $side) }}
- {{ end }}
- {{ $offset := len $pinned }}
- {{ range $i, $page := (sort $unpinned "Date" "desc") }}
- {{ $idx := add $i $offset }}
- {{ $side := "left" }}
- {{ if eq (mod $idx 2) 0 }}{{ $side = "left" }}{{ else }}{{ $side = "right" }}{{ end }}
- {{ partial "article-list-item.html" (dict "Page" $page "side" $side) }}
- {{ end }}
- </ol>
- {{ end }}
-</div>
-{{ end }}
diff --git a/themes/danix-xyz-hacker/layouts/_default/single.html b/themes/danix-xyz-hacker/layouts/_default/single.html
deleted file mode 100644
index 7a1a069..0000000
--- a/themes/danix-xyz-hacker/layouts/_default/single.html
+++ /dev/null
@@ -1,54 +0,0 @@
-{{ define "main" }}
-<article class="mx-auto px-4 py-12 max-w-7xl">
- <div class="grid md:grid-cols-3 gap-8 content-grid">
- <!-- Article section -->
- <div class="md:col-span-2 min-w-0">
- <!-- Top article navigation (articles only) -->
- {{ if eq .Section "articles" }}
- {{ partial "article-nav.html" (dict "page" . "variant" "top") }}
- {{ end }}
-
- <!-- Breadcrumb -->
- {{ partial "breadcrumb.html" . }}
-
- <!-- Article header -->
- {{ partial "article-header.html" . }}
-
- <!-- Article content -->
- <div class="prose prose-invert max-w-none mb-12">
- {{ .Content }}
- </div>
-
- <!-- 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 (articles only) -->
- {{ if eq .Section "articles" }}
- {{ partial "article-nav.html" (dict "page" . "variant" "bottom") }}
- {{ end }}
- </div>
-
- <!-- Sidebar -->
- {{ partial "sidebar.html" . }}
- </div>
-</article>
-{{ end }}