diff --git a/assets/css/extended/typewriter.css b/assets/css/extended/typewriter.css index 7cbf5b2..2d55b76 100644 --- a/assets/css/extended/typewriter.css +++ b/assets/css/extended/typewriter.css @@ -61,12 +61,16 @@ article.first-entry { } /* 3) social icons inside the header nav (moved there by JS in - extend_footer.html). Sizing matches the logo/menu scale. */ + extend_footer.html). Sizing matches the logo/menu scale. + Hidden while server-rendered in footer (id present); the JS moves + the block into .nav and clears the id — then class rules apply. */ +#__social-icons { display: none; } .social-icons-inline { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 14px; + order: 2; } .social-icon { display: inline-flex; diff --git a/hugo.toml b/hugo.toml index 2fe8de9..6a7b8b1 100644 --- a/hugo.toml +++ b/hugo.toml @@ -37,10 +37,6 @@ draft = false # Полный текст постов в RSS-ленте (content:encoded) ShowFullTextinRSS = true - # Типографика логотипа dedinit(): темы, печатаемые в скобках (typewriter) - [params.typewriter] - words = ["linux", "llm", "politics", "homelab", "nix", "devops"] - # Настройки PaperMod defaultTheme = "auto" disableThemeToggle = false diff --git a/layouts/partials/extend_footer.html b/layouts/partials/extend_footer.html index 3f95b1a..0c40b33 100644 --- a/layouts/partials/extend_footer.html +++ b/layouts/partials/extend_footer.html @@ -1,10 +1,23 @@ {{- /* dedinit() typewriter: animated topics inside logo parens. Pure JS + CSS, no Alpine. Progressive enhancement — no-JS keeps - the plain "dedinit()" logo. Words configurable via hugo.toml. + the plain "dedinit()" logo. Words = live site tags (popularity + first), so the logo always reflects the actual blog taxonomy. Also: moves theme toggle to the right end of .nav and injects social icons (from [params.socialIcons]) next to the menu. Icons are rendered server-side via the theme's svg.html partial. */ -}} -{{- $tw_words := site.Params.typewriter.words | default (slice "linux" "llm" "politics" "homelab" "nix") -}} +{{- /* Слова для печати: реальные теги сайта, популярные первыми. + Исключаем служебные/технические теги, которых много и они неинтересны. */ -}} +{{- $skip := slice "deprecated" "frontmatter" "google-analytics" "aux" "hermes" "herdr" "howto" -}} +{{- $tags := slice -}} +{{- range $t, $pages := site.Taxonomies.tags -}} + {{- if not (in $skip $t) -}} + {{- $tags = $tags | append (dict "name" $t "count" (len $pages)) -}} + {{- end -}} +{{- end -}} +{{- $tags = sort $tags "count" "desc" -}} +{{- if gt (len $tags) 24 }}{{- $tags = first 24 $tags -}}{{- end -}} +{{- $tw_words := slice -}} +{{- range $tags -}}{{- $tw_words = $tw_words | append .name -}}{{- end -}} {{- $social := site.Params.socialIcons | default (slice) -}}