From c2cc8955354ce176cf6401ae6579376f44dff374 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sat, 19 Sep 2026 22:29:27 +0000 Subject: [PATCH 01/13] web: v2 editorial skin (dlgrv.com style) at /v2/{ru,en,zh}/ - tools/v2.css: monochrome editorial skin (Georgia 17.5px book text, system-ui UI, hairlines instead of cards, uppercase kickers, dark #111/#d0d0d0 theme) - build_pages.py: also generate v2//index.html with swapped ', re.S) +v2css = open(os.path.join(ROOT,'tools','v2.css'), encoding='utf-8').read() +if not STYLE_RE.search(src): + sys.exit('root index.html: ', d, count=1) + d = d.replace(CANON, '' % lang) + d = d.replace(OGURL, '' % lang) + out = os.path.join(ROOT, 'v2', lang, 'index.html') + os.makedirs(os.path.dirname(out), exist_ok=True) + open(out,'w',encoding='utf-8').write(d) + print('built', os.path.relpath(out, ROOT)) diff --git a/tools/v2.css b/tools/v2.css new file mode 100644 index 00000000..59541254 --- /dev/null +++ b/tools/v2.css @@ -0,0 +1,161 @@ +/* ============================================================ + HTLB v2 — editorial minimal skin (dlgrv.com style) + Same DOM & JS as v1; this file replaces the + + + + + + + +
+ + + +
+
+
+

Пособие по выгодной жизни

+

Каждая рекомендация отвечает на два вопроса: чем рискуешь — и что получаешь.

+

Кому достаётся выгода, тоже разбито по уровням: сам ты — выше всего, затем супруг и близкие родственники, потом друзья и коллеги, незнакомцы — ниже всех. «Ниже всех» не значит «ноль»: просто надёжда на ответ меньше, а риски нужно учитывать вместе с выгодой.

+
Показано – из –
+

+ Нашли ошибку в переводе — + откройте issue +

+

+ Понравился перевод — + поставьте звезду репо +

+
+
+
+ +
+
Категория эффекта указана в каждом пункте: разд. 1–2 — общая смертность или конкретная причина смерти; разд. 3–4 — время и силы; разд. 5 — деньги; разд. 7 — деньги и гарантии; разд. 8–9 — деньги и личная свобода. Категории между собой не сравниваются. Проверка источников: docs/核实记录 (отчёт о проверке источников, на китайском). Оригинал — Public Domain (Unlicense).
+
+
+ + + + diff --git a/v2/ru/index.html b/v2/ru/index.html new file mode 100644 index 00000000..d79d691d --- /dev/null +++ b/v2/ru/index.html @@ -0,0 +1,968 @@ + + + + + + +Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+

Пособие по выгодной жизни

+

Каждая рекомендация отвечает на два вопроса: чем рискуешь — и что получаешь.

+

Кому достаётся выгода, тоже разбито по уровням: сам ты — выше всего, затем супруг и близкие родственники, потом друзья и коллеги, незнакомцы — ниже всех. «Ниже всех» не значит «ноль»: просто надёжда на ответ меньше, а риски нужно учитывать вместе с выгодой.

+
Показано – из –
+

+ Нашли ошибку в переводе — + откройте issue +

+

+ Понравился перевод — + поставьте звезду репо +

+
+
+
+ +
+
Категория эффекта указана в каждом пункте: разд. 1–2 — общая смертность или конкретная причина смерти; разд. 3–4 — время и силы; разд. 5 — деньги; разд. 7 — деньги и гарантии; разд. 8–9 — деньги и личная свобода. Категории между собой не сравниваются. Проверка источников: docs/核实记录 (отчёт о проверке источников, на китайском). Оригинал — Public Domain (Unlicense).
+
+
+ + + + diff --git a/v2/zh/index.html b/v2/zh/index.html new file mode 100644 index 00000000..8fc38f73 --- /dev/null +++ b/v2/zh/index.html @@ -0,0 +1,968 @@ + + + + + + +Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+

Пособие по выгодной жизни

+

Каждая рекомендация отвечает на два вопроса: чем рискуешь — и что получаешь.

+

Кому достаётся выгода, тоже разбито по уровням: сам ты — выше всего, затем супруг и близкие родственники, потом друзья и коллеги, незнакомцы — ниже всех. «Ниже всех» не значит «ноль»: просто надёжда на ответ меньше, а риски нужно учитывать вместе с выгодой.

+
Показано – из –
+

+ Нашли ошибку в переводе — + откройте issue +

+

+ Понравился перевод — + поставьте звезду репо +

+
+
+
+ +
+
Категория эффекта указана в каждом пункте: разд. 1–2 — общая смертность или конкретная причина смерти; разд. 3–4 — время и силы; разд. 5 — деньги; разд. 7 — деньги и гарантии; разд. 8–9 — деньги и личная свобода. Категории между собой не сравниваются. Проверка источников: docs/核实记录 (отчёт о проверке источников, на китайском). Оригинал — Public Domain (Unlicense).
+
+
+ + + + From 5853eb5c35b54712e7065151f51ba770f4cbb232 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sat, 19 Sep 2026 22:34:31 +0000 Subject: [PATCH 02/13] =?UTF-8?q?web(v2):=20single=20font=20family=20?= =?UTF-8?q?=E2=80=94=20Georgia=20everywhere=20(UI=20+=20book=20text);=20mo?= =?UTF-8?q?no=20only=20for=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/v2.css | 5 +++-- v2/en/index.html | 5 +++-- v2/ru/index.html | 5 +++-- v2/zh/index.html | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/v2.css b/tools/v2.css index 59541254..5b28caba 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -8,7 +8,8 @@ --bg:#ffffff; --ink:#111111; --text:#333333; --mut:#666666; --faint:#8e8e8e; --line:#e3e3e3; --line-soft:#d5d5d5; --hover:#2481cc; --pop-bg:#ffffff; --serif:Georgia,"Times New Roman",serif; - --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; + --sans:Georgia,"Times New Roman",serif; /* единый шрифт на всей странице (решение пользователя) */ + --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --nav-h:56px; --side-w:264px; } html.dark{ @@ -127,7 +128,7 @@ html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} /* status / empty / foot */ .status{max-width:720px;margin:0 auto 8px;font:12px/1.6 var(--sans);color:var(--faint)} -.status code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px} +.status code{font-family:var(--mono);font-size:11px} .empty{max-width:720px;margin:48px auto;text-align:center;font:16px/1.7 var(--serif);color:var(--mut)} .empty button{margin-top:14px;padding:8px 18px;border:1px solid var(--line);border-radius:2px;background:none;color:var(--text);font:13px/1.4 var(--sans);cursor:pointer;transition:border-color .15s,color .15s} .empty button:hover{border-color:var(--ink);color:var(--ink)} diff --git a/v2/en/index.html b/v2/en/index.html index e4d07b31..52e45ea1 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -47,7 +47,8 @@ --bg:#ffffff; --ink:#111111; --text:#333333; --mut:#666666; --faint:#8e8e8e; --line:#e3e3e3; --line-soft:#d5d5d5; --hover:#2481cc; --pop-bg:#ffffff; --serif:Georgia,"Times New Roman",serif; - --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; + --sans:Georgia,"Times New Roman",serif; /* единый шрифт на всей странице (решение пользователя) */ + --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --nav-h:56px; --side-w:264px; } html.dark{ @@ -166,7 +167,7 @@ /* status / empty / foot */ .status{max-width:720px;margin:0 auto 8px;font:12px/1.6 var(--sans);color:var(--faint)} -.status code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px} +.status code{font-family:var(--mono);font-size:11px} .empty{max-width:720px;margin:48px auto;text-align:center;font:16px/1.7 var(--serif);color:var(--mut)} .empty button{margin-top:14px;padding:8px 18px;border:1px solid var(--line);border-radius:2px;background:none;color:var(--text);font:13px/1.4 var(--sans);cursor:pointer;transition:border-color .15s,color .15s} .empty button:hover{border-color:var(--ink);color:var(--ink)} diff --git a/v2/ru/index.html b/v2/ru/index.html index d79d691d..166a06e1 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -47,7 +47,8 @@ --bg:#ffffff; --ink:#111111; --text:#333333; --mut:#666666; --faint:#8e8e8e; --line:#e3e3e3; --line-soft:#d5d5d5; --hover:#2481cc; --pop-bg:#ffffff; --serif:Georgia,"Times New Roman",serif; - --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; + --sans:Georgia,"Times New Roman",serif; /* единый шрифт на всей странице (решение пользователя) */ + --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --nav-h:56px; --side-w:264px; } html.dark{ @@ -166,7 +167,7 @@ /* status / empty / foot */ .status{max-width:720px;margin:0 auto 8px;font:12px/1.6 var(--sans);color:var(--faint)} -.status code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px} +.status code{font-family:var(--mono);font-size:11px} .empty{max-width:720px;margin:48px auto;text-align:center;font:16px/1.7 var(--serif);color:var(--mut)} .empty button{margin-top:14px;padding:8px 18px;border:1px solid var(--line);border-radius:2px;background:none;color:var(--text);font:13px/1.4 var(--sans);cursor:pointer;transition:border-color .15s,color .15s} .empty button:hover{border-color:var(--ink);color:var(--ink)} diff --git a/v2/zh/index.html b/v2/zh/index.html index 8fc38f73..542177f2 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -47,7 +47,8 @@ --bg:#ffffff; --ink:#111111; --text:#333333; --mut:#666666; --faint:#8e8e8e; --line:#e3e3e3; --line-soft:#d5d5d5; --hover:#2481cc; --pop-bg:#ffffff; --serif:Georgia,"Times New Roman",serif; - --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; + --sans:Georgia,"Times New Roman",serif; /* единый шрифт на всей странице (решение пользователя) */ + --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --nav-h:56px; --side-w:264px; } html.dark{ @@ -166,7 +167,7 @@ /* status / empty / foot */ .status{max-width:720px;margin:0 auto 8px;font:12px/1.6 var(--sans);color:var(--faint)} -.status code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px} +.status code{font-family:var(--mono);font-size:11px} .empty{max-width:720px;margin:48px auto;text-align:center;font:16px/1.7 var(--serif);color:var(--mut)} .empty button{margin-top:14px;padding:8px 18px;border:1px solid var(--line);border-radius:2px;background:none;color:var(--text);font:13px/1.4 var(--sans);cursor:pointer;transition:border-color .15s,color .15s} .empty button:hover{border-color:var(--ink);color:var(--ink)} From afeb8765ce996698a3e95acee4e1a272669393d0 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 08:32:59 +0000 Subject: [PATCH 03/13] web(v2): header & width polish - search bar exactly centered in window on desktop (absolute, min(420px,40vw)); flows normally on mobile - nav-r anchored right via margin-left:auto; even gaps (10px), README/GitHub icons optically equalized (.ic-doc/.ic-gh), '/' hint padded - theme switch knob: plain square, no cropped glyph; darker knob for contrast - fix .icon-btn{display:grid} overriding .menu-btn{display:none} -> hamburger no longer visible on desktop (specificity) - content column widened 680->760px --- index.html | 4 ++-- tools/v2.css | 27 ++++++++++++++++----------- v2/en/index.html | 31 ++++++++++++++++++------------- v2/ru/index.html | 31 ++++++++++++++++++------------- v2/zh/index.html | 31 ++++++++++++++++++------------- 5 files changed, 72 insertions(+), 52 deletions(-) diff --git a/index.html b/index.html index 013bfa01..2b5a6027 100644 --- a/index.html +++ b/index.html @@ -256,8 +256,8 @@

Пособие по выгодной жизни

- - + + diff --git a/tools/v2.css b/tools/v2.css index 5b28caba..bb9453fe 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -25,25 +25,29 @@ a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible,a /* ---------- top bar ---------- */ .nav{position:fixed;top:0;left:0;right:0;height:var(--nav-h);z-index:30;background:var(--bg);border-bottom:1px solid var(--line)} -.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px} -.menu-btn{display:none} +.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px;position:relative} +.icon-btn.menu-btn{display:none} .title{display:flex;align-items:center;gap:8px;font:500 14px/1.3 var(--sans);color:var(--text);white-space:nowrap} .title:hover{color:var(--ink)} .title .logo{display:none} -.search{flex:1;max-width:420px;margin-left:auto;position:relative} +/* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} .search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} .search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} .search input::placeholder{color:var(--faint)} .search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:2px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:17px;height:17px;fill:currentColor} -.nav-r{display:flex;align-items:center;gap:6px} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:4px;transition:border-color .15s} +.icon-btn svg{width:16px;height:16px;fill:currentColor} +/* единый оптический калибр: глиф README занимает 14/24 viewBox, октокат ~24/24 */ +.ic-doc svg{width:24px;height:24px} +.ic-gh svg{width:15px;height:15px} +.nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} +.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} .switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--line-soft);transition:transform .15s,background .15s;display:grid;place-items:center} -.switch .knob svg{width:9px;height:9px;fill:var(--bg)} +.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} +.switch .knob svg{display:none} .switch .sun{display:block}.switch .moon{display:none} html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} @@ -90,7 +94,7 @@ html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} /* ---------- content ---------- */ .content{padding:calc(var(--nav-h) + 40px) 48px 128px calc(var(--side-w) + 56px)} -.sec-block{max-width:680px;margin:0 auto 64px} +.sec-block{max-width:760px;margin:0 auto 64px} .sec-h{display:flex;align-items:baseline;gap:16px;padding-top:8px;margin-bottom:6px} .sec-h h2{margin:0;font:600 22px/1.4 var(--serif);color:var(--ink)} .sec-h .shown{margin-left:auto;flex:none;font:12px/1 var(--sans);color:var(--faint);font-variant-numeric:tabular-nums} @@ -148,7 +152,8 @@ html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} /* ---------- mobile ---------- */ @media (max-width:1099px){ - .menu-btn{display:grid} + .icon-btn.menu-btn{display:grid} + .search{position:static;transform:none;flex:1;width:auto;max-width:none} .sidebar{transform:translateX(-100%);transition:transform .2s;box-shadow:none;width:min(var(--side-w),84vw);padding:24px 24px 96px} .sidebar.open{transform:none;box-shadow:0 4px 24px rgba(0,0,0,.15)} .content{padding:calc(var(--nav-h) + 16px) 20px 96px} diff --git a/v2/en/index.html b/v2/en/index.html index 52e45ea1..dc5ce6ce 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -64,25 +64,29 @@ /* ---------- top bar ---------- */ .nav{position:fixed;top:0;left:0;right:0;height:var(--nav-h);z-index:30;background:var(--bg);border-bottom:1px solid var(--line)} -.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px} -.menu-btn{display:none} +.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px;position:relative} +.icon-btn.menu-btn{display:none} .title{display:flex;align-items:center;gap:8px;font:500 14px/1.3 var(--sans);color:var(--text);white-space:nowrap} .title:hover{color:var(--ink)} .title .logo{display:none} -.search{flex:1;max-width:420px;margin-left:auto;position:relative} +/* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} .search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} .search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} .search input::placeholder{color:var(--faint)} .search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:2px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:17px;height:17px;fill:currentColor} -.nav-r{display:flex;align-items:center;gap:6px} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:4px;transition:border-color .15s} +.icon-btn svg{width:16px;height:16px;fill:currentColor} +/* единый оптический калибр: глиф README занимает 14/24 viewBox, октокат ~24/24 */ +.ic-doc svg{width:24px;height:24px} +.ic-gh svg{width:15px;height:15px} +.nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} +.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} .switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--line-soft);transition:transform .15s,background .15s;display:grid;place-items:center} -.switch .knob svg{width:9px;height:9px;fill:var(--bg)} +.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} +.switch .knob svg{display:none} .switch .sun{display:block}.switch .moon{display:none} html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} @@ -129,7 +133,7 @@ /* ---------- content ---------- */ .content{padding:calc(var(--nav-h) + 40px) 48px 128px calc(var(--side-w) + 56px)} -.sec-block{max-width:680px;margin:0 auto 64px} +.sec-block{max-width:760px;margin:0 auto 64px} .sec-h{display:flex;align-items:baseline;gap:16px;padding-top:8px;margin-bottom:6px} .sec-h h2{margin:0;font:600 22px/1.4 var(--serif);color:var(--ink)} .sec-h .shown{margin-left:auto;flex:none;font:12px/1 var(--sans);color:var(--faint);font-variant-numeric:tabular-nums} @@ -187,7 +191,8 @@ /* ---------- mobile ---------- */ @media (max-width:1099px){ - .menu-btn{display:grid} + .icon-btn.menu-btn{display:grid} + .search{position:static;transform:none;flex:1;width:auto;max-width:none} .sidebar{transform:translateX(-100%);transition:transform .2s;box-shadow:none;width:min(var(--side-w),84vw);padding:24px 24px 96px} .sidebar.open{transform:none;box-shadow:0 4px 24px rgba(0,0,0,.15)} .content{padding:calc(var(--nav-h) + 16px) 20px 96px} @@ -231,8 +236,8 @@

Пособие по выгодной жизни

- - + + diff --git a/v2/ru/index.html b/v2/ru/index.html index 166a06e1..cf472d50 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -64,25 +64,29 @@ /* ---------- top bar ---------- */ .nav{position:fixed;top:0;left:0;right:0;height:var(--nav-h);z-index:30;background:var(--bg);border-bottom:1px solid var(--line)} -.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px} -.menu-btn{display:none} +.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px;position:relative} +.icon-btn.menu-btn{display:none} .title{display:flex;align-items:center;gap:8px;font:500 14px/1.3 var(--sans);color:var(--text);white-space:nowrap} .title:hover{color:var(--ink)} .title .logo{display:none} -.search{flex:1;max-width:420px;margin-left:auto;position:relative} +/* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} .search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} .search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} .search input::placeholder{color:var(--faint)} .search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:2px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:17px;height:17px;fill:currentColor} -.nav-r{display:flex;align-items:center;gap:6px} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:4px;transition:border-color .15s} +.icon-btn svg{width:16px;height:16px;fill:currentColor} +/* единый оптический калибр: глиф README занимает 14/24 viewBox, октокат ~24/24 */ +.ic-doc svg{width:24px;height:24px} +.ic-gh svg{width:15px;height:15px} +.nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} +.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} .switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--line-soft);transition:transform .15s,background .15s;display:grid;place-items:center} -.switch .knob svg{width:9px;height:9px;fill:var(--bg)} +.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} +.switch .knob svg{display:none} .switch .sun{display:block}.switch .moon{display:none} html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} @@ -129,7 +133,7 @@ /* ---------- content ---------- */ .content{padding:calc(var(--nav-h) + 40px) 48px 128px calc(var(--side-w) + 56px)} -.sec-block{max-width:680px;margin:0 auto 64px} +.sec-block{max-width:760px;margin:0 auto 64px} .sec-h{display:flex;align-items:baseline;gap:16px;padding-top:8px;margin-bottom:6px} .sec-h h2{margin:0;font:600 22px/1.4 var(--serif);color:var(--ink)} .sec-h .shown{margin-left:auto;flex:none;font:12px/1 var(--sans);color:var(--faint);font-variant-numeric:tabular-nums} @@ -187,7 +191,8 @@ /* ---------- mobile ---------- */ @media (max-width:1099px){ - .menu-btn{display:grid} + .icon-btn.menu-btn{display:grid} + .search{position:static;transform:none;flex:1;width:auto;max-width:none} .sidebar{transform:translateX(-100%);transition:transform .2s;box-shadow:none;width:min(var(--side-w),84vw);padding:24px 24px 96px} .sidebar.open{transform:none;box-shadow:0 4px 24px rgba(0,0,0,.15)} .content{padding:calc(var(--nav-h) + 16px) 20px 96px} @@ -231,8 +236,8 @@

Пособие по выгодной жизни

- - + + diff --git a/v2/zh/index.html b/v2/zh/index.html index 542177f2..648c8278 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -64,25 +64,29 @@ /* ---------- top bar ---------- */ .nav{position:fixed;top:0;left:0;right:0;height:var(--nav-h);z-index:30;background:var(--bg);border-bottom:1px solid var(--line)} -.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px} -.menu-btn{display:none} +.nav-in{max-width:1200px;margin:0 auto;height:100%;display:flex;align-items:center;gap:14px;padding:0 24px;position:relative} +.icon-btn.menu-btn{display:none} .title{display:flex;align-items:center;gap:8px;font:500 14px/1.3 var(--sans);color:var(--text);white-space:nowrap} .title:hover{color:var(--ink)} .title .logo{display:none} -.search{flex:1;max-width:420px;margin-left:auto;position:relative} +/* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} .search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} .search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} .search input::placeholder{color:var(--faint)} .search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:2px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:17px;height:17px;fill:currentColor} -.nav-r{display:flex;align-items:center;gap:6px} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:4px;transition:border-color .15s} +.icon-btn svg{width:16px;height:16px;fill:currentColor} +/* единый оптический калибр: глиф README занимает 14/24 viewBox, октокат ~24/24 */ +.ic-doc svg{width:24px;height:24px} +.ic-gh svg{width:15px;height:15px} +.nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} +.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} .switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--line-soft);transition:transform .15s,background .15s;display:grid;place-items:center} -.switch .knob svg{width:9px;height:9px;fill:var(--bg)} +.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} +.switch .knob svg{display:none} .switch .sun{display:block}.switch .moon{display:none} html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} @@ -129,7 +133,7 @@ /* ---------- content ---------- */ .content{padding:calc(var(--nav-h) + 40px) 48px 128px calc(var(--side-w) + 56px)} -.sec-block{max-width:680px;margin:0 auto 64px} +.sec-block{max-width:760px;margin:0 auto 64px} .sec-h{display:flex;align-items:baseline;gap:16px;padding-top:8px;margin-bottom:6px} .sec-h h2{margin:0;font:600 22px/1.4 var(--serif);color:var(--ink)} .sec-h .shown{margin-left:auto;flex:none;font:12px/1 var(--sans);color:var(--faint);font-variant-numeric:tabular-nums} @@ -187,7 +191,8 @@ /* ---------- mobile ---------- */ @media (max-width:1099px){ - .menu-btn{display:grid} + .icon-btn.menu-btn{display:grid} + .search{position:static;transform:none;flex:1;width:auto;max-width:none} .sidebar{transform:translateX(-100%);transition:transform .2s;box-shadow:none;width:min(var(--side-w),84vw);padding:24px 24px 96px} .sidebar.open{transform:none;box-shadow:0 4px 24px rgba(0,0,0,.15)} .content{padding:calc(var(--nav-h) + 16px) 20px 96px} @@ -231,8 +236,8 @@

Пособие по выгодной жизни

- - + + From 0f6a90a3ecf3e2886d3dd6d0fb7a7e79e196140e Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 09:19:26 +0000 Subject: [PATCH 04/13] =?UTF-8?q?web(v2):=20typography=20pass=20=E2=80=94?= =?UTF-8?q?=20university-press=20polish=20+=20audit=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - drop dead Inter stylesheet + preconnects (unused since Georgia switch) - header icons: optical equalization (README 20px box, GH 15px), globe emoji -> text label, buttons/kbd/summary inherit font stack (theme toggle was Arial) - scale 36/24/19/17.5: h1 36px (-.015em), h2 24px, card h3 19px (was =body), rows .k 11px (was 10px) - mobile h1 27px, h2 21px; section rhythm: 88px between sections, roomier cards - ::selection inverted (ink/bg) - v2 pages: README/book links fixed to repo root (../../) — icon link was 404 from /v2/ --- index.html | 5 +---- tools/v2.css | 27 ++++++++++++++------------ v2/en/index.html | 50 ++++++++++++++++++++++++------------------------ v2/ru/index.html | 50 ++++++++++++++++++++++++------------------------ v2/zh/index.html | 50 ++++++++++++++++++++++++------------------------ 5 files changed, 91 insertions(+), 91 deletions(-) diff --git a/index.html b/index.html index 2b5a6027..b9f9ac1f 100644 --- a/index.html +++ b/index.html @@ -33,9 +33,6 @@ ]} - - - @@ -214,7 +214,7 @@

Пособие по выгодной жизни

Русский перевод книги HowToLiveBetter (高性价比人生指南 · «Пособие по выгодной жизни»): 31 раздел, каждая рекомендация — с стоимостью, эффектом, уровнем доказательности и первоисточником.

-

Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.

+

Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.

@@ -230,13 +230,13 @@

Пособие по выгодной жизни

@@ -307,7 +307,7 @@

Пособие по выгодной жизни

Раздел выбирается один, затраты и уровень — можно несколько. Внутри группы выбор «или», между группами «и».

Внутри раздела — по убыванию выгоды. Поиск не меняет порядок.

-

Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.

+

Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.

@@ -361,7 +361,7 @@

Пособие по выгодной жизни

ru:{ htmlLang:'ru', title:'Пособие по выгодной жизни', search:'Поиск по рекомендациям', noscriptH:'Пособие по выгодной жизни', noscriptP:'Русский перевод книги HowToLiveBetter (高性价比人生指南): 31 раздел, каждая рекомендация — с стоимостью, эффектом, уровнем доказательности и первоисточником.', - noscriptLink:'Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.', + noscriptLink:'Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.', docHead:'Каждая рекомендация отвечает на два вопроса: чем рискуешь — и что получаешь.', docHead2:'Кому достаётся выгода, тоже разбито по уровням: сам ты — выше всего, затем супруг и близкие родственники, потом друзья и коллеги, незнакомцы — ниже всех. «Ниже всех» не значит «ноль»: просто надежда на ответ меньше, а риски нужно учитывать вместе с выгодой.', fbAria:'Обратная связь о переводе', fbIssueT:'Нашли ошибку в переводе —', fbIssue:'откройте issue', fbStarT:'Понравился перевод —', fbStar:'поставьте звезду репо', @@ -375,7 +375,7 @@

Пособие по выгодной жизни

fDispute:'только спорные', fTodo:'только требующие проверки', hint1:'Раздел выбирается один, затраты и уровень — можно несколько. Внутри группы выбор «или», между группами «и».', hint2:'Внутри раздела — по убыванию выгоды. Поиск не меняет порядок.', - hint3:'Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.', + hint3:'Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.', foot:'Категория эффекта указана в каждом пункте: разд. 1–2 — общая смертность или конкретная причина смерти; разд. 3–4 — время и силы; разд. 5 — деньги; разд. 7 — деньги и гарантии; разд. 8–9 — деньги и личная свобода. Категории между собой не сравниваются. Проверка источников: docs/核实记录 (отчёт о проверке источников, на китайском). Оригинал — Public Domain (Unlicense).', kCost:'Стоимость', kGain:'Эффект', kNote:'Примечания', src:'Источники', anchor:'Ссылка на этот пункт', ratioBadge:'Выгода/затраты', ratioTitle:'Оценка автора: из уровня эффекта', gradeBadge:'Доказательность', dispute:'Спорно', todo:'Есть непроверенное', @@ -398,7 +398,7 @@

Пособие по выгодной жизни

en:{ htmlLang:'en', title:'The Best-Value Life Guide', search:'Search the recommendations', noscriptH:'The Best-Value Life Guide', noscriptP:'English translation of HowToLiveBetter (高性价比人生指南): 31 sections; every recommendation states its cost, benefit, evidence grade, and primary source.', - noscriptLink:'Filters and search on this page require JavaScript. The text can be read directly: README.md (table of contents) and the book/en/ directory.', + noscriptLink:'Filters and search on this page require JavaScript. The text can be read directly: README.md (table of contents) and the book/en/ directory.', docHead:'Every recommendation answers two questions: what it costs — and what it buys back.', docHead2:'Whose account the benefit lands on is tiered too: you yourself come first, then spouse and immediate family, then friends and colleagues; strangers come lowest. "Lowest" does not mean "zero": the chance of return is smaller, and the risks must be weighed together with the benefit.', fbAria:'Translation feedback', fbIssueT:'Spotted a mistake in the translation —', fbIssue:'open an issue', fbStarT:'Like the translation —', fbStar:'give the repo a star', @@ -412,7 +412,7 @@

Пособие по выгодной жизни

fDispute:'contested only', fTodo:'unverified only', hint1:'One section at a time; costs and level can be combined. Within a group the choice is "or", between groups "and".', hint2:'Within a section — by descending benefit. Search does not change the order.', - hint3:'Data comes from the book/en/ directory (31 files); edit the text there.', + hint3:'Data comes from the book/en/ directory (31 files); edit the text there.', foot:'The benefit category is stated on every item: sec. 1–2 — all-cause mortality or a specific cause of death; sec. 3–4 — time and energy; sec. 5 — money; sec. 7 — money and protection; sec. 8–9 — money and personal freedom. Categories are not compared with each other. Source verification: docs/核实记录 (verification records, in Chinese). The original is Public Domain (Unlicense).', kCost:'Cost', kGain:'Benefit', kNote:'Notes', src:'Sources', anchor:'Link to this item', ratioBadge:'Benefit/costs', ratioTitle:'Author judgment: from the effect level', gradeBadge:'Evidence', dispute:'Contested', todo:'Has unverified', @@ -435,7 +435,7 @@

Пособие по выгодной жизни

zh:{ htmlLang:'zh', title:'高性价比人生指南', search:'搜索建议', noscriptH:'高性价比人生指南', noscriptP:'《高性价比人生指南》:31 个小节,每条建议都写明成本、收益、证据等级与原始出处。', - noscriptLink:'本页的筛选与搜索需要 JavaScript。也可直接阅读:README.zh.md(目录)与 book/ 目录。', + noscriptLink:'本页的筛选与搜索需要 JavaScript。也可直接阅读:README.zh.md(目录)与 book/ 目录。', docHead:'每条建议回答两个问题:付出什么——换回什么。', docHead2:'收益算在谁头上也分档:你自己最高,其次是配偶与直系亲属,再次是朋友同事,陌生人最低。「最低」不是「零」:只是回报的期望更小,风险要与收益一起权衡。', fbAria:'翻译反馈', fbIssueT:'发现翻译有误 —', fbIssue:'欢迎提 issue', fbStarT:'觉得翻译不错 —', fbStar:'给仓库点个 star', @@ -449,7 +449,7 @@

Пособие по выгодной жизни

fDispute:'只看有争议', fTodo:'只看待核实', hint1:'小节单选,花费与等级可多选。组内「或」,组间「且」。', hint2:'小节内按性价比从高到低排列,搜索不改变顺序。', - hint3:'数据来自 book/ 目录(31 个文件);改正文请改那里。', + hint3:'数据来自 book/ 目录(31 个文件);改正文请改那里。', foot:'每个条目都标明收益口径:1–2 节——总死亡率或特定死因;3–4 节——时间精力;5 节——金钱;7 节——金钱与保障;8–9 节——金钱与人身自由。口径之间不做比较。来源核查:docs/核实记录(中文)。原文为 Public Domain(Unlicense)。', kCost:'成本', kGain:'收益', kNote:'备注', src:'来源', anchor:'链接到此条', ratioBadge:'性价比', ratioTitle:'作者判断:由效果量级', gradeBadge:'证据', dispute:'争议', todo:'有待核实', diff --git a/v2/ru/index.html b/v2/ru/index.html index cf472d50..2de313ea 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -33,9 +33,6 @@ ]} - - - @@ -214,7 +214,7 @@

Пособие по выгодной жизни

Русский перевод книги HowToLiveBetter (高性价比人生指南 · «Пособие по выгодной жизни»): 31 раздел, каждая рекомендация — с стоимостью, эффектом, уровнем доказательности и первоисточником.

-

Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.

+

Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.

@@ -230,13 +230,13 @@

Пособие по выгодной жизни

@@ -307,7 +307,7 @@

Пособие по выгодной жизни

Раздел выбирается один, затраты и уровень — можно несколько. Внутри группы выбор «или», между группами «и».

Внутри раздела — по убыванию выгоды. Поиск не меняет порядок.

-

Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.

+

Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.

@@ -361,7 +361,7 @@

Пособие по выгодной жизни

ru:{ htmlLang:'ru', title:'Пособие по выгодной жизни', search:'Поиск по рекомендациям', noscriptH:'Пособие по выгодной жизни', noscriptP:'Русский перевод книги HowToLiveBetter (高性价比人生指南): 31 раздел, каждая рекомендация — с стоимостью, эффектом, уровнем доказательности и первоисточником.', - noscriptLink:'Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.', + noscriptLink:'Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.', docHead:'Каждая рекомендация отвечает на два вопроса: чем рискуешь — и что получаешь.', docHead2:'Кому достаётся выгода, тоже разбито по уровням: сам ты — выше всего, затем супруг и близкие родственники, потом друзья и коллеги, незнакомцы — ниже всех. «Ниже всех» не значит «ноль»: просто надежда на ответ меньше, а риски нужно учитывать вместе с выгодой.', fbAria:'Обратная связь о переводе', fbIssueT:'Нашли ошибку в переводе —', fbIssue:'откройте issue', fbStarT:'Понравился перевод —', fbStar:'поставьте звезду репо', @@ -375,7 +375,7 @@

Пособие по выгодной жизни

fDispute:'только спорные', fTodo:'только требующие проверки', hint1:'Раздел выбирается один, затраты и уровень — можно несколько. Внутри группы выбор «или», между группами «и».', hint2:'Внутри раздела — по убыванию выгоды. Поиск не меняет порядок.', - hint3:'Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.', + hint3:'Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.', foot:'Категория эффекта указана в каждом пункте: разд. 1–2 — общая смертность или конкретная причина смерти; разд. 3–4 — время и силы; разд. 5 — деньги; разд. 7 — деньги и гарантии; разд. 8–9 — деньги и личная свобода. Категории между собой не сравниваются. Проверка источников: docs/核实记录 (отчёт о проверке источников, на китайском). Оригинал — Public Domain (Unlicense).', kCost:'Стоимость', kGain:'Эффект', kNote:'Примечания', src:'Источники', anchor:'Ссылка на этот пункт', ratioBadge:'Выгода/затраты', ratioTitle:'Оценка автора: из уровня эффекта', gradeBadge:'Доказательность', dispute:'Спорно', todo:'Есть непроверенное', @@ -398,7 +398,7 @@

Пособие по выгодной жизни

en:{ htmlLang:'en', title:'The Best-Value Life Guide', search:'Search the recommendations', noscriptH:'The Best-Value Life Guide', noscriptP:'English translation of HowToLiveBetter (高性价比人生指南): 31 sections; every recommendation states its cost, benefit, evidence grade, and primary source.', - noscriptLink:'Filters and search on this page require JavaScript. The text can be read directly: README.md (table of contents) and the book/en/ directory.', + noscriptLink:'Filters and search on this page require JavaScript. The text can be read directly: README.md (table of contents) and the book/en/ directory.', docHead:'Every recommendation answers two questions: what it costs — and what it buys back.', docHead2:'Whose account the benefit lands on is tiered too: you yourself come first, then spouse and immediate family, then friends and colleagues; strangers come lowest. "Lowest" does not mean "zero": the chance of return is smaller, and the risks must be weighed together with the benefit.', fbAria:'Translation feedback', fbIssueT:'Spotted a mistake in the translation —', fbIssue:'open an issue', fbStarT:'Like the translation —', fbStar:'give the repo a star', @@ -412,7 +412,7 @@

Пособие по выгодной жизни

fDispute:'contested only', fTodo:'unverified only', hint1:'One section at a time; costs and level can be combined. Within a group the choice is "or", between groups "and".', hint2:'Within a section — by descending benefit. Search does not change the order.', - hint3:'Data comes from the book/en/ directory (31 files); edit the text there.', + hint3:'Data comes from the book/en/ directory (31 files); edit the text there.', foot:'The benefit category is stated on every item: sec. 1–2 — all-cause mortality or a specific cause of death; sec. 3–4 — time and energy; sec. 5 — money; sec. 7 — money and protection; sec. 8–9 — money and personal freedom. Categories are not compared with each other. Source verification: docs/核实记录 (verification records, in Chinese). The original is Public Domain (Unlicense).', kCost:'Cost', kGain:'Benefit', kNote:'Notes', src:'Sources', anchor:'Link to this item', ratioBadge:'Benefit/costs', ratioTitle:'Author judgment: from the effect level', gradeBadge:'Evidence', dispute:'Contested', todo:'Has unverified', @@ -435,7 +435,7 @@

Пособие по выгодной жизни

zh:{ htmlLang:'zh', title:'高性价比人生指南', search:'搜索建议', noscriptH:'高性价比人生指南', noscriptP:'《高性价比人生指南》:31 个小节,每条建议都写明成本、收益、证据等级与原始出处。', - noscriptLink:'本页的筛选与搜索需要 JavaScript。也可直接阅读:README.zh.md(目录)与 book/ 目录。', + noscriptLink:'本页的筛选与搜索需要 JavaScript。也可直接阅读:README.zh.md(目录)与 book/ 目录。', docHead:'每条建议回答两个问题:付出什么——换回什么。', docHead2:'收益算在谁头上也分档:你自己最高,其次是配偶与直系亲属,再次是朋友同事,陌生人最低。「最低」不是「零」:只是回报的期望更小,风险要与收益一起权衡。', fbAria:'翻译反馈', fbIssueT:'发现翻译有误 —', fbIssue:'欢迎提 issue', fbStarT:'觉得翻译不错 —', fbStar:'给仓库点个 star', @@ -449,7 +449,7 @@

Пособие по выгодной жизни

fDispute:'只看有争议', fTodo:'只看待核实', hint1:'小节单选,花费与等级可多选。组内「或」,组间「且」。', hint2:'小节内按性价比从高到低排列,搜索不改变顺序。', - hint3:'数据来自 book/ 目录(31 个文件);改正文请改那里。', + hint3:'数据来自 book/ 目录(31 个文件);改正文请改那里。', foot:'每个条目都标明收益口径:1–2 节——总死亡率或特定死因;3–4 节——时间精力;5 节——金钱;7 节——金钱与保障;8–9 节——金钱与人身自由。口径之间不做比较。来源核查:docs/核实记录(中文)。原文为 Public Domain(Unlicense)。', kCost:'成本', kGain:'收益', kNote:'备注', src:'来源', anchor:'链接到此条', ratioBadge:'性价比', ratioTitle:'作者判断:由效果量级', gradeBadge:'证据', dispute:'争议', todo:'有待核实', diff --git a/v2/zh/index.html b/v2/zh/index.html index 648c8278..8572e52a 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -33,9 +33,6 @@ ]} - - - @@ -214,7 +214,7 @@

Пособие по выгодной жизни

Русский перевод книги HowToLiveBetter (高性价比人生指南 · «Пособие по выгодной жизни»): 31 раздел, каждая рекомендация — с стоимостью, эффектом, уровнем доказательности и первоисточником.

-

Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.

+

Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.

@@ -230,13 +230,13 @@

Пособие по выгодной жизни

@@ -307,7 +307,7 @@

Пособие по выгодной жизни

Раздел выбирается один, затраты и уровень — можно несколько. Внутри группы выбор «или», между группами «и».

Внутри раздела — по убыванию выгоды. Поиск не меняет порядок.

-

Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.

+

Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.

@@ -361,7 +361,7 @@

Пособие по выгодной жизни

ru:{ htmlLang:'ru', title:'Пособие по выгодной жизни', search:'Поиск по рекомендациям', noscriptH:'Пособие по выгодной жизни', noscriptP:'Русский перевод книги HowToLiveBetter (高性价比人生指南): 31 раздел, каждая рекомендация — с стоимостью, эффектом, уровнем доказательности и первоисточником.', - noscriptLink:'Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.', + noscriptLink:'Фильтры и поиск на этой странице требуют JavaScript. Текст можно читать напрямую: README.ru.md (оглавление) и каталог book/ru/.', docHead:'Каждая рекомендация отвечает на два вопроса: чем рискуешь — и что получаешь.', docHead2:'Кому достаётся выгода, тоже разбито по уровням: сам ты — выше всего, затем супруг и близкие родственники, потом друзья и коллеги, незнакомцы — ниже всех. «Ниже всех» не значит «ноль»: просто надежда на ответ меньше, а риски нужно учитывать вместе с выгодой.', fbAria:'Обратная связь о переводе', fbIssueT:'Нашли ошибку в переводе —', fbIssue:'откройте issue', fbStarT:'Понравился перевод —', fbStar:'поставьте звезду репо', @@ -375,7 +375,7 @@

Пособие по выгодной жизни

fDispute:'только спорные', fTodo:'только требующие проверки', hint1:'Раздел выбирается один, затраты и уровень — можно несколько. Внутри группы выбор «или», между группами «и».', hint2:'Внутри раздела — по убыванию выгоды. Поиск не меняет порядок.', - hint3:'Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.', + hint3:'Данные — из каталога book/ru/ (31 файл); правки текста вносятся там.', foot:'Категория эффекта указана в каждом пункте: разд. 1–2 — общая смертность или конкретная причина смерти; разд. 3–4 — время и силы; разд. 5 — деньги; разд. 7 — деньги и гарантии; разд. 8–9 — деньги и личная свобода. Категории между собой не сравниваются. Проверка источников: docs/核实记录 (отчёт о проверке источников, на китайском). Оригинал — Public Domain (Unlicense).', kCost:'Стоимость', kGain:'Эффект', kNote:'Примечания', src:'Источники', anchor:'Ссылка на этот пункт', ratioBadge:'Выгода/затраты', ratioTitle:'Оценка автора: из уровня эффекта', gradeBadge:'Доказательность', dispute:'Спорно', todo:'Есть непроверенное', @@ -398,7 +398,7 @@

Пособие по выгодной жизни

en:{ htmlLang:'en', title:'The Best-Value Life Guide', search:'Search the recommendations', noscriptH:'The Best-Value Life Guide', noscriptP:'English translation of HowToLiveBetter (高性价比人生指南): 31 sections; every recommendation states its cost, benefit, evidence grade, and primary source.', - noscriptLink:'Filters and search on this page require JavaScript. The text can be read directly: README.md (table of contents) and the book/en/ directory.', + noscriptLink:'Filters and search on this page require JavaScript. The text can be read directly: README.md (table of contents) and the book/en/ directory.', docHead:'Every recommendation answers two questions: what it costs — and what it buys back.', docHead2:'Whose account the benefit lands on is tiered too: you yourself come first, then spouse and immediate family, then friends and colleagues; strangers come lowest. "Lowest" does not mean "zero": the chance of return is smaller, and the risks must be weighed together with the benefit.', fbAria:'Translation feedback', fbIssueT:'Spotted a mistake in the translation —', fbIssue:'open an issue', fbStarT:'Like the translation —', fbStar:'give the repo a star', @@ -412,7 +412,7 @@

Пособие по выгодной жизни

fDispute:'contested only', fTodo:'unverified only', hint1:'One section at a time; costs and level can be combined. Within a group the choice is "or", between groups "and".', hint2:'Within a section — by descending benefit. Search does not change the order.', - hint3:'Data comes from the book/en/ directory (31 files); edit the text there.', + hint3:'Data comes from the book/en/ directory (31 files); edit the text there.', foot:'The benefit category is stated on every item: sec. 1–2 — all-cause mortality or a specific cause of death; sec. 3–4 — time and energy; sec. 5 — money; sec. 7 — money and protection; sec. 8–9 — money and personal freedom. Categories are not compared with each other. Source verification: docs/核实记录 (verification records, in Chinese). The original is Public Domain (Unlicense).', kCost:'Cost', kGain:'Benefit', kNote:'Notes', src:'Sources', anchor:'Link to this item', ratioBadge:'Benefit/costs', ratioTitle:'Author judgment: from the effect level', gradeBadge:'Evidence', dispute:'Contested', todo:'Has unverified', @@ -435,7 +435,7 @@

Пособие по выгодной жизни

zh:{ htmlLang:'zh', title:'高性价比人生指南', search:'搜索建议', noscriptH:'高性价比人生指南', noscriptP:'《高性价比人生指南》:31 个小节,每条建议都写明成本、收益、证据等级与原始出处。', - noscriptLink:'本页的筛选与搜索需要 JavaScript。也可直接阅读:README.zh.md(目录)与 book/ 目录。', + noscriptLink:'本页的筛选与搜索需要 JavaScript。也可直接阅读:README.zh.md(目录)与 book/ 目录。', docHead:'每条建议回答两个问题:付出什么——换回什么。', docHead2:'收益算在谁头上也分档:你自己最高,其次是配偶与直系亲属,再次是朋友同事,陌生人最低。「最低」不是「零」:只是回报的期望更小,风险要与收益一起权衡。', fbAria:'翻译反馈', fbIssueT:'发现翻译有误 —', fbIssue:'欢迎提 issue', fbStarT:'觉得翻译不错 —', fbStar:'给仓库点个 star', @@ -449,7 +449,7 @@

Пособие по выгодной жизни

fDispute:'只看有争议', fTodo:'只看待核实', hint1:'小节单选,花费与等级可多选。组内「或」,组间「且」。', hint2:'小节内按性价比从高到低排列,搜索不改变顺序。', - hint3:'数据来自 book/ 目录(31 个文件);改正文请改那里。', + hint3:'数据来自 book/ 目录(31 个文件);改正文请改那里。', foot:'每个条目都标明收益口径:1–2 节——总死亡率或特定死因;3–4 节——时间精力;5 节——金钱;7 节——金钱与保障;8–9 节——金钱与人身自由。口径之间不做比较。来源核查:docs/核实记录(中文)。原文为 Public Domain(Unlicense)。', kCost:'成本', kGain:'收益', kNote:'备注', src:'来源', anchor:'链接到此条', ratioBadge:'性价比', ratioTitle:'作者判断:由效果量级', gradeBadge:'证据', dispute:'争议', todo:'有待核实', From 2ecc078e02edd1a14464165b25b1fc3a78bdba6c Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 12:15:00 +0000 Subject: [PATCH 05/13] =?UTF-8?q?web(v2):=20press=20features=20=E2=80=94?= =?UTF-8?q?=20scroll-spy,=20marginalia,=20typography=20details?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scroll-spy: sidebar highlights current section on scroll (rAF-batched, passive listeners, v2-only via __HTLB_V2__ flag) - marginalia (Tufte-style): notes move to right margin >=1440px, stay in card flow below; .marg aside rendered per card (v2-only) - typography: text-wrap:balance on headings, hyphens:auto - build: inject __HTLB_V2__=1 flag into v2 pages (was missing — all v2-conditional JS branches were dead) --- index.html | 34 +++++++++++++++++++++++++++ tools/build_pages.py | 4 +++- tools/v2.css | 20 ++++++++++++++++ v2/en/index.html | 56 +++++++++++++++++++++++++++++++++++++++++++- v2/ru/index.html | 56 +++++++++++++++++++++++++++++++++++++++++++- v2/zh/index.html | 56 +++++++++++++++++++++++++++++++++++++++++++- 6 files changed, 222 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index b9f9ac1f..fc1f2249 100644 --- a/index.html +++ b/index.html @@ -802,6 +802,11 @@

Пособие по выгодной жизни

`; + if (window.__HTLB_V2__){ + const mg = document.createElement('aside'); mg.className = 'marg'; + mg.innerHTML = ``; + c.appendChild(mg); + } c.querySelector('[data-k="cost"]').textContent = T().kCost; c.querySelector('[data-k="gain"]').textContent = T().kGain; c.querySelector('[data-k="note"]').textContent = T().kNote; @@ -864,6 +869,8 @@

Пособие по выгодной жизни

if (e.human) renderText(f.human, e.human, terms); renderText(f.gain, e.gain, terms); renderText(f.note, e.note, terms); + const mg = f.note.closest('.card')?.querySelector('.marg'); + if (mg){ mg.querySelector('.k').textContent = T().kNote; renderText(mg.querySelector('.mt'), e.note, terms); } renderText(f.src, e.src, terms); const inBody = (e.title+e.human+e.cost+e.gain+e.note).toLowerCase(); f.details.open = terms.length > 0 && terms.some(t => e.src.toLowerCase().includes(t)) && !terms.some(t => inBody.includes(t)); @@ -901,6 +908,24 @@

Пособие по выгодной жизни

PERF.log('apply', t0, `найдено ${shown}, перерисовано ${rerender}`); } +/* ---------- scroll-spy: подсветка текущего раздела в сайдбаре ---------- */ +let SPY_LINKS = null; +function spyTick(){ + if (!SPY_LINKS) return; + const navH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--nav-h')) || 0; + const probe = navH + 120; + let cur = ''; + for (const b of BLOCKS){ + if (b.el.hidden) continue; + const r = b.el.getBoundingClientRect(); + if (r.top <= probe) cur = b.n; else break; + } + for (const {n, btn} of SPY_LINKS){ + const on = n === cur; + if (btn.dataset.spy !== String(on)){ btn.dataset.spy = String(on); btn.classList.toggle('spy-on', on); } + } +} + /* ---------- 事件 ---------- */ function wire(){ const sb = document.getElementById('sidebar'), bd = document.getElementById('backdrop'), mb = document.getElementById('menu'); @@ -973,6 +998,15 @@

Пособие по выгодной жизни

status.remove(); const t2 = performance.now(); build(sections); PERF.log('построение DOM', t2, CARDS.length + ' карточек'); buildGlossary(); readUrl(); wire(); apply(); + // scroll-spy: только в v2-скине, после первой раскладки + if (window.__HTLB_V2__ && BLOCKS.length){ + SPY_LINKS = [...document.querySelectorAll('#f-sec .sec-link:not(.all)')].map(btn => ({ n: btn.dataset.v, btn })); + let spyPending = false; + const onScroll = () => { if (spyPending) return; spyPending = true; requestAnimationFrame(() => { spyPending = false; spyTick(); }); }; + window.addEventListener('scroll', onScroll, { passive: true }); + window.addEventListener('resize', onScroll, { passive: true }); + spyTick(); + } PERF.mark(`DOM-узлов ${document.getElementsByTagName('*').length}, терминов ${GLOSS.length}`); if (location.hash){ const target = document.getElementById(location.hash.slice(1)); diff --git a/tools/build_pages.py b/tools/build_pages.py index 4fc38033..09042104 100644 --- a/tools/build_pages.py +++ b/tools/build_pages.py @@ -33,7 +33,9 @@ if V2MARK not in src: print('note: root index.html has no %s marker; v2 pages get skin flag only via generation' % V2MARK) for lang in ('ru','en','zh'): - d = src.replace(tpl, "" % lang) + d = src.replace(tpl, "" % lang) + # README/book links in header & noscript point to repo root; v2 lives one level deeper + d = d.replace('href="README', 'href="../../README').replace('href="book/', 'href="../../book/') d = STYLE_RE.sub(lambda _: '', d, count=1) d = d.replace(CANON, '' % lang) d = d.replace(OGURL, '' % lang) diff --git a/tools/v2.css b/tools/v2.css index a15b4137..013b5709 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -129,6 +129,26 @@ html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} .src .body p{margin:0 0 .6em} .src .body a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .src .body a:hover{color:var(--hover)} + +/* ---------- press polish: scroll-spy, marginalia ---------- */ +/* подсветка текущего раздела в сайдбаре */ +.sec-link.spy-on{color:var(--ink)} +.sec-link.spy-on span{text-decoration:underline;text-decoration-color:var(--ink);text-underline-offset:3px} +h1,h2,h3{text-wrap:balance} +body{hyphens:auto;-webkit-hyphens:auto} +/* маргиналии по-Тафти: Примечания уходят в правое поле; колонка прижата влево, + чтобы поле было широким; на узких экранах всё остаётся в потоке */ +@media (min-width:1440px){ + .doc{margin-left:0;margin-right:auto} + .card{position:relative} + .card .marg{position:absolute;top:2px;left:calc(100% + 36px);width:200px} + .card > .rows [data-k="note"],.card > .rows [data-k="note"] + .v{display:none} +} +@media (max-width:1439px){ + .card .marg{display:none} +} +.marg{font:13.5px/1.65 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.marg .k{font:700 10px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint);display:block} .term{cursor:help;text-decoration:underline;text-decoration-style:dotted;text-decoration-color:var(--faint);text-underline-offset:3px} .term:hover,.term:focus-visible{color:var(--ink)} diff --git a/v2/en/index.html b/v2/en/index.html index 0011d821..4a08c971 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -1,7 +1,7 @@ - + Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы @@ -165,6 +165,26 @@ .src .body p{margin:0 0 .6em} .src .body a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .src .body a:hover{color:var(--hover)} + +/* ---------- press polish: scroll-spy, marginalia ---------- */ +/* подсветка текущего раздела в сайдбаре */ +.sec-link.spy-on{color:var(--ink)} +.sec-link.spy-on span{text-decoration:underline;text-decoration-color:var(--ink);text-underline-offset:3px} +h1,h2,h3{text-wrap:balance} +body{hyphens:auto;-webkit-hyphens:auto} +/* маргиналии по-Тафти: Примечания уходят в правое поле; колонка прижата влево, + чтобы поле было широким; на узких экранах всё остаётся в потоке */ +@media (min-width:1440px){ + .doc{margin-left:0;margin-right:auto} + .card{position:relative} + .card .marg{position:absolute;top:2px;left:calc(100% + 36px);width:200px} + .card > .rows [data-k="note"],.card > .rows [data-k="note"] + .v{display:none} +} +@media (max-width:1439px){ + .card .marg{display:none} +} +.marg{font:13.5px/1.65 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.marg .k{font:700 10px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint);display:block} .term{cursor:help;text-decoration:underline;text-decoration-style:dotted;text-decoration-color:var(--faint);text-underline-offset:3px} .term:hover,.term:focus-visible{color:var(--ink)} @@ -785,6 +805,11 @@

Пособие по выгодной жизни

`; + if (window.__HTLB_V2__){ + const mg = document.createElement('aside'); mg.className = 'marg'; + mg.innerHTML = ``; + c.appendChild(mg); + } c.querySelector('[data-k="cost"]').textContent = T().kCost; c.querySelector('[data-k="gain"]').textContent = T().kGain; c.querySelector('[data-k="note"]').textContent = T().kNote; @@ -847,6 +872,8 @@

Пособие по выгодной жизни

if (e.human) renderText(f.human, e.human, terms); renderText(f.gain, e.gain, terms); renderText(f.note, e.note, terms); + const mg = f.note.closest('.card')?.querySelector('.marg'); + if (mg){ mg.querySelector('.k').textContent = T().kNote; renderText(mg.querySelector('.mt'), e.note, terms); } renderText(f.src, e.src, terms); const inBody = (e.title+e.human+e.cost+e.gain+e.note).toLowerCase(); f.details.open = terms.length > 0 && terms.some(t => e.src.toLowerCase().includes(t)) && !terms.some(t => inBody.includes(t)); @@ -884,6 +911,24 @@

Пособие по выгодной жизни

PERF.log('apply', t0, `найдено ${shown}, перерисовано ${rerender}`); } +/* ---------- scroll-spy: подсветка текущего раздела в сайдбаре ---------- */ +let SPY_LINKS = null; +function spyTick(){ + if (!SPY_LINKS) return; + const navH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--nav-h')) || 0; + const probe = navH + 120; + let cur = ''; + for (const b of BLOCKS){ + if (b.el.hidden) continue; + const r = b.el.getBoundingClientRect(); + if (r.top <= probe) cur = b.n; else break; + } + for (const {n, btn} of SPY_LINKS){ + const on = n === cur; + if (btn.dataset.spy !== String(on)){ btn.dataset.spy = String(on); btn.classList.toggle('spy-on', on); } + } +} + /* ---------- 事件 ---------- */ function wire(){ const sb = document.getElementById('sidebar'), bd = document.getElementById('backdrop'), mb = document.getElementById('menu'); @@ -956,6 +1001,15 @@

Пособие по выгодной жизни

status.remove(); const t2 = performance.now(); build(sections); PERF.log('построение DOM', t2, CARDS.length + ' карточек'); buildGlossary(); readUrl(); wire(); apply(); + // scroll-spy: только в v2-скине, после первой раскладки + if (window.__HTLB_V2__ && BLOCKS.length){ + SPY_LINKS = [...document.querySelectorAll('#f-sec .sec-link:not(.all)')].map(btn => ({ n: btn.dataset.v, btn })); + let spyPending = false; + const onScroll = () => { if (spyPending) return; spyPending = true; requestAnimationFrame(() => { spyPending = false; spyTick(); }); }; + window.addEventListener('scroll', onScroll, { passive: true }); + window.addEventListener('resize', onScroll, { passive: true }); + spyTick(); + } PERF.mark(`DOM-узлов ${document.getElementsByTagName('*').length}, терминов ${GLOSS.length}`); if (location.hash){ const target = document.getElementById(location.hash.slice(1)); diff --git a/v2/ru/index.html b/v2/ru/index.html index 2de313ea..c09708c1 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -1,7 +1,7 @@ - + Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы @@ -165,6 +165,26 @@ .src .body p{margin:0 0 .6em} .src .body a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .src .body a:hover{color:var(--hover)} + +/* ---------- press polish: scroll-spy, marginalia ---------- */ +/* подсветка текущего раздела в сайдбаре */ +.sec-link.spy-on{color:var(--ink)} +.sec-link.spy-on span{text-decoration:underline;text-decoration-color:var(--ink);text-underline-offset:3px} +h1,h2,h3{text-wrap:balance} +body{hyphens:auto;-webkit-hyphens:auto} +/* маргиналии по-Тафти: Примечания уходят в правое поле; колонка прижата влево, + чтобы поле было широким; на узких экранах всё остаётся в потоке */ +@media (min-width:1440px){ + .doc{margin-left:0;margin-right:auto} + .card{position:relative} + .card .marg{position:absolute;top:2px;left:calc(100% + 36px);width:200px} + .card > .rows [data-k="note"],.card > .rows [data-k="note"] + .v{display:none} +} +@media (max-width:1439px){ + .card .marg{display:none} +} +.marg{font:13.5px/1.65 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.marg .k{font:700 10px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint);display:block} .term{cursor:help;text-decoration:underline;text-decoration-style:dotted;text-decoration-color:var(--faint);text-underline-offset:3px} .term:hover,.term:focus-visible{color:var(--ink)} @@ -785,6 +805,11 @@

Пособие по выгодной жизни

`; + if (window.__HTLB_V2__){ + const mg = document.createElement('aside'); mg.className = 'marg'; + mg.innerHTML = ``; + c.appendChild(mg); + } c.querySelector('[data-k="cost"]').textContent = T().kCost; c.querySelector('[data-k="gain"]').textContent = T().kGain; c.querySelector('[data-k="note"]').textContent = T().kNote; @@ -847,6 +872,8 @@

Пособие по выгодной жизни

if (e.human) renderText(f.human, e.human, terms); renderText(f.gain, e.gain, terms); renderText(f.note, e.note, terms); + const mg = f.note.closest('.card')?.querySelector('.marg'); + if (mg){ mg.querySelector('.k').textContent = T().kNote; renderText(mg.querySelector('.mt'), e.note, terms); } renderText(f.src, e.src, terms); const inBody = (e.title+e.human+e.cost+e.gain+e.note).toLowerCase(); f.details.open = terms.length > 0 && terms.some(t => e.src.toLowerCase().includes(t)) && !terms.some(t => inBody.includes(t)); @@ -884,6 +911,24 @@

Пособие по выгодной жизни

PERF.log('apply', t0, `найдено ${shown}, перерисовано ${rerender}`); } +/* ---------- scroll-spy: подсветка текущего раздела в сайдбаре ---------- */ +let SPY_LINKS = null; +function spyTick(){ + if (!SPY_LINKS) return; + const navH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--nav-h')) || 0; + const probe = navH + 120; + let cur = ''; + for (const b of BLOCKS){ + if (b.el.hidden) continue; + const r = b.el.getBoundingClientRect(); + if (r.top <= probe) cur = b.n; else break; + } + for (const {n, btn} of SPY_LINKS){ + const on = n === cur; + if (btn.dataset.spy !== String(on)){ btn.dataset.spy = String(on); btn.classList.toggle('spy-on', on); } + } +} + /* ---------- 事件 ---------- */ function wire(){ const sb = document.getElementById('sidebar'), bd = document.getElementById('backdrop'), mb = document.getElementById('menu'); @@ -956,6 +1001,15 @@

Пособие по выгодной жизни

status.remove(); const t2 = performance.now(); build(sections); PERF.log('построение DOM', t2, CARDS.length + ' карточек'); buildGlossary(); readUrl(); wire(); apply(); + // scroll-spy: только в v2-скине, после первой раскладки + if (window.__HTLB_V2__ && BLOCKS.length){ + SPY_LINKS = [...document.querySelectorAll('#f-sec .sec-link:not(.all)')].map(btn => ({ n: btn.dataset.v, btn })); + let spyPending = false; + const onScroll = () => { if (spyPending) return; spyPending = true; requestAnimationFrame(() => { spyPending = false; spyTick(); }); }; + window.addEventListener('scroll', onScroll, { passive: true }); + window.addEventListener('resize', onScroll, { passive: true }); + spyTick(); + } PERF.mark(`DOM-узлов ${document.getElementsByTagName('*').length}, терминов ${GLOSS.length}`); if (location.hash){ const target = document.getElementById(location.hash.slice(1)); diff --git a/v2/zh/index.html b/v2/zh/index.html index 8572e52a..b156d25b 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -1,7 +1,7 @@ - + Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы @@ -165,6 +165,26 @@ .src .body p{margin:0 0 .6em} .src .body a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .src .body a:hover{color:var(--hover)} + +/* ---------- press polish: scroll-spy, marginalia ---------- */ +/* подсветка текущего раздела в сайдбаре */ +.sec-link.spy-on{color:var(--ink)} +.sec-link.spy-on span{text-decoration:underline;text-decoration-color:var(--ink);text-underline-offset:3px} +h1,h2,h3{text-wrap:balance} +body{hyphens:auto;-webkit-hyphens:auto} +/* маргиналии по-Тафти: Примечания уходят в правое поле; колонка прижата влево, + чтобы поле было широким; на узких экранах всё остаётся в потоке */ +@media (min-width:1440px){ + .doc{margin-left:0;margin-right:auto} + .card{position:relative} + .card .marg{position:absolute;top:2px;left:calc(100% + 36px);width:200px} + .card > .rows [data-k="note"],.card > .rows [data-k="note"] + .v{display:none} +} +@media (max-width:1439px){ + .card .marg{display:none} +} +.marg{font:13.5px/1.65 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.marg .k{font:700 10px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint);display:block} .term{cursor:help;text-decoration:underline;text-decoration-style:dotted;text-decoration-color:var(--faint);text-underline-offset:3px} .term:hover,.term:focus-visible{color:var(--ink)} @@ -785,6 +805,11 @@

Пособие по выгодной жизни

`; + if (window.__HTLB_V2__){ + const mg = document.createElement('aside'); mg.className = 'marg'; + mg.innerHTML = ``; + c.appendChild(mg); + } c.querySelector('[data-k="cost"]').textContent = T().kCost; c.querySelector('[data-k="gain"]').textContent = T().kGain; c.querySelector('[data-k="note"]').textContent = T().kNote; @@ -847,6 +872,8 @@

Пособие по выгодной жизни

if (e.human) renderText(f.human, e.human, terms); renderText(f.gain, e.gain, terms); renderText(f.note, e.note, terms); + const mg = f.note.closest('.card')?.querySelector('.marg'); + if (mg){ mg.querySelector('.k').textContent = T().kNote; renderText(mg.querySelector('.mt'), e.note, terms); } renderText(f.src, e.src, terms); const inBody = (e.title+e.human+e.cost+e.gain+e.note).toLowerCase(); f.details.open = terms.length > 0 && terms.some(t => e.src.toLowerCase().includes(t)) && !terms.some(t => inBody.includes(t)); @@ -884,6 +911,24 @@

Пособие по выгодной жизни

PERF.log('apply', t0, `найдено ${shown}, перерисовано ${rerender}`); } +/* ---------- scroll-spy: подсветка текущего раздела в сайдбаре ---------- */ +let SPY_LINKS = null; +function spyTick(){ + if (!SPY_LINKS) return; + const navH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--nav-h')) || 0; + const probe = navH + 120; + let cur = ''; + for (const b of BLOCKS){ + if (b.el.hidden) continue; + const r = b.el.getBoundingClientRect(); + if (r.top <= probe) cur = b.n; else break; + } + for (const {n, btn} of SPY_LINKS){ + const on = n === cur; + if (btn.dataset.spy !== String(on)){ btn.dataset.spy = String(on); btn.classList.toggle('spy-on', on); } + } +} + /* ---------- 事件 ---------- */ function wire(){ const sb = document.getElementById('sidebar'), bd = document.getElementById('backdrop'), mb = document.getElementById('menu'); @@ -956,6 +1001,15 @@

Пособие по выгодной жизни

status.remove(); const t2 = performance.now(); build(sections); PERF.log('построение DOM', t2, CARDS.length + ' карточек'); buildGlossary(); readUrl(); wire(); apply(); + // scroll-spy: только в v2-скине, после первой раскладки + if (window.__HTLB_V2__ && BLOCKS.length){ + SPY_LINKS = [...document.querySelectorAll('#f-sec .sec-link:not(.all)')].map(btn => ({ n: btn.dataset.v, btn })); + let spyPending = false; + const onScroll = () => { if (spyPending) return; spyPending = true; requestAnimationFrame(() => { spyPending = false; spyTick(); }); }; + window.addEventListener('scroll', onScroll, { passive: true }); + window.addEventListener('resize', onScroll, { passive: true }); + spyTick(); + } PERF.mark(`DOM-узлов ${document.getElementsByTagName('*').length}, терминов ${GLOSS.length}`); if (location.hash){ const target = document.getElementById(location.hash.slice(1)); From 0f74a54f192a4d2e2addbd304a53c3651f56dea0 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 12:32:30 +0000 Subject: [PATCH 06/13] =?UTF-8?q?web(v2):=20header=20buttons=20=E2=80=94?= =?UTF-8?q?=20version=20switch=20v2->v1,=20theme=20as=20icon=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - new ver-switch button (history icon) next to theme: navigates to the same page on v1 preserving query and hash; shown only on v2 (html.v2 class injected by build_pages.py), hidden on v1 - theme control: slider replaced with icon button (moon in light, sun in dark), works on both v1 and v2, old .switch removed from CSS - i18n: verTitle for ru/en/zh; aria/title set in applyI18n --- index.html | 33 +++++++++++++++++++++------------ tools/build_pages.py | 2 +- tools/v2.css | 15 ++++++++------- v2/en/index.html | 34 +++++++++++++++++++++------------- v2/ru/index.html | 34 +++++++++++++++++++++------------- v2/zh/index.html | 34 +++++++++++++++++++++------------- 6 files changed, 93 insertions(+), 59 deletions(-) diff --git a/index.html b/index.html index fc1f2249..c71e771c 100644 --- a/index.html +++ b/index.html @@ -91,13 +91,15 @@ .icon-btn{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;color:var(--t2);transition:background .25s,color .25s} .icon-btn:hover{background:var(--bg-soft);color:var(--t1)} .icon-btn svg{width:20px;height:20px;fill:currentColor} -.switch{position:relative;width:40px;height:22px;border-radius:11px;border:1px solid var(--divider);background:var(--bg-mute);transition:border-color .25s,background .25s;flex:none;margin-left:8px} -.switch:hover{border-color:var(--t3)} -.switch .knob{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background:var(--bg-elv);box-shadow:var(--shadow);transition:transform .25s;display:grid;place-items:center} -html.dark .switch .knob{transform:translateX(18px)} -.switch svg{width:12px;height:12px;fill:var(--t2)} -.switch .sun{display:block} .switch .moon{display:none} -html.dark .switch .sun{display:none} html.dark .switch .moon{display:block} +/* кнопка темы вместо ползунка (v1 тоже): луна в светлой, солнце в тёмной */ +.theme-btn .sun{display:none} +html.dark .theme-btn .sun{display:block} +html.dark .theme-btn .moon{display:none} +/* версия v2→v1 скрыта на v1; в v2-скине включается */ +.ver-btn{display:none!important} +html.v2 .ver-btn{display:grid!important} +/* старый ползунок темы больше не используется */ +.switch{display:none!important} .menu-btn{display:none} /* sidebar */ @@ -253,9 +255,10 @@

Пособие по выгодной жизни

- + - + + @@ -407,7 +410,7 @@

Пособие по выгодной жизни

cap:true, allSections:'Все разделы', readmeHref:'README.ru.md', readmeTitle:'Открыть README.ru', - menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', + menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', verTitle:'Старая версия сайта', metaDesc:'Руководство, отсортированное по соотношению «результат/затраты»: 528 рекомендаций — здоровье и долголетие, первая помощь, деньги, защита от мошенников, правовые красные линии, работа, семья. У каждой — стоимость, эффект, уровень доказательности и первоисточник; фильтры по деньгам, времени и силе воли.', keywords:'здоровье,долголетие,доказательная медицина,смертность,экономия,финансы,мошенники,первая помощь,право,психология', author:'Как жить выгодно (перевод HowToLiveBetter)', @@ -444,7 +447,7 @@

Пособие по выгодной жизни

cap:true, allSections:'All sections', readmeHref:'README.md', readmeTitle:'Open README', - menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', + menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', verTitle:'Old site version', metaDesc:'A guide sorted by value for money: 528 recommendations — health and longevity, first aid, money, fraud protection, legal red lines, work, family. Each states its cost, benefit, evidence grade, and primary source; filter by money, time, and willpower.', keywords:'health,longevity,evidence-based medicine,mortality,saving money,personal finance,fraud,first aid,law,psychology', author:'HowToLiveBetter (English translation)', @@ -481,7 +484,7 @@

Пособие по выгодной жизни

cap:false, allSections:'全部小节', readmeHref:'README.zh.md', readmeTitle:'打开 README.zh', - menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', + menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', verTitle:'旧版网站', metaDesc:'按性价比排序的人生指南:528 条建议——健康长寿、急救、省钱、防骗、法律红线、工作、家庭。每条写明成本、收益、证据等级与原始出处,可按花钱、花时间、要毅力筛选。', keywords:'健康,长寿,循证医学,死亡率,省钱,个人理财,防骗,急救,法律,心理', author:'高性价比人生指南', @@ -541,6 +544,7 @@

Пособие по выгодной жизни

const ddS=document.querySelector('.lang-dd > summary'); if(ddS) ddS.title=t.ddTitle; const menu=document.getElementById('menu'); if(menu) menu.setAttribute('aria-label',t.menuAria); const th=document.getElementById('theme'); if(th){ th.setAttribute('aria-label',t.themeAria); th.setAttribute('title',t.themeAria); } + const vb=document.getElementById('ver-switch'); if(vb){ vb.setAttribute('title',t.verTitle); vb.setAttribute('aria-label',t.verTitle); } const gh=document.querySelector('.nav-r a[href*="github.com/dlgrv"]'); if(gh) gh.setAttribute('title',t.ghTitle); const rm=document.querySelector('.nav-r a[href^="README"]'); if(rm){ rm.setAttribute('href',t.readmeHref); rm.setAttribute('title',t.readmeTitle); } // head meta / social cards / JSON-LD @@ -970,6 +974,11 @@

Пособие по выгодной жизни

document.documentElement.classList.toggle('dark', dark); try { localStorage.setItem('theme', dark ? 'dark' : 'light'); } catch (e) {} }); + // v2 → v1: та же страница без /v2/, с сохранением запроса и якоря + const vb = document.getElementById('ver-switch'); + if (vb) vb.addEventListener('click', () => { + location.href = location.pathname.replace('/v2/', '/') + location.search + location.hash; + }); } /* ---------- 启动 ---------- */ diff --git a/tools/build_pages.py b/tools/build_pages.py index 09042104..c1a85fbe 100644 --- a/tools/build_pages.py +++ b/tools/build_pages.py @@ -33,7 +33,7 @@ if V2MARK not in src: print('note: root index.html has no %s marker; v2 pages get skin flag only via generation' % V2MARK) for lang in ('ru','en','zh'): - d = src.replace(tpl, "" % lang) + d = src.replace(tpl, "" % lang) # README/book links in header & noscript point to repo root; v2 lives one level deeper d = d.replace('href="README', 'href="../../README').replace('href="book/', 'href="../../book/') d = STYLE_RE.sub(lambda _: '', d, count=1) diff --git a/tools/v2.css b/tools/v2.css index 013b5709..35466318 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -46,13 +46,14 @@ button,input,kbd,summary{font-family:var(--sans)} .ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} -.switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} -.switch .knob svg{display:none} -.switch .sun{display:block}.switch .moon{display:none} -html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} -html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} +.switch{display:none!important} +/* кнопка темы: icon-btn с sun/moon — в светлой показываем луну (переход в тёмную), в тёмной — солнце */ +.theme-btn .sun{display:none} +html.dark .theme-btn .sun{display:block} +html.dark .theme-btn .moon{display:none} +/* кнопка версии: только в v2-скине (v1-страницы не получают ver-switch) */ +.ver-btn{display:none} +html.v2 .ver-btn{display:grid} /* ---------- language dropdown ---------- */ .lang-dd{position:relative} diff --git a/v2/en/index.html b/v2/en/index.html index 4a08c971..69c0efa0 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -1,7 +1,7 @@ - + Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы @@ -82,13 +82,14 @@ .ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} -.switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} -.switch .knob svg{display:none} -.switch .sun{display:block}.switch .moon{display:none} -html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} -html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} +.switch{display:none!important} +/* кнопка темы: icon-btn с sun/moon — в светлой показываем луну (переход в тёмную), в тёмной — солнце */ +.theme-btn .sun{display:none} +html.dark .theme-btn .sun{display:block} +html.dark .theme-btn .moon{display:none} +/* кнопка версии: только в v2-скине (v1-страницы не получают ver-switch) */ +.ver-btn{display:none} +html.v2 .ver-btn{display:grid} /* ---------- language dropdown ---------- */ .lang-dd{position:relative} @@ -256,9 +257,10 @@

Пособие по выгодной жизни

- + - + + @@ -410,7 +412,7 @@

Пособие по выгодной жизни

cap:true, allSections:'Все разделы', readmeHref:'README.ru.md', readmeTitle:'Открыть README.ru', - menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', + menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', verTitle:'Старая версия сайта', metaDesc:'Руководство, отсортированное по соотношению «результат/затраты»: 528 рекомендаций — здоровье и долголетие, первая помощь, деньги, защита от мошенников, правовые красные линии, работа, семья. У каждой — стоимость, эффект, уровень доказательности и первоисточник; фильтры по деньгам, времени и силе воли.', keywords:'здоровье,долголетие,доказательная медицина,смертность,экономия,финансы,мошенники,первая помощь,право,психология', author:'Как жить выгодно (перевод HowToLiveBetter)', @@ -447,7 +449,7 @@

Пособие по выгодной жизни

cap:true, allSections:'All sections', readmeHref:'README.md', readmeTitle:'Open README', - menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', + menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', verTitle:'Old site version', metaDesc:'A guide sorted by value for money: 528 recommendations — health and longevity, first aid, money, fraud protection, legal red lines, work, family. Each states its cost, benefit, evidence grade, and primary source; filter by money, time, and willpower.', keywords:'health,longevity,evidence-based medicine,mortality,saving money,personal finance,fraud,first aid,law,psychology', author:'HowToLiveBetter (English translation)', @@ -484,7 +486,7 @@

Пособие по выгодной жизни

cap:false, allSections:'全部小节', readmeHref:'README.zh.md', readmeTitle:'打开 README.zh', - menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', + menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', verTitle:'旧版网站', metaDesc:'按性价比排序的人生指南:528 条建议——健康长寿、急救、省钱、防骗、法律红线、工作、家庭。每条写明成本、收益、证据等级与原始出处,可按花钱、花时间、要毅力筛选。', keywords:'健康,长寿,循证医学,死亡率,省钱,个人理财,防骗,急救,法律,心理', author:'高性价比人生指南', @@ -544,6 +546,7 @@

Пособие по выгодной жизни

const ddS=document.querySelector('.lang-dd > summary'); if(ddS) ddS.title=t.ddTitle; const menu=document.getElementById('menu'); if(menu) menu.setAttribute('aria-label',t.menuAria); const th=document.getElementById('theme'); if(th){ th.setAttribute('aria-label',t.themeAria); th.setAttribute('title',t.themeAria); } + const vb=document.getElementById('ver-switch'); if(vb){ vb.setAttribute('title',t.verTitle); vb.setAttribute('aria-label',t.verTitle); } const gh=document.querySelector('.nav-r a[href*="github.com/dlgrv"]'); if(gh) gh.setAttribute('title',t.ghTitle); const rm=document.querySelector('.nav-r a[href^="README"]'); if(rm){ rm.setAttribute('href',t.readmeHref); rm.setAttribute('title',t.readmeTitle); } // head meta / social cards / JSON-LD @@ -973,6 +976,11 @@

Пособие по выгодной жизни

document.documentElement.classList.toggle('dark', dark); try { localStorage.setItem('theme', dark ? 'dark' : 'light'); } catch (e) {} }); + // v2 → v1: та же страница без /v2/, с сохранением запроса и якоря + const vb = document.getElementById('ver-switch'); + if (vb) vb.addEventListener('click', () => { + location.href = location.pathname.replace('/v2/', '/') + location.search + location.hash; + }); } /* ---------- 启动 ---------- */ diff --git a/v2/ru/index.html b/v2/ru/index.html index c09708c1..59332bcb 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -1,7 +1,7 @@ - + Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы @@ -82,13 +82,14 @@ .ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} -.switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} -.switch .knob svg{display:none} -.switch .sun{display:block}.switch .moon{display:none} -html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} -html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} +.switch{display:none!important} +/* кнопка темы: icon-btn с sun/moon — в светлой показываем луну (переход в тёмную), в тёмной — солнце */ +.theme-btn .sun{display:none} +html.dark .theme-btn .sun{display:block} +html.dark .theme-btn .moon{display:none} +/* кнопка версии: только в v2-скине (v1-страницы не получают ver-switch) */ +.ver-btn{display:none} +html.v2 .ver-btn{display:grid} /* ---------- language dropdown ---------- */ .lang-dd{position:relative} @@ -256,9 +257,10 @@

Пособие по выгодной жизни

- + - + + @@ -410,7 +412,7 @@

Пособие по выгодной жизни

cap:true, allSections:'Все разделы', readmeHref:'README.ru.md', readmeTitle:'Открыть README.ru', - menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', + menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', verTitle:'Старая версия сайта', metaDesc:'Руководство, отсортированное по соотношению «результат/затраты»: 528 рекомендаций — здоровье и долголетие, первая помощь, деньги, защита от мошенников, правовые красные линии, работа, семья. У каждой — стоимость, эффект, уровень доказательности и первоисточник; фильтры по деньгам, времени и силе воли.', keywords:'здоровье,долголетие,доказательная медицина,смертность,экономия,финансы,мошенники,первая помощь,право,психология', author:'Как жить выгодно (перевод HowToLiveBetter)', @@ -447,7 +449,7 @@

Пособие по выгодной жизни

cap:true, allSections:'All sections', readmeHref:'README.md', readmeTitle:'Open README', - menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', + menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', verTitle:'Old site version', metaDesc:'A guide sorted by value for money: 528 recommendations — health and longevity, first aid, money, fraud protection, legal red lines, work, family. Each states its cost, benefit, evidence grade, and primary source; filter by money, time, and willpower.', keywords:'health,longevity,evidence-based medicine,mortality,saving money,personal finance,fraud,first aid,law,psychology', author:'HowToLiveBetter (English translation)', @@ -484,7 +486,7 @@

Пособие по выгодной жизни

cap:false, allSections:'全部小节', readmeHref:'README.zh.md', readmeTitle:'打开 README.zh', - menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', + menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', verTitle:'旧版网站', metaDesc:'按性价比排序的人生指南:528 条建议——健康长寿、急救、省钱、防骗、法律红线、工作、家庭。每条写明成本、收益、证据等级与原始出处,可按花钱、花时间、要毅力筛选。', keywords:'健康,长寿,循证医学,死亡率,省钱,个人理财,防骗,急救,法律,心理', author:'高性价比人生指南', @@ -544,6 +546,7 @@

Пособие по выгодной жизни

const ddS=document.querySelector('.lang-dd > summary'); if(ddS) ddS.title=t.ddTitle; const menu=document.getElementById('menu'); if(menu) menu.setAttribute('aria-label',t.menuAria); const th=document.getElementById('theme'); if(th){ th.setAttribute('aria-label',t.themeAria); th.setAttribute('title',t.themeAria); } + const vb=document.getElementById('ver-switch'); if(vb){ vb.setAttribute('title',t.verTitle); vb.setAttribute('aria-label',t.verTitle); } const gh=document.querySelector('.nav-r a[href*="github.com/dlgrv"]'); if(gh) gh.setAttribute('title',t.ghTitle); const rm=document.querySelector('.nav-r a[href^="README"]'); if(rm){ rm.setAttribute('href',t.readmeHref); rm.setAttribute('title',t.readmeTitle); } // head meta / social cards / JSON-LD @@ -973,6 +976,11 @@

Пособие по выгодной жизни

document.documentElement.classList.toggle('dark', dark); try { localStorage.setItem('theme', dark ? 'dark' : 'light'); } catch (e) {} }); + // v2 → v1: та же страница без /v2/, с сохранением запроса и якоря + const vb = document.getElementById('ver-switch'); + if (vb) vb.addEventListener('click', () => { + location.href = location.pathname.replace('/v2/', '/') + location.search + location.hash; + }); } /* ---------- 启动 ---------- */ diff --git a/v2/zh/index.html b/v2/zh/index.html index b156d25b..50c85b25 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -1,7 +1,7 @@ - + Пособие по выгодной жизни · Меньше денег, времени и сил — больше жизни, денег и свободы @@ -82,13 +82,14 @@ .ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} -.switch{position:relative;width:34px;height:19px;border-radius:0;border:1px solid var(--line);background:none;cursor:pointer;flex:none;margin-left:8px;transition:border-color .15s} -.switch:hover{border-color:var(--mut)} -.switch .knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:0;background:var(--mut);transition:transform .15s,background .15s} -.switch .knob svg{display:none} -.switch .sun{display:block}.switch .moon{display:none} -html.dark .switch .knob{transform:translateX(15px);background:var(--mut)} -html.dark .switch .sun{display:none}html.dark .switch .moon{display:block} +.switch{display:none!important} +/* кнопка темы: icon-btn с sun/moon — в светлой показываем луну (переход в тёмную), в тёмной — солнце */ +.theme-btn .sun{display:none} +html.dark .theme-btn .sun{display:block} +html.dark .theme-btn .moon{display:none} +/* кнопка версии: только в v2-скине (v1-страницы не получают ver-switch) */ +.ver-btn{display:none} +html.v2 .ver-btn{display:grid} /* ---------- language dropdown ---------- */ .lang-dd{position:relative} @@ -256,9 +257,10 @@

Пособие по выгодной жизни

- + - + + @@ -410,7 +412,7 @@

Пособие по выгодной жизни

cap:true, allSections:'Все разделы', readmeHref:'README.ru.md', readmeTitle:'Открыть README.ru', - menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', + menuAria:'Открыть фильтры', themeAria:'Переключить тёмную тему', ghTitle:'Исходный репозиторий на GitHub', ddTitle:'Выбрать язык', verTitle:'Старая версия сайта', metaDesc:'Руководство, отсортированное по соотношению «результат/затраты»: 528 рекомендаций — здоровье и долголетие, первая помощь, деньги, защита от мошенников, правовые красные линии, работа, семья. У каждой — стоимость, эффект, уровень доказательности и первоисточник; фильтры по деньгам, времени и силе воли.', keywords:'здоровье,долголетие,доказательная медицина,смертность,экономия,финансы,мошенники,первая помощь,право,психология', author:'Как жить выгодно (перевод HowToLiveBetter)', @@ -447,7 +449,7 @@

Пособие по выгодной жизни

cap:true, allSections:'All sections', readmeHref:'README.md', readmeTitle:'Open README', - menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', + menuAria:'Open filters', themeAria:'Toggle dark theme', ghTitle:'Source repository on GitHub', ddTitle:'Choose language', verTitle:'Old site version', metaDesc:'A guide sorted by value for money: 528 recommendations — health and longevity, first aid, money, fraud protection, legal red lines, work, family. Each states its cost, benefit, evidence grade, and primary source; filter by money, time, and willpower.', keywords:'health,longevity,evidence-based medicine,mortality,saving money,personal finance,fraud,first aid,law,psychology', author:'HowToLiveBetter (English translation)', @@ -484,7 +486,7 @@

Пособие по выгодной жизни

cap:false, allSections:'全部小节', readmeHref:'README.zh.md', readmeTitle:'打开 README.zh', - menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', + menuAria:'打开筛选栏', themeAria:'切换深色模式', ghTitle:'GitHub 仓库', ddTitle:'选择语言', verTitle:'旧版网站', metaDesc:'按性价比排序的人生指南:528 条建议——健康长寿、急救、省钱、防骗、法律红线、工作、家庭。每条写明成本、收益、证据等级与原始出处,可按花钱、花时间、要毅力筛选。', keywords:'健康,长寿,循证医学,死亡率,省钱,个人理财,防骗,急救,法律,心理', author:'高性价比人生指南', @@ -544,6 +546,7 @@

Пособие по выгодной жизни

const ddS=document.querySelector('.lang-dd > summary'); if(ddS) ddS.title=t.ddTitle; const menu=document.getElementById('menu'); if(menu) menu.setAttribute('aria-label',t.menuAria); const th=document.getElementById('theme'); if(th){ th.setAttribute('aria-label',t.themeAria); th.setAttribute('title',t.themeAria); } + const vb=document.getElementById('ver-switch'); if(vb){ vb.setAttribute('title',t.verTitle); vb.setAttribute('aria-label',t.verTitle); } const gh=document.querySelector('.nav-r a[href*="github.com/dlgrv"]'); if(gh) gh.setAttribute('title',t.ghTitle); const rm=document.querySelector('.nav-r a[href^="README"]'); if(rm){ rm.setAttribute('href',t.readmeHref); rm.setAttribute('title',t.readmeTitle); } // head meta / social cards / JSON-LD @@ -973,6 +976,11 @@

Пособие по выгодной жизни

document.documentElement.classList.toggle('dark', dark); try { localStorage.setItem('theme', dark ? 'dark' : 'light'); } catch (e) {} }); + // v2 → v1: та же страница без /v2/, с сохранением запроса и якоря + const vb = document.getElementById('ver-switch'); + if (vb) vb.addEventListener('click', () => { + location.href = location.pathname.replace('/v2/', '/') + location.search + location.hash; + }); } /* ---------- 启动 ---------- */ From abc1ac3a69e41193e1eea0b893d69cc11ab4feb7 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 12:51:31 +0000 Subject: [PATCH 07/13] web(v2): vertical rhythm normalization + header markup fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - doc-head rhythm unified to 12px step (stat had 0 gap to feedback line, meta-lines had 4px); counter styled as UI metadata 14px - card micro-rhythm: human 12/12, rows bottom 12px (was 8/12/14/6 mix) - fix: restore closing tag eaten by earlier patch — doc/gh/ver/theme buttons were nested inside
and stacked vertically outside the header row - ver-switch icon converted from stroke to filled style to match sibling icons --- index.html | 3 ++- tools/v2.css | 7 ++++--- v2/en/index.html | 10 ++++++---- v2/ru/index.html | 10 ++++++---- v2/zh/index.html | 10 ++++++---- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index c71e771c..ec2b8538 100644 --- a/index.html +++ b/index.html @@ -255,9 +255,10 @@

Пособие по выгодной жизни

+
- + diff --git a/tools/v2.css b/tools/v2.css index 35466318..e8b250cd 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -118,8 +118,8 @@ html.v2 .ver-btn{display:grid} .badge.r1{color:var(--faint)} .badge.danger{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:2px} .badge.warn{color:var(--mut);font-style:italic} -.human{margin:12px 0 14px 40px;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} -.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 6px 40px} +.human{margin:12px 0;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 12px 40px} .rows .k{font:700 11px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)} .rows .v{font:16px/1.65 var(--serif);color:var(--text);min-width:0;overflow-wrap:anywhere} .rows .v.gain{color:var(--ink)} @@ -162,7 +162,6 @@ body{hyphens:auto;-webkit-hyphens:auto} .foot{max-width:720px;margin:64px auto 0;padding-top:20px;border-top:1px solid var(--line);font:12.5px/1.7 var(--sans);color:var(--faint)} .foot a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .foot a:hover{color:var(--hover)} -.meta-line{margin:0 0 4px} .meta-line a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .meta-line a:hover{color:var(--hover)} @@ -170,6 +169,8 @@ body{hyphens:auto;-webkit-hyphens:auto} .doc{max-width:720px;margin:0 auto;padding:calc(var(--nav-h) + 48px) 24px 64px} .doc-head h1{margin:0 0 20px;font:600 36px/1.2 var(--serif);letter-spacing:-.015em;color:var(--ink)} .doc-head p{margin:0 0 12px} +.doc-head .stat{margin:12px 0;font:14px/1.6 var(--sans);color:var(--faint)} +.meta-line{margin:0 0 12px} .doc a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .doc a:hover{color:var(--hover)} diff --git a/v2/en/index.html b/v2/en/index.html index 69c0efa0..d38b4080 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -154,8 +154,8 @@ .badge.r1{color:var(--faint)} .badge.danger{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:2px} .badge.warn{color:var(--mut);font-style:italic} -.human{margin:12px 0 14px 40px;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} -.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 6px 40px} +.human{margin:12px 0;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 12px 40px} .rows .k{font:700 11px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)} .rows .v{font:16px/1.65 var(--serif);color:var(--text);min-width:0;overflow-wrap:anywhere} .rows .v.gain{color:var(--ink)} @@ -198,7 +198,6 @@ .foot{max-width:720px;margin:64px auto 0;padding-top:20px;border-top:1px solid var(--line);font:12.5px/1.7 var(--sans);color:var(--faint)} .foot a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .foot a:hover{color:var(--hover)} -.meta-line{margin:0 0 4px} .meta-line a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .meta-line a:hover{color:var(--hover)} @@ -206,6 +205,8 @@ .doc{max-width:720px;margin:0 auto;padding:calc(var(--nav-h) + 48px) 24px 64px} .doc-head h1{margin:0 0 20px;font:600 36px/1.2 var(--serif);letter-spacing:-.015em;color:var(--ink)} .doc-head p{margin:0 0 12px} +.doc-head .stat{margin:12px 0;font:14px/1.6 var(--sans);color:var(--faint)} +.meta-line{margin:0 0 12px} .doc a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .doc a:hover{color:var(--hover)} @@ -257,9 +258,10 @@

Пособие по выгодной жизни

+ - + diff --git a/v2/ru/index.html b/v2/ru/index.html index 59332bcb..9f48e940 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -154,8 +154,8 @@ .badge.r1{color:var(--faint)} .badge.danger{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:2px} .badge.warn{color:var(--mut);font-style:italic} -.human{margin:12px 0 14px 40px;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} -.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 6px 40px} +.human{margin:12px 0;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 12px 40px} .rows .k{font:700 11px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)} .rows .v{font:16px/1.65 var(--serif);color:var(--text);min-width:0;overflow-wrap:anywhere} .rows .v.gain{color:var(--ink)} @@ -198,7 +198,6 @@ .foot{max-width:720px;margin:64px auto 0;padding-top:20px;border-top:1px solid var(--line);font:12.5px/1.7 var(--sans);color:var(--faint)} .foot a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .foot a:hover{color:var(--hover)} -.meta-line{margin:0 0 4px} .meta-line a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .meta-line a:hover{color:var(--hover)} @@ -206,6 +205,8 @@ .doc{max-width:720px;margin:0 auto;padding:calc(var(--nav-h) + 48px) 24px 64px} .doc-head h1{margin:0 0 20px;font:600 36px/1.2 var(--serif);letter-spacing:-.015em;color:var(--ink)} .doc-head p{margin:0 0 12px} +.doc-head .stat{margin:12px 0;font:14px/1.6 var(--sans);color:var(--faint)} +.meta-line{margin:0 0 12px} .doc a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .doc a:hover{color:var(--hover)} @@ -257,9 +258,10 @@

Пособие по выгодной жизни

+ - + diff --git a/v2/zh/index.html b/v2/zh/index.html index 50c85b25..de12f3bd 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -154,8 +154,8 @@ .badge.r1{color:var(--faint)} .badge.danger{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:2px} .badge.warn{color:var(--mut);font-style:italic} -.human{margin:12px 0 14px 40px;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} -.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 6px 40px} +.human{margin:12px 0;padding:2px 0 2px 16px;border-left:3px solid var(--line);font:italic 16px/1.7 var(--serif);color:var(--mut);overflow-wrap:anywhere} +.rows{display:grid;grid-template-columns:86px minmax(0,1fr);gap:4px 14px;margin:0 0 12px 40px} .rows .k{font:700 11px/1.8 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)} .rows .v{font:16px/1.65 var(--serif);color:var(--text);min-width:0;overflow-wrap:anywhere} .rows .v.gain{color:var(--ink)} @@ -198,7 +198,6 @@ .foot{max-width:720px;margin:64px auto 0;padding-top:20px;border-top:1px solid var(--line);font:12.5px/1.7 var(--sans);color:var(--faint)} .foot a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .foot a:hover{color:var(--hover)} -.meta-line{margin:0 0 4px} .meta-line a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .meta-line a:hover{color:var(--hover)} @@ -206,6 +205,8 @@ .doc{max-width:720px;margin:0 auto;padding:calc(var(--nav-h) + 48px) 24px 64px} .doc-head h1{margin:0 0 20px;font:600 36px/1.2 var(--serif);letter-spacing:-.015em;color:var(--ink)} .doc-head p{margin:0 0 12px} +.doc-head .stat{margin:12px 0;font:14px/1.6 var(--sans);color:var(--faint)} +.meta-line{margin:0 0 12px} .doc a{color:var(--mut);text-decoration:underline;text-decoration-color:var(--line-soft);text-underline-offset:2px} .doc a:hover{color:var(--hover)} @@ -257,9 +258,10 @@

Пособие по выгодной жизни

+ - + From a724b61def7c45e71c6bece3a1b769b9a02638d9 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 12:57:34 +0000 Subject: [PATCH 08/13] web(v2): replace hand-drawn icons with Lucide (ISC license) All header icons now use official Lucide paths verbatim: - menu (3 lines), search (circle+handle), chevron-down, file-text (README), history (v2->v1 version switch), sun+moon (theme) - GitHub mark kept as official filled glyph (brand asset, standard practice); fill moved from blanket CSS rule to .ic-gh only so stroke-based Lucide icons render correctly - lucide-static 0.469.0, https://lucide.dev --- index.html | 15 ++++++++------- tools/v2.css | 2 +- v2/en/index.html | 14 +++++++------- v2/ru/index.html | 14 +++++++------- v2/zh/index.html | 14 +++++++------- 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/index.html b/index.html index ec2b8538..824980c3 100644 --- a/index.html +++ b/index.html @@ -90,7 +90,8 @@ .nav-r{display:flex;align-items:center;gap:8px} .icon-btn{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;color:var(--t2);transition:background .25s,color .25s} .icon-btn:hover{background:var(--bg-soft);color:var(--t1)} -.icon-btn svg{width:20px;height:20px;fill:currentColor} +.icon-btn svg{width:20px;height:20px} +.ic-gh svg{fill:currentColor} /* кнопка темы вместо ползунка (v1 тоже): луна в светлой, солнце в тёмной */ .theme-btn .sun{display:none} html.dark .theme-btn .sun{display:block} @@ -240,26 +241,26 @@

Пособие по выгодной жизни

diff --git a/tools/v2.css b/tools/v2.css index e8b250cd..40ae0d03 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -39,7 +39,7 @@ a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible,a .search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:16px;height:16px;fill:currentColor} +.icon-btn svg{width:16px;height:16px} /* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ button,input,kbd,summary{font-family:var(--sans)} .ic-doc svg{width:20px;height:20px} diff --git a/v2/en/index.html b/v2/en/index.html index d38b4080..ff268932 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -75,7 +75,7 @@ .search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:16px;height:16px;fill:currentColor} +.icon-btn svg{width:16px;height:16px} /* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ button,input,kbd,summary{font-family:var(--sans)} .ic-doc svg{width:20px;height:20px} @@ -243,26 +243,26 @@

Пособие по выгодной жизни

diff --git a/v2/ru/index.html b/v2/ru/index.html index 9f48e940..9811be5e 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -75,7 +75,7 @@ .search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:16px;height:16px;fill:currentColor} +.icon-btn svg{width:16px;height:16px} /* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ button,input,kbd,summary{font-family:var(--sans)} .ic-doc svg{width:20px;height:20px} @@ -243,26 +243,26 @@

Пособие по выгодной жизни

diff --git a/v2/zh/index.html b/v2/zh/index.html index de12f3bd..8b47d7f0 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -75,7 +75,7 @@ .search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} -.icon-btn svg{width:16px;height:16px;fill:currentColor} +.icon-btn svg{width:16px;height:16px} /* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ button,input,kbd,summary{font-family:var(--sans)} .ic-doc svg{width:20px;height:20px} @@ -243,26 +243,26 @@

Пособие по выгодной жизни

From 7b76e49f3f63fb9821ca8e3c1b50837a49271b30 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 13:12:19 +0000 Subject: [PATCH 09/13] =?UTF-8?q?web(v2):=20unify=20all=20header=20icons?= =?UTF-8?q?=20=E2=80=94=20same=20size,=20color,=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GitHub mark replaced with Lucide 'github' stroke icon: now every icon is stroke 2px, currentColor, 16px — no fills, no exceptions - removed per-icon optical-size hacks (.ic-doc 20px, .ic-gh 15px) that made file icon larger and shifted the gh glyph right - ver-switch fits fully inside its button (no right-edge clipping) --- index.html | 3 +-- tools/v2.css | 4 +--- v2/en/index.html | 6 ++---- v2/ru/index.html | 6 ++---- v2/zh/index.html | 6 ++---- 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 824980c3..6493a158 100644 --- a/index.html +++ b/index.html @@ -91,7 +91,6 @@ .icon-btn{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;color:var(--t2);transition:background .25s,color .25s} .icon-btn:hover{background:var(--bg-soft);color:var(--t1)} .icon-btn svg{width:20px;height:20px} -.ic-gh svg{fill:currentColor} /* кнопка темы вместо ползунка (v1 тоже): луна в светлой, солнце в тёмной */ .theme-btn .sun{display:none} html.dark .theme-btn .sun{display:block} @@ -258,7 +257,7 @@

Пособие по выгодной жизни

- + diff --git a/tools/v2.css b/tools/v2.css index 40ae0d03..9f90dbcf 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -40,10 +40,8 @@ a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible,a .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} -/* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ +/* все иконки — Lucide stroke, единый калибр 16px; шеврон у «РУ» — аффорданс, оставлен мелким */ button,input,kbd,summary{font-family:var(--sans)} -.ic-doc svg{width:20px;height:20px} -.ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} .switch{display:none!important} diff --git a/v2/en/index.html b/v2/en/index.html index ff268932..1ce01a30 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -76,10 +76,8 @@ .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} -/* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ +/* все иконки — Lucide stroke, единый калибр 16px; шеврон у «РУ» — аффорданс, оставлен мелким */ button,input,kbd,summary{font-family:var(--sans)} -.ic-doc svg{width:20px;height:20px} -.ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} .switch{display:none!important} @@ -260,7 +258,7 @@

Пособие по выгодной жизни

- + diff --git a/v2/ru/index.html b/v2/ru/index.html index 9811be5e..848f696e 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -76,10 +76,8 @@ .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} -/* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ +/* все иконки — Lucide stroke, единый калибр 16px; шеврон у «РУ» — аффорданс, оставлен мелким */ button,input,kbd,summary{font-family:var(--sans)} -.ic-doc svg{width:20px;height:20px} -.ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} .switch{display:none!important} @@ -260,7 +258,7 @@

Пособие по выгодной жизни

- + diff --git a/v2/zh/index.html b/v2/zh/index.html index 8b47d7f0..a81b57af 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -76,10 +76,8 @@ .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} -/* единый оптический калибр: README-глиф занимает 18/24 viewBox, октокат 24/24 */ +/* все иконки — Lucide stroke, единый калибр 16px; шеврон у «РУ» — аффорданс, оставлен мелким */ button,input,kbd,summary{font-family:var(--sans)} -.ic-doc svg{width:20px;height:20px} -.ic-gh svg{width:15px;height:15px} .lang-dd summary svg{width:11px;height:11px} .nav-r{display:flex;align-items:center;gap:10px;margin-left:auto} .switch{display:none!important} @@ -260,7 +258,7 @@

Пособие по выгодной жизни

- + From fc9f5afaa327e94d1fecf840a4eeadd8d2016eaa Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 13:31:42 +0000 Subject: [PATCH 10/13] web(v2): lang label as small caps UI mark (12px, tracked) --- index.html | 1 + tools/v2.css | 1 + v2/en/index.html | 1 + v2/ru/index.html | 1 + v2/zh/index.html | 1 + 5 files changed, 5 insertions(+) diff --git a/index.html b/index.html index 6493a158..ed952fb5 100644 --- a/index.html +++ b/index.html @@ -218,6 +218,7 @@ .lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;gap:5px;height:36px;border-radius:8px;border:0;background:none;grid-auto-flow:column;grid-template-columns:auto 10px;align-items:center;padding:0 8px;width:auto;transition:background .25s,color .25s} .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary svg{width:12px;height:12px;color:var(--t3)} +#lang-label{font:600 12px/1 var(--sans);letter-spacing:.08em} .lang-dd[open]>summary{background:var(--bg-soft);color:var(--t1)} .lang-menu{position:absolute;right:0;top:calc(100% + 6px);background:var(--bg-elv);border:1px solid var(--divider);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:4px;min-width:120px;z-index:50} .lang-menu button{display:block;width:100%;text-align:left;padding:7px 12px;border:0;border-radius:7px;background:none;color:var(--t1);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap} diff --git a/tools/v2.css b/tools/v2.css index 9f90dbcf..ebcd0505 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -59,6 +59,7 @@ html.v2 .ver-btn{display:grid} .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} +#lang-label{font:600 12px/1 var(--sans);letter-spacing:.08em} .lang-menu{position:absolute;right:0;top:calc(100% + 6px);background:var(--pop-bg);border:1px solid var(--line);padding:4px 0;min-width:120px;z-index:40} .lang-menu button{display:block;width:100%;text-align:left;padding:7px 14px;border:0;background:none;color:var(--mut);font:13px/1.4 var(--sans);cursor:pointer;transition:color .15s,background .15s} .lang-menu button:hover{color:var(--ink);background:var(--line)} diff --git a/v2/en/index.html b/v2/en/index.html index 1ce01a30..2e90a18a 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -95,6 +95,7 @@ .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} +#lang-label{font:600 12px/1 var(--sans);letter-spacing:.08em} .lang-menu{position:absolute;right:0;top:calc(100% + 6px);background:var(--pop-bg);border:1px solid var(--line);padding:4px 0;min-width:120px;z-index:40} .lang-menu button{display:block;width:100%;text-align:left;padding:7px 14px;border:0;background:none;color:var(--mut);font:13px/1.4 var(--sans);cursor:pointer;transition:color .15s,background .15s} .lang-menu button:hover{color:var(--ink);background:var(--line)} diff --git a/v2/ru/index.html b/v2/ru/index.html index 848f696e..f7091f8b 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -95,6 +95,7 @@ .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} +#lang-label{font:600 12px/1 var(--sans);letter-spacing:.08em} .lang-menu{position:absolute;right:0;top:calc(100% + 6px);background:var(--pop-bg);border:1px solid var(--line);padding:4px 0;min-width:120px;z-index:40} .lang-menu button{display:block;width:100%;text-align:left;padding:7px 14px;border:0;background:none;color:var(--mut);font:13px/1.4 var(--sans);cursor:pointer;transition:color .15s,background .15s} .lang-menu button:hover{color:var(--ink);background:var(--line)} diff --git a/v2/zh/index.html b/v2/zh/index.html index a81b57af..918fc289 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -95,6 +95,7 @@ .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} +#lang-label{font:600 12px/1 var(--sans);letter-spacing:.08em} .lang-menu{position:absolute;right:0;top:calc(100% + 6px);background:var(--pop-bg);border:1px solid var(--line);padding:4px 0;min-width:120px;z-index:40} .lang-menu button{display:block;width:100%;text-align:left;padding:7px 14px;border:0;background:none;color:var(--mut);font:13px/1.4 var(--sans);cursor:pointer;transition:color .15s,background .15s} .lang-menu button:hover{color:var(--ink);background:var(--line)} From 535fb4d842e18e434322f87a236e2a3c975f7a1d Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 13:40:01 +0000 Subject: [PATCH 11/13] =?UTF-8?q?web(v2):=20search=20field=20restyle=20?= =?UTF-8?q?=E2=80=94=20framed=20box=20(Linear/Stripe=20pattern)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 1px full-perimeter border, radius 8px, height 36px (was floating underline 420px wide that read as cheap) - real kbd chip for '/' shortcut (border + bg, no bare glyph) - breathing room around magnifier icon; narrower 340px field - focus: border darkens to ink, subtle 1px drop shadow --- tools/v2.css | 10 +++++----- v2/en/index.html | 10 +++++----- v2/ru/index.html | 10 +++++----- v2/zh/index.html | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/v2.css b/tools/v2.css index ebcd0505..ccbf96ef 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -31,12 +31,12 @@ a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible,a .title:hover{color:var(--ink)} .title .logo{display:none} /* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ -.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} -.search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} -.search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(340px,32vw)} +.search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round} +.search input{width:100%;height:36px;padding:0 44px 0 32px;border:1px solid var(--line);border-radius:8px;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s,box-shadow .15s} .search input::placeholder{color:var(--faint)} -.search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search input:focus{outline:0;border-color:var(--ink);box-shadow:0 1px 0 rgba(0,0,0,.03)} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:1px solid var(--line-soft);border-radius:4px;padding:3px 6px;background:var(--bg);pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} diff --git a/v2/en/index.html b/v2/en/index.html index 2e90a18a..71066882 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -67,12 +67,12 @@ .title:hover{color:var(--ink)} .title .logo{display:none} /* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ -.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} -.search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} -.search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(340px,32vw)} +.search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round} +.search input{width:100%;height:36px;padding:0 44px 0 32px;border:1px solid var(--line);border-radius:8px;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s,box-shadow .15s} .search input::placeholder{color:var(--faint)} -.search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search input:focus{outline:0;border-color:var(--ink);box-shadow:0 1px 0 rgba(0,0,0,.03)} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:1px solid var(--line-soft);border-radius:4px;padding:3px 6px;background:var(--bg);pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} diff --git a/v2/ru/index.html b/v2/ru/index.html index f7091f8b..f72945b7 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -67,12 +67,12 @@ .title:hover{color:var(--ink)} .title .logo{display:none} /* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ -.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} -.search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} -.search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(340px,32vw)} +.search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round} +.search input{width:100%;height:36px;padding:0 44px 0 32px;border:1px solid var(--line);border-radius:8px;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s,box-shadow .15s} .search input::placeholder{color:var(--faint)} -.search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search input:focus{outline:0;border-color:var(--ink);box-shadow:0 1px 0 rgba(0,0,0,.03)} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:1px solid var(--line-soft);border-radius:4px;padding:3px 6px;background:var(--bg);pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} diff --git a/v2/zh/index.html b/v2/zh/index.html index 918fc289..6121ed22 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -67,12 +67,12 @@ .title:hover{color:var(--ink)} .title .logo{display:none} /* поиск строго по центру окна (независимо от ширины титула и правого кластера) */ -.search{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,40vw)} -.search svg{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} -.search input{width:100%;height:34px;padding:0 34px 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s} +.search{position:absolute;left:50%;transform:translateX(-50%);width:min(340px,32vw)} +.search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round} +.search input{width:100%;height:36px;padding:0 44px 0 32px;border:1px solid var(--line);border-radius:8px;background:none;color:var(--ink);font:14px/1.4 var(--sans);transition:border-color .15s,box-shadow .15s} .search input::placeholder{color:var(--faint)} -.search input:focus{outline:0;border-bottom-color:var(--ink)} -.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:0;padding:0;pointer-events:none} +.search input:focus{outline:0;border-color:var(--ink);box-shadow:0 1px 0 rgba(0,0,0,.03)} +.search kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);font:500 11px/1 var(--sans);color:var(--faint);border:1px solid var(--line-soft);border-radius:4px;padding:3px 6px;background:var(--bg);pointer-events:none} .icon-btn{display:grid;place-items:center;gap:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:var(--faint);cursor:pointer;transition:color .15s;flex:none} .icon-btn:hover{color:var(--ink)} .icon-btn svg{width:16px;height:16px} From a498f87d7be9f02138770bfee96aeb221bbd73a5 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 13:41:58 +0000 Subject: [PATCH 12/13] web(v2): hide '/' kbd chip on mobile (no keyboard there) --- tools/v2.css | 1 + v2/en/index.html | 1 + v2/ru/index.html | 1 + v2/zh/index.html | 1 + 4 files changed, 4 insertions(+) diff --git a/tools/v2.css b/tools/v2.css index ccbf96ef..ee3eb7e2 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -185,6 +185,7 @@ body{hyphens:auto;-webkit-hyphens:auto} @media (max-width:560px){ .title span:last-child{display:none} .search{max-width:none} + .search kbd{display:none} .nav-in{padding:0 16px;gap:10px} .doc-head h1{font-size:27px} .sec-h h2{font-size:21px} diff --git a/v2/en/index.html b/v2/en/index.html index 71066882..c24e7c67 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -221,6 +221,7 @@ @media (max-width:560px){ .title span:last-child{display:none} .search{max-width:none} + .search kbd{display:none} .nav-in{padding:0 16px;gap:10px} .doc-head h1{font-size:27px} .sec-h h2{font-size:21px} diff --git a/v2/ru/index.html b/v2/ru/index.html index f72945b7..ee992ba2 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -221,6 +221,7 @@ @media (max-width:560px){ .title span:last-child{display:none} .search{max-width:none} + .search kbd{display:none} .nav-in{padding:0 16px;gap:10px} .doc-head h1{font-size:27px} .sec-h h2{font-size:21px} diff --git a/v2/zh/index.html b/v2/zh/index.html index 6121ed22..b3393e10 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -221,6 +221,7 @@ @media (max-width:560px){ .title span:last-child{display:none} .search{max-width:none} + .search kbd{display:none} .nav-in{padding:0 16px;gap:10px} .doc-head h1{font-size:27px} .sec-h h2{font-size:21px} From 093501a589a2dd8ed230976105c4b231d3d94ac4 Mon Sep 17 00:00:00 2001 From: dlgrv Date: Sun, 20 Sep 2026 13:55:23 +0000 Subject: [PATCH 13/13] =?UTF-8?q?web(v2):=20lang=20summary=20width:auto=20?= =?UTF-8?q?=E2=80=94=20chevron=20no=20longer=20clipped=20by=2032px=20icon-?= =?UTF-8?q?btn=20box?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- tools/v2.css | 2 +- v2/en/index.html | 2 +- v2/ru/index.html | 2 +- v2/zh/index.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index ed952fb5..6fe695cc 100644 --- a/index.html +++ b/index.html @@ -215,7 +215,7 @@ /* language dropdown */ .lang-dd{position:relative} -.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;gap:5px;height:36px;border-radius:8px;border:0;background:none;grid-auto-flow:column;grid-template-columns:auto 10px;align-items:center;padding:0 8px;width:auto;transition:background .25s,color .25s} +.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;gap:5px;height:36px;border-radius:8px;border:0;background:none;grid-auto-flow:column;grid-template-columns:auto auto;column-gap:4px;align-items:center;padding:0 8px;width:auto;min-width:32px;transition:background .25s,color .25s} .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary svg{width:12px;height:12px;color:var(--t3)} #lang-label{font:600 12px/1 var(--sans);letter-spacing:.08em} diff --git a/tools/v2.css b/tools/v2.css index ee3eb7e2..6c1a435a 100644 --- a/tools/v2.css +++ b/tools/v2.css @@ -55,7 +55,7 @@ html.v2 .ver-btn{display:grid} /* ---------- language dropdown ---------- */ .lang-dd{position:relative} -.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto 10px;align-items:center;padding:0 6px;transition:color .15s} +.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;width:auto;min-width:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto auto;column-gap:4px;align-items:center;padding:0 6px;transition:color .15s} .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} diff --git a/v2/en/index.html b/v2/en/index.html index c24e7c67..bc24dac2 100644 --- a/v2/en/index.html +++ b/v2/en/index.html @@ -91,7 +91,7 @@ /* ---------- language dropdown ---------- */ .lang-dd{position:relative} -.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto 10px;align-items:center;padding:0 6px;transition:color .15s} +.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;width:auto;min-width:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto auto;column-gap:4px;align-items:center;padding:0 6px;transition:color .15s} .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} diff --git a/v2/ru/index.html b/v2/ru/index.html index ee992ba2..2cfad73b 100644 --- a/v2/ru/index.html +++ b/v2/ru/index.html @@ -91,7 +91,7 @@ /* ---------- language dropdown ---------- */ .lang-dd{position:relative} -.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto 10px;align-items:center;padding:0 6px;transition:color .15s} +.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;width:auto;min-width:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto auto;column-gap:4px;align-items:center;padding:0 6px;transition:color .15s} .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2} diff --git a/v2/zh/index.html b/v2/zh/index.html index b3393e10..0054ff9b 100644 --- a/v2/zh/index.html +++ b/v2/zh/index.html @@ -91,7 +91,7 @@ /* ---------- language dropdown ---------- */ .lang-dd{position:relative} -.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto 10px;align-items:center;padding:0 6px;transition:color .15s} +.lang-dd>summary{list-style:none;cursor:pointer;display:grid;place-items:center;height:32px;width:auto;min-width:32px;border:0;background:none;color:var(--faint);grid-auto-flow:column;grid-template-columns:auto auto;column-gap:4px;align-items:center;padding:0 6px;transition:color .15s} .lang-dd>summary::-webkit-details-marker{display:none} .lang-dd>summary:hover{color:var(--ink)} .lang-dd>summary svg{width:10px;height:10px;color:var(--faint);fill:none;stroke:currentColor;stroke-width:2}