From 5b476f8905f411768e23cb01d577a60e5a5fd725 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 22 Apr 2026 12:43:22 +0200 Subject: chore: extract theme into git submodule (danix2-hugo-theme) --- .../layouts/partials/article-card.html | 92 --------- .../layouts/partials/article-header.html | 71 ------- .../layouts/partials/article-list-item.html | 95 --------- .../layouts/partials/article-nav.html | 46 ----- .../layouts/partials/article-types/life.html | 3 - .../layouts/partials/article-types/link.html | 17 -- .../layouts/partials/article-types/photo.html | 19 -- .../layouts/partials/article-types/quote.html | 15 -- .../layouts/partials/article-types/tech.html | 3 - .../layouts/partials/back-to-top.html | 23 --- .../layouts/partials/breadcrumb-jsonld.html | 36 ---- .../layouts/partials/breadcrumb.html | 16 -- .../danix-xyz-hacker/layouts/partials/footer.html | 89 --------- .../layouts/partials/form-components.html | 219 --------------------- .../layouts/partials/hamburger-menu.html | 125 ------------ .../layouts/partials/head-meta.html | 57 ------ .../danix-xyz-hacker/layouts/partials/header.html | 94 --------- .../layouts/partials/search-modal.html | 87 -------- .../danix-xyz-hacker/layouts/partials/sidebar.html | 54 ----- .../layouts/partials/social-share.html | 123 ------------ .../layouts/partials/tag-cloud.html | 90 --------- .../layouts/partials/toast-container.html | 13 -- 22 files changed, 1387 deletions(-) delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-card.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-header.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-list-item.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-nav.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-types/life.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-types/link.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-types/photo.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-types/quote.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/article-types/tech.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/back-to-top.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/breadcrumb.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/footer.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/form-components.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/head-meta.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/header.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/search-modal.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/sidebar.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/social-share.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/tag-cloud.html delete mode 100644 themes/danix-xyz-hacker/layouts/partials/toast-container.html (limited to 'themes/danix-xyz-hacker/layouts/partials') diff --git a/themes/danix-xyz-hacker/layouts/partials/article-card.html b/themes/danix-xyz-hacker/layouts/partials/article-card.html deleted file mode 100644 index d803464..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-card.html +++ /dev/null @@ -1,92 +0,0 @@ -{{ $articleType := .Params.type | default "life" }} -{{ $typeConfig := .Site.Params.articleTypes }} -{{ $typeData := index $typeConfig $articleType }} -{{ $excerpt := .Description | default .Summary }} - -{{ $imageURL := "" }} -{{ $useDefaultThumbnail := false }} -{{ if .Params.image }} - {{ $resource := .Resources.GetMatch .Params.image }} - {{ if $resource }} - {{ $imageURL = $resource.RelPermalink }} - {{ else }} - {{ $imageURL = .Params.image }} - {{ end }} -{{ else }} - {{ $useDefaultThumbnail = true }} -{{ end }} - -
- - {{ if or $imageURL $useDefaultThumbnail }} - - {{ if $useDefaultThumbnail }} - - - {{ .Title }} - - {{ else }} - {{ .Title }} - {{ end }} - - {{ if $typeData }} -
- {{ i18n $articleType }} -
- {{ end }} -
- {{ end }} - - -
- - {{ if .Params.pinned }} -
- ๐Ÿ“Œ PINNED -
- {{ end }} - - -

- - {{ .Title }} - -

- - -
- -
- - - {{ if $excerpt }} -

- {{ $excerpt | plainify }} -

- {{ end }} - - - - {{ i18n "readMore" }} - - -
-
diff --git a/themes/danix-xyz-hacker/layouts/partials/article-header.html b/themes/danix-xyz-hacker/layouts/partials/article-header.html deleted file mode 100644 index 94c78a5..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-header.html +++ /dev/null @@ -1,71 +0,0 @@ -{{ $articleType := .Params.type | default "life" }} -{{ $typeConfig := .Site.Params.articleTypes }} -{{ $typeData := index $typeConfig $articleType }} -{{ $hasType := .Params.type }} - -
- -
- - {{ if and $typeData $hasType }} -
- {{ end }} - - - {{ if and $typeData $hasType }} -
- {{ end }} - -

- {{ .Title }} -

-
- - -
- - {{ if .PublishDate }} -
- - -
- {{ end }} - - - {{ if .Lastmod }} - {{ $lastmodDate := .Lastmod.Format "2006-01-02" }} - {{ $pubDate := .PublishDate.Format "2006-01-02" }} - {{ if ne $lastmodDate $pubDate }} -
- - -
- {{ end }} - {{ end }} - - - {{ if .Site.Params.readingTime }} -
- - {{ .ReadingTime }} {{ i18n "min" }} {{ i18n "readingTime" }} -
- {{ end }} - - - {{ if and $typeData $hasType }} - - {{ i18n $articleType }} - - {{ end }} -
-
diff --git a/themes/danix-xyz-hacker/layouts/partials/article-list-item.html b/themes/danix-xyz-hacker/layouts/partials/article-list-item.html deleted file mode 100644 index 44cbf32..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-list-item.html +++ /dev/null @@ -1,95 +0,0 @@ -{{/* Handle both calling conventions: dict with .Page/.side or direct page */}} -{{ $page := . }} -{{ $side := "left" }} - -{{ if reflect.IsMap . }} - {{ $page = .Page }} - {{ $side = .side | default "left" }} -{{ end }} - -{{ $articleType := $page.Params.type | default "life" }} -{{ $typeConfig := $page.Site.Params.articleTypes }} -{{ $typeData := index $typeConfig $articleType }} -{{ $excerpt := $page.Description | default $page.Summary }} - -{{ $imageURL := "" }} -{{ $useDefaultThumbnail := false }} -{{ if $page.Params.image }} - {{ $resource := $page.Resources.GetMatch $page.Params.image }} - {{ if $resource }} - {{ $imageURL = $resource.RelPermalink }} - {{ else }} - {{ $imageURL = $page.Params.image }} - {{ end }} -{{ else }} - {{ $useDefaultThumbnail = true }} -{{ end }} - -
  • - {{/* Decorative connector line */}} - - - {{/* Node on spine */}} - - -
    - - {{/* Thumbnail */}} - - - {{/* Text body */}} -
    - - {{/* Pinned badge */}} - {{ if $page.Params.pinned }} -
    - ๐Ÿ“Œ {{ i18n "pinned" | default "PINNED" }} -
    - {{ end }} - - {{/* Type + date meta row */}} -
    - {{ i18n $articleType | upper }} - - -
    - - {{/* Title */}} -

    - {{ $page.Title }} -

    - - {{/* Excerpt */}} - {{ if $excerpt }} -

    {{ $excerpt | plainify }}

    - {{ end }} - - {{/* CTA */}} - - {{ i18n "readMore" }} - - - -
    -
    -
  • diff --git a/themes/danix-xyz-hacker/layouts/partials/article-nav.html b/themes/danix-xyz-hacker/layouts/partials/article-nav.html deleted file mode 100644 index 8a118b3..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-nav.html +++ /dev/null @@ -1,46 +0,0 @@ -{{ $page := .page }} -{{ $variant := .variant | default "bottom" }} -{{ $prev := $page.PrevInSection }} -{{ $next := $page.NextInSection }} - -{{/* Shell prompt command varies by position */}} -{{ $cmd := "ls ../" }} -{{ if eq $variant "top" }} - {{ $cmd = "cd" }} -{{ end }} - - diff --git a/themes/danix-xyz-hacker/layouts/partials/article-types/life.html b/themes/danix-xyz-hacker/layouts/partials/article-types/life.html deleted file mode 100644 index 01cd8b8..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-types/life.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - {{ .Content }} -
    diff --git a/themes/danix-xyz-hacker/layouts/partials/article-types/link.html b/themes/danix-xyz-hacker/layouts/partials/article-types/link.html deleted file mode 100644 index bbf7906..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-types/link.html +++ /dev/null @@ -1,17 +0,0 @@ -
    - - {{ .Params.link_title | default (i18n "readMore") }} - - - - -
    - -
    - {{ .Content }} -
    diff --git a/themes/danix-xyz-hacker/layouts/partials/article-types/photo.html b/themes/danix-xyz-hacker/layouts/partials/article-types/photo.html deleted file mode 100644 index 743e02a..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-types/photo.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ if .Params.featured_image }} -
    - {{ .Title }} - {{ if .Params.featured_image_caption }} -
    - {{ .Params.featured_image_caption }} -
    - {{ end }} -
    -{{ end }} - -
    - {{ .Content }} -
    diff --git a/themes/danix-xyz-hacker/layouts/partials/article-types/quote.html b/themes/danix-xyz-hacker/layouts/partials/article-types/quote.html deleted file mode 100644 index f27d189..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-types/quote.html +++ /dev/null @@ -1,15 +0,0 @@ -
    - "{{ .Params.quote_text }}" -
    - -{{ if .Params.quote_author }} -
    - โ€” {{ .Params.quote_author }} -
    -{{ end }} - -{{ if .Content }} -
    - {{ .Content }} -
    -{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/partials/article-types/tech.html b/themes/danix-xyz-hacker/layouts/partials/article-types/tech.html deleted file mode 100644 index 01cd8b8..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/article-types/tech.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - {{ .Content }} -
    diff --git a/themes/danix-xyz-hacker/layouts/partials/back-to-top.html b/themes/danix-xyz-hacker/layouts/partials/back-to-top.html deleted file mode 100644 index 75095e3..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/back-to-top.html +++ /dev/null @@ -1,23 +0,0 @@ -
    - -
    diff --git a/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html b/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html deleted file mode 100644 index 95b5e69..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html +++ /dev/null @@ -1,36 +0,0 @@ -{{- $homeURL := absURL "/" -}} -{{- $homeName := i18n "home" -}} -{{- if eq .Lang "it" -}} - {{- $homeURL = absURL "/it/" -}} -{{- end -}} - diff --git a/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html b/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html deleted file mode 100644 index c15dfeb..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html +++ /dev/null @@ -1,16 +0,0 @@ -{{ $homeLink := "/" }} -{{ if eq .Lang "it" }} - {{ $homeLink = "/it/" }} -{{ end }} - - diff --git a/themes/danix-xyz-hacker/layouts/partials/footer.html b/themes/danix-xyz-hacker/layouts/partials/footer.html deleted file mode 100644 index 1e50d6f..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/footer.html +++ /dev/null @@ -1,89 +0,0 @@ -{{- $quotes := .Site.Data.quotes.quotes -}} - - diff --git a/themes/danix-xyz-hacker/layouts/partials/form-components.html b/themes/danix-xyz-hacker/layouts/partials/form-components.html deleted file mode 100644 index 6c6416b..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/form-components.html +++ /dev/null @@ -1,219 +0,0 @@ -{{ define "form-components" }} - - - -
    -

    Form Components

    - - -
    - - -
    - - -
    - - -
    {{ i18n "form_invalid_email" }}
    -
    - - -
    - - -
    {{ i18n "form_password_help" | default "Must be at least 8 characters" }}
    -
    - - -
    - - -
    - - - -
    - - -
    - - - -
    - - -
    - - - -
    - -
    - - -
    -

    {{ i18n "form_select_interests" | default "Select your interests" }}

    - - -
    - - - -
    -

    {{ i18n "form_select_preference" | default "Select a preference" }}

    - - -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - - -
    -
    - - -
    - -
    - - - -
    -

    Modal Examples

    - - - -
    - - - -
    -

    Notifications

    - - - - -
    - -
    - - - - - - - - - - - - - -{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html b/themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html deleted file mode 100644 index 5d8d8ed..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/hamburger-menu.html +++ /dev/null @@ -1,125 +0,0 @@ - -
    -
    - -
    - Menu - -
    - - - - - -
    - - - - -
    - -
    - - -
    - {{ i18n "noSearchResults" }} -
    -
    - - -
    -
    {{ i18n "language" }}
    -
    - {{ $currentLang := .Page.Language }} - {{ $currentPath := .RelPermalink }} - {{ range .Site.Languages }} - {{ $langCode := .Lang }} - {{ $langName := .LanguageName }} - {{ $current := eq $langCode $currentLang }} - - {{ $url := $currentPath }} - {{ if eq $langCode "en" }} - {{ if hasPrefix $currentPath "/it/" }} - {{ $url = strings.TrimPrefix "/it" $currentPath }} - {{ end }} - {{ else }} - {{ if not (hasPrefix $currentPath "/it/") }} - {{ $url = printf "/it%s" $currentPath }} - {{ end }} - {{ end }} - - {{ $langName }} - - {{ end }} -
    -
    - -
    -
    - - diff --git a/themes/danix-xyz-hacker/layouts/partials/head-meta.html b/themes/danix-xyz-hacker/layouts/partials/head-meta.html deleted file mode 100644 index 34a60e2..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/head-meta.html +++ /dev/null @@ -1,57 +0,0 @@ -{{/* description: per-page excerpt wins over site-wide description */}} -{{ $description := .Site.Language.Params.siteDescription }} -{{ with .Params.excerpt }}{{ $description = . }}{{ end }} - -{{/* og:type: "article" only for single content pages that have a date */}} -{{ $ogType := "website" }} -{{ if and (eq .Kind "page") .Date }}{{ $ogType = "article" }}{{ end }} - -{{/* og:image: page image wins; fall back to lamp for homepage, dark thumbnail for articles */}} -{{ $defaultImage := "images/default_thumbnail_dark.png" }} -{{ if .IsHome }}{{ $defaultImage = "images/lampD.png" }}{{ end }} -{{ $ogImage := printf "%s%s" .Site.BaseURL $defaultImage }} -{{ with .Params.image }}{{ $ogImage = printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" .) }}{{ end }} - -{{/* author: page-level param wins; fall back to site param */}} -{{ $author := .Site.Params.author }} -{{ with .Params.author }}{{ $author = . }}{{ end }} - - - - - - - - - - - -{{ if eq $ogType "article" }} - - -{{ end }} - - - - - -{{ with .Site.Params.twitterHandle }} - -{{ end }} - -{{/* SEO: Self-referencing canonical */}} - - -{{/* SEO: hreflang alternates for all language variants */}} -{{ range .AllTranslations }} - -{{ end }} -{{/* x-default: EN version (served at root /) */}} -{{ range .AllTranslations }} - {{ if eq .Language.Lang "en" }} - - {{ end }} -{{ end }} - -{{/* Structured data: BreadcrumbList JSON-LD (single pages and named sections) */}} -{{ if or (eq .Kind "page") (eq .Kind "section") }}{{ partial "breadcrumb-jsonld.html" . }}{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/partials/header.html b/themes/danix-xyz-hacker/layouts/partials/header.html deleted file mode 100644 index 914e645..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/header.html +++ /dev/null @@ -1,94 +0,0 @@ -
    - - - - {{ partial "hamburger-menu.html" . }} -
    diff --git a/themes/danix-xyz-hacker/layouts/partials/search-modal.html b/themes/danix-xyz-hacker/layouts/partials/search-modal.html deleted file mode 100644 index 6b96b3a..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/search-modal.html +++ /dev/null @@ -1,87 +0,0 @@ - -
    - - - - - -
    diff --git a/themes/danix-xyz-hacker/layouts/partials/sidebar.html b/themes/danix-xyz-hacker/layouts/partials/sidebar.html deleted file mode 100644 index a2225f1..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/sidebar.html +++ /dev/null @@ -1,54 +0,0 @@ - diff --git a/themes/danix-xyz-hacker/layouts/partials/social-share.html b/themes/danix-xyz-hacker/layouts/partials/social-share.html deleted file mode 100644 index 9e9be43..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/social-share.html +++ /dev/null @@ -1,123 +0,0 @@ -{{ $page := .page }} -{{ $mode := .mode | default "sidebar" }} -{{ $url := $page.Permalink | urlquery }} -{{ $title := $page.Title | urlquery }} - -{{ $gridClass := "share-grid gap-1" }} -{{ if eq $mode "inline" }} - {{ $gridClass = "flex flex-wrap justify-center gap-1" }} -{{ end }} - - diff --git a/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html b/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html deleted file mode 100644 index b896e8d..0000000 --- a/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html +++ /dev/null @@ -1,90 +0,0 @@ -{{/* tag-cloud.html - Reusable tag cloud partial for homepage, sidebar, and 404 pages. - - Params (dict): - page Page required โ€” calling page context (provides .Site.Taxonomies.tags, .Lang) - showCount bool optional โ€” show post count per tag (default true) - heading string optional โ€” heading text override (default: i18n "tagCloud") - headingLevel string optional โ€” h2|h3|p for non-widget mode (default "h2") - wrapInWidget bool optional โ€” wrap in .sidebar-widget for sidebar placement (default false) - maxTags int optional โ€” max tags to show, 0 = all (default 0) -*/}} - -{{- $page := .page -}} -{{- $showCount := .showCount | default true -}} -{{- $heading := .heading | default (i18n "tagCloud") -}} -{{- $headingLevel := .headingLevel -}} -{{- $wrapInWidget := .wrapInWidget | default false -}} -{{- $maxTags := .maxTags | default 0 -}} - -{{- $tags := $page.Site.Taxonomies.tags -}} - -{{/* Early exit if no tags */}} -{{- if $tags -}} - -{{/* Compute max count for continuous scaling */}} -{{- $maxCount := 0 -}} -{{- range $tags -}} - {{- if gt .Count $maxCount -}}{{- $maxCount = .Count -}}{{- end -}} -{{- end -}} - -{{/* Ordered tag list (descending by count) */}} -{{- $orderedTags := $tags.ByCount -}} -{{- if gt $maxTags 0 -}} - {{- $orderedTags = first $maxTags $orderedTags -}} -{{- end -}} - -{{/* Render based on placement mode */}} -{{- if $wrapInWidget -}} -