From 57840211f090d17dc49e55b73a17169e028ee3c9 Mon Sep 17 00:00:00 2001 From: Storozhenko Evgeny Date: Sat, 19 Sep 2026 18:04:15 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BA=D0=BB?= =?UTF-8?q?=D1=8E=D1=87=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=20=D1=82=D0=B5=D0=BC?= =?UTF-8?q?=D1=8B=20=D0=B2=D0=BF=D1=80=D0=B0=D0=B2=D0=BE=20=D1=83=20=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D1=8E=20+=20=D0=BA=D0=B0=D1=80=D1=82=D0=BE=D1=87?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D1=82=D0=B0=20+=20=D0=BF=D0=BE=D0=B4=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20typewriter.css=20?= =?UTF-8?q?=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20extend=5Fhead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - assets/css/extended/typewriter.css: flex-order в .nav (logo | menu | toggle), article.first-entry как .post-entry (фон/рамка/скругление/отступ) - layouts/partials/extend_head.html (новый): resources.Get typewriter.css — Hugo НЕ подхватывает корневой assets/css/extended через resources.Match темы, поэтому прошлый CSS не применялся (JS работал, стили нет) - openspec: change theme-toggle-first-post-card (proposal/design/specs/tasks) ВАЖНО: прошлый деплой typewriter-эффекта был неполным — CSS не подключался. Этот коммит чинит оба бага + курсор. --- assets/css/extended/typewriter.css | 32 +++++++++ layouts/partials/extend_head.html | 5 ++ .../theme-toggle-first-post-card/design.md | 72 +++++++++++++++++++ .../theme-toggle-first-post-card/proposal.md | 33 +++++++++ .../specs/theme-fixes/spec.md | 53 ++++++++++++++ .../theme-toggle-first-post-card/tasks.md | 33 +++++++++ 6 files changed, 228 insertions(+) create mode 100644 layouts/partials/extend_head.html create mode 100644 openspec/changes/theme-toggle-first-post-card/design.md create mode 100644 openspec/changes/theme-toggle-first-post-card/proposal.md create mode 100644 openspec/changes/theme-toggle-first-post-card/specs/theme-fixes/spec.md create mode 100644 openspec/changes/theme-toggle-first-post-card/tasks.md diff --git a/assets/css/extended/typewriter.css b/assets/css/extended/typewriter.css index 6ac0fc8..e876da6 100644 --- a/assets/css/extended/typewriter.css +++ b/assets/css/extended/typewriter.css @@ -27,4 +27,36 @@ animation: none; /* static cursor, no blink */ opacity: 0.6; } +} + +/* ---- theme fixes (2026-09-19) ---- */ + +/* 1) move the theme toggle (sun/moon) to the far right, beside the main menu. + nav is flex with justify-content: space-between; DOM order is + logo | logo-switches | #menu — reorder so the toggle sits after #menu */ +.nav { + flex-wrap: nowrap; /* keep logo, menu and toggle on one line */ +} + +.nav > .logo { + order: 0; + margin-inline-end: auto; /* push everything else to the right */ +} + +.nav > #menu { + order: 1; + margin-inline-start: auto; /* menu hugs the right edge */ +} + +.nav > .logo-switches { + order: 2; + margin-inline-start: 8px; +} + +/* 2) first post card: same card styling as .post-entry */ +article.first-entry { + background: var(--entry); + border-radius: var(--radius); + border: 1px solid var(--border); + padding: var(--gap); } \ No newline at end of file diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html new file mode 100644 index 0000000..3faf861 --- /dev/null +++ b/layouts/partials/extend_head.html @@ -0,0 +1,5 @@ +{{- /* Custom head hook: load site-level typewriter.css (theme fixes + logo typewriter). + Uses resources.Get so Hugo resolves assets/css/extended/typewriter.css + from the SITE root (not the theme), keeping the theme untouched. */ -}} +{{- $tw_css := resources.Get "css/extended/typewriter.css" | minify | fingerprint -}} + \ No newline at end of file diff --git a/openspec/changes/theme-toggle-first-post-card/design.md b/openspec/changes/theme-toggle-first-post-card/design.md new file mode 100644 index 0000000..d710852 --- /dev/null +++ b/openspec/changes/theme-toggle-first-post-card/design.md @@ -0,0 +1,72 @@ +# Design: Переключатель темы справа + карточка первого поста + +## Context + +- Тема rDedInit (PaperMod). Шапка: `themes/rDedInit/layouts/partials/header.html`, + контейнер `.nav` — `display:flex; flex-wrap:wrap; justify-content:space-between`. +- DOM-порядок в `.nav`: `