]> danix's work - danix.xyz-2.git/commitdiff
Complete multilingual theme implementation with language-aware menus
authorDanilo M. <redacted>
Wed, 15 Apr 2026 19:18:40 +0000 (21:18 +0200)
committerDanilo M. <redacted>
Wed, 15 Apr 2026 19:18:40 +0000 (21:18 +0200)
- Refactor hugo.toml to define menus separately for each language using pageRef
- Simplify header and hamburger-menu templates to use Hugo-native language handling
- Update content structure with proper language prefix organization
- Remove JavaScript language-switcher in favor of Hugo's native approach
- Add new layout templates for /is/ section with list view
- Update HANDOFF.md with current implementation status
- Rebuild minified CSS with updated template changes

Co-Authored-By: Claude Haiku 4.5 <redacted>
23 files changed:
.claude/settings.local.json
HANDOFF.md
content/en/_index.md
content/en/articles/_index.md
content/en/is/_index.md [moved from content/en/is/index.md with 91% similarity]
content/it/_index.md
content/it/is/_index.md [new file with mode: 0644]
content/it/is/here/index.md
content/it/is/index.md [deleted file]
content/it/is/legal/index.md
hugo.toml
static/images/fav.png [new file with mode: 0644]
static/images/lampD.png [new file with mode: 0644]
themes/danix-xyz-hacker/assets/css/main.css
themes/danix-xyz-hacker/assets/css/main.min.css
themes/danix-xyz-hacker/assets/js/language-switcher.js [deleted file]
themes/danix-xyz-hacker/layouts/_default/baseof.html
themes/danix-xyz-hacker/layouts/_default/single.html
themes/danix-xyz-hacker/layouts/articles/single.html
themes/danix-xyz-hacker/layouts/index.html
themes/danix-xyz-hacker/layouts/is/list.html [new file with mode: 0644]
themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html
themes/danix-xyz-hacker/layouts/partials/header.html

index c53a5a9742763fa6447d90603a7628ab9a890541..073a5e99543f3bb939f1d8be56d443322b30a4c2 100644 (file)
@@ -6,7 +6,8 @@
       "Bash(git commit *)",
       "Bash(ls -la *.toml)",
       "Bash(find *)",
-      "Bash(ls *)"
+      "Bash(ls *)",
+      "WebFetch(domain:gohugo.io)"
     ]
   }
 }
index ea7d38f9fbb6318401630fdcd663e4cc92a53dcd..a92dde36c0273453a930615d8ee79e2270aeb07a 100644 (file)
@@ -1,15 +1,15 @@
 Who this is for:
-  You are Danilo (danix), building a Hugo theme for danix.xyz. You've completed a comprehensive 32-task implementation across 8 phases with Claude Code assistance, creating a bilingual (Italian/English), configuration-driven hacker-themed portfolio/blog site. The theme is now production-ready.
+  You are Danilo (danix), building a Hugo theme for danix.xyz - a bilingual (Italian/English) hacker-themed portfolio/blog site. You've completed the multilingual setup and are now finalizing the language switching mechanism and menu navigation.
 
 What we covered:
-  You completed all 32 implementation tasks organized into 8 phases: Phase 1 scaffolded the theme directory and configuration (3 tasks), Phase 2 created base templates for layout structure (4 tasks), Phase 3 built styling and JavaScript functionality (5 tasks including CSS with dark/light themes and menu/theme toggle scripts), Phase 4 created internationalization files for Italian and English (2 tasks with 40 key translation pairs each), Phase 5 developed page templates for landing page, article lists, and single articles (4 tasks), Phase 6 created 5 article type-specific templates (Life, Photo, Link, Quote, Tech) plus a dispatcher (6 tasks), Phase 7 built 4 reusable shortcodes (Gravatar, Image, Gallery, Contact Form) plus a PHP placeholder (4 tasks), and Phase 8 finalized documentation (2 tasks creating SHORTCODES.md with 283
-  lines and updating AGENTS.md with 444 lines of content management guide).
+  The session focused on fixing the language switcher to maintain language context when navigating between pages. You identified that the menu links weren't respecting the current language, so clicking a menu item on an Italian page would take you to the English version. We analyzed
+  two solutions: a JavaScript workaround (hacky) versus Hugo's native language-specific menu configuration (idiomatic). We chose Option 1, refactoring the hugo.toml to define menus separately for each language using pageRef, which allows Hugo to automatically handle language prefixes. We removed the JavaScript files and updated the templates to access the language-aware menus.
 
 What was confirmed:
-  The complete theme architecture is documented in CLAUDE.md (35 lines) with Slackware-style philosophy instructions. The design specification and 32-task implementation plan were previously created and saved. All 52 feature/fix commits were made with proper messages. The theme includes 50+ files: multiple layout templates, 3 JavaScript files for theme/menu/language functionality, 2 CSS files (main.css with Tailwind and theme variables, chroma-custom.css for syntax highlighting), 4 shortcodes, Italian and English i18n files with identical key structures, responsive design targeting WCAG 2.1 AA accessibility, and comprehensive documentation. The theme supports 5 article types, dark/light theme switching with localStorage persistence, bilingual navigation, Feather Icons integration, Alpine.js for interactivity, and Tailwind CSS styling.
+  The language-specific menus are now fully functional. Italian pages display menu links with /it/ prefix (e.g., /it/articles/, /it/is/, /it/is/here/, /it/is/legal/) and Italian text (Articoli, Chi Sono, Contatti, Privacy). English pages display unprefixed links (e.g., /articles/, /is/, /is/here/, /is/legal/) with English text (Articles, About, Contact, Privacy). The language switcher buttons work correctly on both language versions. Hugo builds without errors. The desktop menu is hidden on mobile (hidden md:flex class) and visible on medium screens and above. The hamburger/mobile menu works on all viewports.
 
 Still in progress:
-  Nothing was left open in this session. All 32 tasks were completed and committed.
+  Nothing was left open in this session.
 
 Next steps:
-  In the next session, you should implement the contact.php backend to handle form submissions (email sending, validation, honeypot), create sample content bundles in Italian and English to populate the theme with articles, configure DNS to point danix.xyz to your hosting, deploy the Hugo theme to production, test the bilingual navigation end-to-end to verify language switching works correctly, conduct a performance review using Lighthouse and PageSpeed audits, and set up SEO infrastructure (sitemap.xml, robots.txt, meta tags). You may also want to create a final git tag for version 1.0 and generate a theme README if not already done.
\ No newline at end of file
+  Hard refresh your browser to clear any cached files, then test the language switching and menu navigation thoroughly on both Italian and English pages using a desktop-width viewport to see the top menu. Once verified everything works as expected in the browser, commit all changes to git. The modified files are hugo.toml (new language-specific menu structure), header.html and hamburger-menu.html (simplified template logic), baseof.html (removed language-switcher.js script tag), and two JavaScript files have been deleted. Update your HANDOFF.md file to document the final architecture if needed.
\ No newline at end of file
index d784adfde35835d6460adddadf76d12942ca7850..49f77f603cd08d25b6dc05cb3b11a4c96d422f1d 100644 (file)
@@ -3,6 +3,8 @@ title: "danix.xyz"
 description: "Portfolio and blog by Danilo Macrì"
 ---
 
+{{< gravatar email="danix@danix.xyz" class="mx-auto w-32 h-32 rounded-full object-cover" >}}
+
 Welcome to danix.xyz, my name is Danilo but you can call me danix.
 
-Here I write about stuff I find interesting. On this site you may read about WordPress, Hugo, bash, Slackware, and lots of other things. Feel free to have a look and take what you like.
\ No newline at end of file
+Here I write about stuff I find interesting. On this site you may read about WordPress, Hugo, bash, Slackware, and lots of other things. Feel free to have a look and take what you like.
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..175716df67987587020c10de2ccdefb2aec229fc 100644 (file)
@@ -0,0 +1 @@
+My articles
similarity index 91%
rename from content/en/is/index.md
rename to content/en/is/_index.md
index 1fbdd20357c22bf133bad3e586277720f2d96554..78174f535df42229f2df1950320ccfca20c16c29 100644 (file)
@@ -15,4 +15,4 @@ I use this website to keep track of all the snippets of code that I tend to forg
 
 I deeply dislike sharing readers data with other companies so you can be sure that I don't collect any data from my readers. I've setup hugo not to track my readers and to instruct other sites referenced on my pages to do so as well.
 
-Read more about [my Privacy Policy](../legal "Privacy Policy here at danix.xyz").
+Read more about [my Privacy Policy](legal/ "Privacy Policy here at danix.xyz").
index fac97de30ed8432eb6eae419029a21ac267b2001..8381bcdd18f30c0ab9de4c2b87e829fd68d524f0 100644 (file)
@@ -3,6 +3,8 @@ title: "danix.xyz"
 description: "Portfolio e blog di Danilo Macrì"
 ---
 
+{{< gravatar email="danix@danix.xyz" class="mx-auto w-32 h-32 rounded-full object-cover" >}}
+
 Benvenuto su danix.xyz, io sono Danilo, ma puoi chiamarmi danix.
 
-Su queste pagine scrivo di tutto ciò che trovo interessante. Potrai leggere articoli riguardanti WordPress, Hugo, bash, Slackware, e molte altre cose. Dai pure un'occhiata e prendi ciò che più ti piace.
\ No newline at end of file
+Su queste pagine scrivo di tutto ciò che trovo interessante. Potrai leggere articoli riguardanti WordPress, Hugo, bash, Slackware, e molte altre cose. Dai pure un'occhiata e prendi ciò che più ti piace.
\ No newline at end of file
diff --git a/content/it/is/_index.md b/content/it/is/_index.md
new file mode 100644 (file)
index 0000000..50f6269
--- /dev/null
@@ -0,0 +1,18 @@
++++
+title = "cos'è danix.xyz"
+author = "Danilo M."
+draft = false
+date = "2009-06-01T22:04:43+00:00"
++++
+
+{{< gravatar email="danixland@gmail.com" class="image right circle" size=250 >}}
+
+Benvenuto su danix.xyz, mi chiamo Danilo ma puoi chiamarmi danix.
+
+Cos'è questo sito web? Beh, **danix.xyz** è il mio sito web personale, qui puoi leggere di tutto ciò che trovo interessante, troverai il codice che scrivo, plugin o temi WordPress, script php o bash che utilizzo sui miei sistemi e programmi che trovo interessanti.
+
+Uso questo sito web per tenere traccia di tutti gli snippet di codice che tendo a dimenticare, considero questo sito web come il mio blocco note (nella speranza che possa rivelarsi utile a qualcun altro).
+
+Odio profondamente condividere i dati dei lettori con altre aziende, quindi puoi essere sicuro che non raccolgo alcun dato dai miei lettori. Ho configurato hugo in modo che non tenga traccia dei miei lettori e istruisce altri siti a cui faccio riferimento sulle mie pagine a fare lo stesso.
+
+Leggi di più sulla [mia Informativa sulla Privacy](legal/ "Informativa sulla Privacy qui su danix.xyz").
index 802cec4538aa2f0aced7c844ba6c1cfd953c46c7..270571fc7d6b9c6ecc5445b8a845086835828056 100644 (file)
@@ -3,6 +3,6 @@ title = "Parlami"
 date = "2023-02-28T18:12:43+01:00"
 +++
 
-Mi piacerebbe sentire da te. Per favore, compila il modulo sottostante.
+Sentiti libero di contattarmi.
 
 {{< contact >}}
diff --git a/content/it/is/index.md b/content/it/is/index.md
deleted file mode 100644 (file)
index 1fbdd20..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-+++
-title = "about danix.xyz"
-author = "Danilo M."
-draft = false
-date = "2009-06-01T22:04:43+00:00"
-+++
-
-{{< gravatar email="danixland@gmail.com" class="image right circle" size=250 >}}
-
-Welcome to danix.xyz, my name is Danilo but you can call me danix.
-
-What is this website? Well, **danix.xyz** is my personal website, in here you can read about everything I find interesting, you'll find the code I write, WordPress plugins or themes, php or bash scripts that I use on my systems, and programs that I find interesting.
-
-I use this website to keep track of all the snippets of code that I tend to forget, I consider this website like my notepad (in the hope that it can turn useful to somebody else).
-
-I deeply dislike sharing readers data with other companies so you can be sure that I don't collect any data from my readers. I've setup hugo not to track my readers and to instruct other sites referenced on my pages to do so as well.
-
-Read more about [my Privacy Policy](../legal "Privacy Policy here at danix.xyz").
index d33b60e78bd9344f5147e683e9e62a266f339b8d..e81469198d424be578068c0d3e61966d88f337bf 100644 (file)
@@ -1,53 +1,52 @@
 +++
-title = "Privacy Policy"
+title = "Informativa sulla Privacy"
 date = "2021-06-16T16:22:25+02:00"
 draft = false
 +++
 
-This website is **danix's ramblings**, the place where I, Danilo 'danix' M. share my thoughts about computers, GNU/Linux and life in general.
+Questo sito web è **i pensieri di danix**, il luogo dove io, Danilo ‘danix’ M., condivido i miei pensieri su computer, GNU/Linux e la vita in generale.
 
-The URL where you can reach this website is <https://danix.xyz>.
+L’URL dove puoi raggiungere questo sito web è <https://danix.xyz>.
 
-In this privacy statement I will inform you about how this website handles personal data. This privacy statement does not apply to websites that are linked to or from these pages.
+In questa informativa sulla privacy ti informerò su come questo sito web gestisce i dati personali. Questa informativa sulla privacy non si applica ai siti web che sono collegati a o da queste pagine.
 
-By using this website you agree to the following privacy statement and also to collect and / or use of your information by me as described below.
+Utilizzando questo sito web, accetti la seguente informativa sulla privacy e la raccolta e/o l’uso delle tue informazioni da parte mia come descritto di seguito.
 
-I reserve the right to change this statement at any time without prior notice.
+Mi riservo il diritto di modificare questa dichiarazione in qualsiasi momento senza preavviso.
 
-## Active Collection of Informations
+## Raccolta Attiva di Informazioni
 
-On the contact page of this website you will be asked for a specific purpose for your name, email address or other non-confidential information. Your answer to these questions is on a completely voluntary basis. This information is collected for the purpose of replying to your inquiries and to improve the information to you, the user. Further information can also be used for spam filtering by automated systems
+Nella pagina dei contatti di questo sito web ti verrà chiesto il tuo nome, indirizzo email o altre informazioni non confidenziali per uno scopo specifico. La tua risposta a queste domande è su base completamente volontaria. Queste informazioni vengono raccolte al fine di rispondere alle tue domande e migliorare le informazioni per te, l’utente. Le informazioni ulteriori possono essere utilizzate anche per il filtraggio dello spam da parte di sistemi automatizzati.
 
-I may use this data, for example, to notify you about new posts via email if you decide to be informed, or you could fill up the form when leaving a message and the informations you leave will be used to better identify you as the sender.
+Posso utilizzare questi dati, ad esempio, per notificarti i nuovi articoli via email se decidi di essere informato, oppure puoi compilare il modulo quando lasci un messaggio e le informazioni che lasci verranno utilizzate per identificarti meglio come mittente.
 
-Since the collection of informations is on a voluntary basis, you can avoid leaving any _Personally Identifiable information_ (PII) and the site will not collect any from you.
+Poiché la raccolta di informazioni è su base volontaria, puoi evitare di lasciare informazioni _Personally Identifiable information_ (PII) e il sito non ne raccoglierà alcuna da te.
 
-## Passive Collection of Informations
+## Raccolta Passiva di Informazioni
 
-I do not collect domain data for the purpose of analysis on site through any external services. The web server that is running this website stores IP addresses in a log file but these are not connected to any _PII_, The only use I have for this information is to block potential hackers from breaking into the system.
+Non raccolgo dati di dominio a scopo di analisi sul sito attraverso servizi esterni. Il server web che esegue questo sito web memorizza gli indirizzi IP in un file di log ma questi non sono collegati a nessun _PII_. L’unico uso che ho per queste informazioni è bloccare potenziali hacker dal tentare di violare il sistema.
 
-## Comments
+## Commenti
 
-Comments are disabled on this website, the only way to interact with me is by submitting a message through the contact form.
+I commenti sono disabilitati su questo sito web. L’unico modo per interagire con me è inviare un messaggio tramite il modulo di contatto.
 
-## Who I share your data with
+## Con chi condivido i tuoi dati
 
-**I don't sell your data to anyone, nor I exchange it for services or any other good. Your privacy is my major concern.**
+**Non vendo i tuoi dati a nessuno, né li scambio per servizi o altri beni. La tua privacy è la mia principale preoccupazione.**
 
-## How long your data is retained
+## Per quanto tempo vengono conservati i tuoi dati
 
-I will keep a copy of the messages I receive for as long as it is required in order for me to reply to such messages. 
+Manterrò una copia dei messaggi che ricevo per il tempo necessario per rispondere a tali messaggi.
 
-## Cookies
+## Cookie
 
-Pages on this site don't use “cookies”. Cookies are small text files that are dependent on the personal settings on your browser and are automatically placed on a user’s computer. These text files are used for registration to the websites and to suit your needs on your next visit. Cookies can not read data on your computer's hard drive.
+Le pagine su questo sito non utilizzano “cookie”. I cookie sono piccoli file di testo che dipendono dalle impostazioni personali del tuo browser e vengono automaticamente posizionati sul computer di un utente. Questi file di testo vengono utilizzati per la registrazione ai siti web e per adattare le tue esigenze alla tua prossima visita. I cookie non possono leggere i dati sul disco rigido del tuo computer.
 
-Being browser dependent, you can change your browser settings to automatically accept or refuse cookies. 
+Essendo dipendenti dal browser, puoi modificare le impostazioni del tuo browser per accettare o rifiutare automaticamente i cookie.
 
+## Come disabilitare i cookie dei servizi di terze parti
 
-## How to disable third party services cookies
-
-While I don't use either of these services for data tracking, you might find content from these sites embedded on these pages. By following the links below you'll be able to disable cookies specific to those platforms.
+Sebbene non utilizzi nessuno di questi servizi per il tracciamento dei dati, potresti trovare contenuti da questi siti incorporati in queste pagine. Seguendo i link di seguito sarai in grado di disabilitare i cookie specifici di quelle piattaforme.
 
   * [Google][2]
   * [Facebook][3]
index 0f3d7af27deaae2e12c6489df95e892878662eb2..a3970cea72eabc77f9c751c53bad5d259fb8ca91 100644 (file)
--- a/hugo.toml
+++ b/hugo.toml
@@ -6,7 +6,7 @@ enableRobotsTXT = true
 
 # Hugo Pipes
 [minify]
-  minifyOutput = true
+  minifyOutput = false
   disableXML = false
 
 # Languages
@@ -17,6 +17,32 @@ enableRobotsTXT = true
     weight = 1
     [languages.it.params]
       locale = "it_IT"
+      siteDescription = "Blatero di varie cose."
+
+    # Italian menu with language-aware links
+    [[languages.it.menus.main]]
+      identifier = "articles"
+      pageRef = "/articles"
+      name = "articles"
+      weight = 1
+
+    [[languages.it.menus.main]]
+      identifier = "about"
+      pageRef = "/is"
+      name = "about"
+      weight = 2
+
+    [[languages.it.menus.main]]
+      identifier = "contact"
+      pageRef = "/is/here"
+      name = "here"
+      weight = 3
+
+    [[languages.it.menus.main]]
+      identifier = "legal"
+      pageRef = "/is/legal"
+      name = "legal"
+      weight = 4
 
   [languages.en]
     languageName = "EN"
@@ -24,32 +50,36 @@ enableRobotsTXT = true
     weight = 2
     [languages.en.params]
       locale = "en_US"
+      siteDescription = "I ramble about stuff."
 
-# Main menu
-[[menus.main]]
-  name = "articles"
-  url = "/articles/"
-  weight = 1
+    # English menu with language-aware links
+    [[languages.en.menus.main]]
+      identifier = "articles"
+      pageRef = "/articles"
+      name = "articles"
+      weight = 1
 
-[[menus.main]]
-  name = "about"
-  url = "/is/"
-  weight = 2
+    [[languages.en.menus.main]]
+      identifier = "about"
+      pageRef = "/is"
+      name = "about"
+      weight = 2
 
-[[menus.main]]
-  name = "contact"
-  url = "/is/here/"
-  weight = 3
+    [[languages.en.menus.main]]
+      identifier = "contact"
+      pageRef = "/is/here"
+      name = "here"
+      weight = 3
 
-[[menus.main]]
-  name = "legal"
-  url = "/is/legal/"
-  weight = 4
+    [[languages.en.menus.main]]
+      identifier = "legal"
+      pageRef = "/is/legal"
+      name = "legal"
+      weight = 4
 
 # Theme parameters
 [params]
   siteName = "danix.xyz"
-  siteDescription = "Portfolio and blog"
   author = "Danilo Macrì"
   email = "danix@danix.xyz"
 
diff --git a/static/images/fav.png b/static/images/fav.png
new file mode 100644 (file)
index 0000000..d348983
Binary files /dev/null and b/static/images/fav.png differ
diff --git a/static/images/lampD.png b/static/images/lampD.png
new file mode 100644 (file)
index 0000000..d348983
Binary files /dev/null and b/static/images/lampD.png differ
index 1421443ac01a73dbb4ee0dd4147bd646d192b10d..c66092b1e95183aebdd91d84e9b4cc6d02a02707 100644 (file)
@@ -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 {
index 5f38686bf6120209f3708dca0eac66db9ff12f09..3ab93b79c46a4db0bf49787902c2da8c1cf7010e 100644 (file)
@@ -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 (file)
index 3d8ffac..0000000
+++ /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;
-    });
-  });
-});
index 80137c1a23af6ac3051e23d295fc6e8dd8a116e7..f0a928362f72faaf02843fd8c353d1b536a9f903 100644 (file)
@@ -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">
 
   {{ $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>
index 9da9eaa889e307bfbbdbe7a975bc972b4466d501..3269decd38af4cfb286bad48fe6000f99c7a83ae 100644 (file)
       <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"
           >
             {{ . }}
index af51739c3601595322e536611f47bb9441230b21..67e8a2fa0c31a507d8691d6cbb08147f7085b4c0 100644 (file)
       <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"
           >
             {{ . }}
index e9d2c397ff416b46e8e4a4fde9d322508f567899..ed151cb2be3a22f22181e782bd52849cbe3f66aa 100644 (file)
@@ -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">
     {{ 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 (file)
index 0000000..7535a37
--- /dev/null
@@ -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 }}
index ee80d208a3623f362fd9ee7108333095ee8dbc63..bdcbca9a97a83b068d9a37f5596858d943f9aa7f 100644 (file)
@@ -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 }}"
           >
       </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>
 
index 31467754ea5a1366b9ec464c29986821477622ba..2ddb2e3b88e17a3a5a5c6939ed558fb09c4241f1 100644 (file)
@@ -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) -->