diff options
Diffstat (limited to 'themes/danix-xyz-hacker/layouts')
7 files changed, 52 insertions, 30 deletions
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) --> |
