summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker
diff options
context:
space:
mode:
Diffstat (limited to 'themes/danix-xyz-hacker')
-rw-r--r--themes/danix-xyz-hacker/assets/css/main.css50
-rw-r--r--themes/danix-xyz-hacker/assets/css/main.min.css73
-rw-r--r--themes/danix-xyz-hacker/assets/js/language-switcher.js24
-rw-r--r--themes/danix-xyz-hacker/layouts/_default/baseof.html7
-rw-r--r--themes/danix-xyz-hacker/layouts/_default/single.html7
-rw-r--r--themes/danix-xyz-hacker/layouts/articles/single.html7
-rw-r--r--themes/danix-xyz-hacker/layouts/index.html20
-rw-r--r--themes/danix-xyz-hacker/layouts/is/list.html19
-rw-r--r--themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html15
-rw-r--r--themes/danix-xyz-hacker/layouts/partials/header.html7
10 files changed, 168 insertions, 61 deletions
diff --git a/themes/danix-xyz-hacker/assets/css/main.css b/themes/danix-xyz-hacker/assets/css/main.css
index 1421443..c66092b 100644
--- a/themes/danix-xyz-hacker/assets/css/main.css
+++ b/themes/danix-xyz-hacker/assets/css/main.css
@@ -26,7 +26,7 @@ html.theme-light {
--accent2: #10b981;
--accent-glow: rgba(147, 51, 234, 0.1);
--text: #1f2937;
- --text-dim: #6b7280;
+ --text-dim: #374151;
--muted: #d1d5db;
}
@@ -146,6 +146,54 @@ html.theme-light {
}
}
+/* Prose overrides for light theme */
+html.theme-light .prose,
+html.theme-light .prose-invert {
+ color: var(--text);
+}
+
+html.theme-light .prose a,
+html.theme-light .prose-invert a {
+ color: var(--accent);
+}
+
+html.theme-light .prose strong,
+html.theme-light .prose-invert strong {
+ color: var(--text);
+}
+
+html.theme-light .prose code,
+html.theme-light .prose-invert code {
+ color: var(--accent2);
+}
+
+html.theme-light .prose pre,
+html.theme-light .prose-invert pre {
+ background-color: var(--surface);
+ color: var(--text);
+}
+
+html.theme-light .prose h1,
+html.theme-light .prose h2,
+html.theme-light .prose h3,
+html.theme-light .prose h4,
+html.theme-light .prose h5,
+html.theme-light .prose h6,
+html.theme-light .prose-invert h1,
+html.theme-light .prose-invert h2,
+html.theme-light .prose-invert h3,
+html.theme-light .prose-invert h4,
+html.theme-light .prose-invert h5,
+html.theme-light .prose-invert h6 {
+ color: var(--text);
+}
+
+html.theme-light .prose blockquote,
+html.theme-light .prose-invert blockquote {
+ color: var(--text);
+ border-left-color: var(--accent);
+}
+
/* Responsive utilities */
@media (max-width: 768px) {
.sm\:container {
diff --git a/themes/danix-xyz-hacker/assets/css/main.min.css b/themes/danix-xyz-hacker/assets/css/main.min.css
index 5f38686..3ab93b7 100644
--- a/themes/danix-xyz-hacker/assets/css/main.min.css
+++ b/themes/danix-xyz-hacker/assets/css/main.min.css
@@ -1316,11 +1316,6 @@ button,
order: 9999;
}
-.mx-6 {
- margin-left: 1.5rem;
- margin-right: 1.5rem;
-}
-
.mx-auto {
margin-left: auto;
margin-right: auto;
@@ -1443,6 +1438,10 @@ button,
flex: 1 1 0%;
}
+.flex-shrink-0 {
+ flex-shrink: 0;
+}
+
.translate-x-full {
--tw-translate-x: 100%;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1697,6 +1696,11 @@ button,
line-height: 1.25rem;
}
+.text-xl {
+ font-size: 1.25rem;
+ line-height: 1.75rem;
+}
+
.text-xs {
font-size: 0.75rem;
line-height: 1rem;
@@ -1828,10 +1832,59 @@ html.theme-light {
--accent2: #10b981;
--accent-glow: rgba(147, 51, 234, 0.1);
--text: #1f2937;
- --text-dim: #6b7280;
+ --text-dim: #374151;
--muted: #d1d5db;
}
+/* Prose overrides for light theme */
+
+html.theme-light .prose,
+html.theme-light .prose-invert {
+ color: var(--text);
+}
+
+html.theme-light .prose a,
+html.theme-light .prose-invert a {
+ color: var(--accent);
+}
+
+html.theme-light .prose strong,
+html.theme-light .prose-invert strong {
+ color: var(--text);
+}
+
+html.theme-light .prose code,
+html.theme-light .prose-invert code {
+ color: var(--accent2);
+}
+
+html.theme-light .prose pre,
+html.theme-light .prose-invert pre {
+ background-color: var(--surface);
+ color: var(--text);
+}
+
+html.theme-light .prose h1,
+html.theme-light .prose h2,
+html.theme-light .prose h3,
+html.theme-light .prose h4,
+html.theme-light .prose h5,
+html.theme-light .prose h6,
+html.theme-light .prose-invert h1,
+html.theme-light .prose-invert h2,
+html.theme-light .prose-invert h3,
+html.theme-light .prose-invert h4,
+html.theme-light .prose-invert h5,
+html.theme-light .prose-invert h6 {
+ color: var(--text);
+}
+
+html.theme-light .prose blockquote,
+html.theme-light .prose-invert blockquote {
+ color: var(--text);
+ border-left-color: var(--accent);
+}
+
/* Responsive utilities */
@media (max-width: 768px) {
@@ -1868,6 +1921,10 @@ html.theme-light {
color: var(--accent);
}
+.hover\:opacity-80:hover {
+ opacity: 0.8;
+}
+
.hover\:opacity-90:hover {
opacity: 0.9;
}
@@ -1922,6 +1979,10 @@ html.theme-light {
grid-column: span 2 / span 2;
}
+ .md\:inline {
+ display: inline;
+ }
+
.md\:flex {
display: flex;
}
diff --git a/themes/danix-xyz-hacker/assets/js/language-switcher.js b/themes/danix-xyz-hacker/assets/js/language-switcher.js
deleted file mode 100644
index 3d8ffac..0000000
--- a/themes/danix-xyz-hacker/assets/js/language-switcher.js
+++ /dev/null
@@ -1,24 +0,0 @@
-document.addEventListener('DOMContentLoaded', function() {
- // Get all language switcher elements
- const langSwitchers = document.querySelectorAll('[data-lang-switch]');
-
- if (!langSwitchers || langSwitchers.length === 0) {
- return;
- }
-
- // Add click event listener to each language switcher
- langSwitchers.forEach(function(switcher) {
- switcher.addEventListener('click', function(e) {
- e.preventDefault();
-
- // Get the language code from the data attribute
- const langCode = this.getAttribute('data-lang-switch');
-
- // Store the language preference in localStorage
- localStorage.setItem('preferred-language', langCode);
-
- // Navigate to the language-specific URL
- window.location.href = this.href;
- });
- });
-});
diff --git a/themes/danix-xyz-hacker/layouts/_default/baseof.html b/themes/danix-xyz-hacker/layouts/_default/baseof.html
index 80137c1..f0a9283 100644
--- a/themes/danix-xyz-hacker/layouts/_default/baseof.html
+++ b/themes/danix-xyz-hacker/layouts/_default/baseof.html
@@ -10,6 +10,9 @@
<meta property="og:site_name" content="{{ .Site.Title }}">
<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">
@@ -68,10 +71,6 @@
{{ $menuScript := resources.Get "js/menu.js" | minify }}
<script src="{{ $menuScript.RelPermalink }}"></script>
- <!-- Language switcher script -->
- {{ $langScript := resources.Get "js/language-switcher.js" | minify }}
- <script src="{{ $langScript.RelPermalink }}"></script>
-
<!-- Contact form script -->
{{ $contactScript := resources.Get "js/contact-form.js" | minify }}
<script src="{{ $contactScript.RelPermalink }}"></script>
diff --git a/themes/danix-xyz-hacker/layouts/_default/single.html b/themes/danix-xyz-hacker/layouts/_default/single.html
index 9da9eaa..3269dec 100644
--- a/themes/danix-xyz-hacker/layouts/_default/single.html
+++ b/themes/danix-xyz-hacker/layouts/_default/single.html
@@ -16,9 +16,14 @@
<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="/tags/{{ . | urlize }}/"
+ 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"
>
{{ . }}
diff --git a/themes/danix-xyz-hacker/layouts/articles/single.html b/themes/danix-xyz-hacker/layouts/articles/single.html
index af51739..67e8a2f 100644
--- a/themes/danix-xyz-hacker/layouts/articles/single.html
+++ b/themes/danix-xyz-hacker/layouts/articles/single.html
@@ -16,9 +16,14 @@
<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="/tags/{{ . | urlize }}/"
+ 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"
>
{{ . }}
diff --git a/themes/danix-xyz-hacker/layouts/index.html b/themes/danix-xyz-hacker/layouts/index.html
index e9d2c39..ed151cb 100644
--- a/themes/danix-xyz-hacker/layouts/index.html
+++ b/themes/danix-xyz-hacker/layouts/index.html
@@ -1,6 +1,6 @@
{{ define "main" }}
<section class="min-h-[calc(100vh-200px)] flex items-center justify-center px-4 py-12">
- <div class="max-w-2xl w-full">
+ <div class="max-w-4xl w-full">
<!-- Profile Image (optional) -->
{{ if .Params.image }}
<div class="flex justify-center mb-8">
@@ -13,20 +13,28 @@
{{ end }}
<!-- Author Name -->
- <h1 class="text-4xl md:text-5xl font-bold text-accent text-center mb-4">
+<!-- <h1 class="text-4xl md:text-5xl font-bold text-accent text-center mb-4">
{{ .Site.Params.author }}
</h1>
-
+ -->
<!-- Bio (from page content) -->
- <div class="text-lg text-text-dim text-center mb-8 leading-relaxed prose prose-invert max-w-none">
+ <div class="text-xl text-text-dim text-center mb-8 leading-relaxed prose prose-invert max-w-none">
{{ .Content }}
</div>
<!-- Call-to-Action Buttons -->
<div class="flex flex-col sm:flex-row gap-4 justify-center">
+ {{ $lang := .Lang }}
+ {{ $articlesUrl := "/articles/" }}
+ {{ $contactUrl := "/is/here/" }}
+ {{ if eq $lang "it" }}
+ {{ $articlesUrl = "/it/articles/" }}
+ {{ $contactUrl = "/it/is/here/" }}
+ {{ end }}
+
<!-- Articles Button -->
<a
- href="/articles/"
+ href="{{ $articlesUrl }}"
class="px-8 py-3 bg-accent text-white rounded font-semibold hover:opacity-90 transition-opacity text-center"
>
{{ i18n "articles" }}
@@ -34,7 +42,7 @@
<!-- Contact Button -->
<a
- href="/is/here/"
+ href="{{ $contactUrl }}"
class="px-8 py-3 border-2 border-accent text-accent rounded font-semibold hover:bg-accent/10 transition-colors text-center"
>
{{ i18n "contact" }}
diff --git a/themes/danix-xyz-hacker/layouts/is/list.html b/themes/danix-xyz-hacker/layouts/is/list.html
new file mode 100644
index 0000000..7535a37
--- /dev/null
+++ b/themes/danix-xyz-hacker/layouts/is/list.html
@@ -0,0 +1,19 @@
+{{ define "main" }}
+<div class="mx-auto px-4 py-12">
+ <div class="grid md:grid-cols-3 gap-8">
+ <!-- Article section -->
+ <div class="md:col-span-2">
+ <!-- Article header -->
+ {{ partial "article-header.html" . }}
+
+ <!-- Article content -->
+ <div class="prose prose-invert max-w-none mb-12">
+ {{ .Content }}
+ </div>
+ </div>
+
+ <!-- Sidebar -->
+ {{ partial "sidebar.html" . }}
+ </div>
+</div>
+{{ end }}
diff --git a/themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html b/themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html
index ee80d20..bdcbca9 100644
--- a/themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html
+++ b/themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html
@@ -30,9 +30,6 @@
{{ end }}
</nav>
- <!-- Divider -->
- <div class="border-t border-border/30 mx-6"></div>
-
<!-- Language switcher -->
<div class="p-6">
<div class="text-sm text-text-dim mb-3">{{ i18n "language" }}</div>
@@ -55,7 +52,6 @@
{{ end }}
{{ end }}
<a
- data-lang-switch="{{ $langCode }}"
href="{{ $url }}"
class="flex-1 py-2 px-3 text-center rounded transition-colors {{ if $current }}bg-accent text-white{{ else }}bg-surface hover:bg-surface/80{{ end }}"
>
@@ -65,17 +61,6 @@
</div>
</div>
- <!-- Theme toggle -->
- <div class="p-6 border-t border-border/30">
- <button
- id="theme-toggle"
- @click="closeMenu()"
- class="w-full py-3 px-4 bg-surface hover:bg-surface/80 rounded flex items-center justify-center gap-2 transition-colors"
- >
- <i data-feather="moon" class="w-4 h-4"></i>
- <span>{{ i18n "toggleTheme" }}</span>
- </button>
- </div>
</div>
</div>
diff --git a/themes/danix-xyz-hacker/layouts/partials/header.html b/themes/danix-xyz-hacker/layouts/partials/header.html
index 3146775..2ddb2e3 100644
--- a/themes/danix-xyz-hacker/layouts/partials/header.html
+++ b/themes/danix-xyz-hacker/layouts/partials/header.html
@@ -1,8 +1,9 @@
<header class="sticky top-0 z-50 bg-bg2/92 backdrop-blur border-b border-border">
<nav class="container mx-auto px-4 py-4 flex items-center justify-between">
- <!-- Logo -->
- <a href="{{ .Site.BaseURL }}" class="font-bold text-lg text-accent font-oxanium">
- danix
+ <!-- Logo and Site Name -->
+ <a href="{{ .Site.BaseURL }}" class="flex items-center gap-2 hover:opacity-80 transition-opacity">
+ <img src="/images/lampD.png" alt="Logo" style="width: 40px; height: 40px; max-width: none;" class="flex-shrink-0">
+ <span class="hidden md:inline font-bold text-lg text-accent font-oxanium">danix.xyz</span>
</a>
<!-- Desktop menu (hidden on mobile) -->