diff --git a/assets/css/extended/typewriter.css b/assets/css/extended/typewriter.css new file mode 100644 index 0000000..6ac0fc8 --- /dev/null +++ b/assets/css/extended/typewriter.css @@ -0,0 +1,30 @@ +/* dedinit() typewriter — animated blog topics inside the logo parens. + Progressive enhancement: pure CSS cursor blink, JS only drives the text. */ + +#dedinit-typewriter { + display: inline-block; + white-space: nowrap; /* never wrap the typed word */ + min-width: 0.5ch; /* keeps parens from collapsing when empty */ + text-align: left; +} + +#dedinit-typewriter .tw-cursor { + display: inline-block; + width: 0.55ch; + height: 1.05em; + margin-inline-start: 0.15ch; + background: currentColor; /* follows light/dark text color */ + vertical-align: -0.12em; + animation: tw-blink 1s steps(1) infinite; +} + +@keyframes tw-blink { + 50% { opacity: 0; } +} + +@media (prefers-reduced-motion: reduce) { + #dedinit-typewriter .tw-cursor { + animation: none; /* static cursor, no blink */ + opacity: 0.6; + } +} \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index 66420ae..11f7a80 100644 --- a/hugo.toml +++ b/hugo.toml @@ -37,6 +37,10 @@ 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 new file mode 100644 index 0000000..06a5f27 --- /dev/null +++ b/layouts/partials/extend_footer.html @@ -0,0 +1,58 @@ +{{- /* 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: + [params.typewriter] words = ["linux", "llm", "politics"] */ -}} +{{- $tw_words := site.Params.typewriter.words | default (slice "linux" "llm" "politics" "homelab" "nix") -}} + \ No newline at end of file diff --git a/openspec/changes/header-typewriter/design.md b/openspec/changes/header-typewriter/design.md new file mode 100644 index 0000000..5dee897 --- /dev/null +++ b/openspec/changes/header-typewriter/design.md @@ -0,0 +1,81 @@ +# Design: Анимированный логотип-печатная машинка (header typewriter) + +## Context + +- Тема: rDedInit (форк PaperMod), Hugo Extended 0.165.x. +- Логотип в шапке — партиал `themes/rDedInit/layouts/partials/header.html`, + ссылка `