From 5f9ec37211343521ce69d53d96abd7de18cdf9b6 Mon Sep 17 00:00:00 2001 From: striker Date: Thu, 21 May 2026 01:43:30 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D1=81=D0=BE=D1=86-=D0=BA=D0=BD=D0=BE?= =?UTF-8?q?=D0=BF=D0=BA=D0=B8=20=D0=B8=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA?= =?UTF-8?q?=D0=B0=20=C2=AB=D0=9D=D0=B0=D0=B2=D0=B5=D1=80=D1=85=C2=BB=20?= =?UTF-8?q?=D0=B2=D0=BD=D0=B8=D0=B7=D1=83=20+=20=D1=80=D1=83=D1=81=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=D1=8F=20=D0=BF=D0=BB=D1=8E=D1=80=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Под лентой контента появилась панель из трёх pill-кнопок: Telegram (t.me/anotherreflections), ВКонтакте (vk.com/anotherreflections) и «Наверх» (smooth scroll to top) - Универсальный plural() в consts.ts — больше нет «8 мира», hero показывает «8 миров / 50 публикаций / 20 лет онлайн» с автоматически правильной формой при любом значении - Уточнено описание Ренессанса: «фантастическими допущениями мира Сумрака» --- src/components/SocialLinks.astro | 23 +++++++++++++++++++++ src/consts.ts | 17 +++++++++++++++- src/layouts/BaseLayout.astro | 2 ++ src/pages/category/[slug].astro | 4 ++-- src/pages/index.astro | 8 ++++---- src/styles/global.css | 34 ++++++++++++++++++++++++++++++++ 6 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 src/components/SocialLinks.astro diff --git a/src/components/SocialLinks.astro b/src/components/SocialLinks.astro new file mode 100644 index 0000000..80e1f44 --- /dev/null +++ b/src/components/SocialLinks.astro @@ -0,0 +1,23 @@ +--- +import { SOCIAL } from '../consts'; +--- +
+ + + +
diff --git a/src/consts.ts b/src/consts.ts index 45b9219..3fad124 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -1,3 +1,18 @@ +export const SOCIAL = { + telegram: { url: 'https://t.me/anotherreflections', label: 'Telegram' }, + vk: { url: 'https://vk.com/anotherreflections', label: 'ВКонтакте' }, +}; + +/** Русская плюрализация: [1, 2-4, 5+]. Пример: plural(8, ['мир', 'мира', 'миров']) → 'миров' */ +export function plural(n: number, forms: [string, string, string]): string { + const a = Math.abs(n) % 100; + const b = a % 10; + if (a > 10 && a < 20) return forms[2]; + if (b > 1 && b < 5) return forms[1]; + if (b === 1) return forms[0]; + return forms[2]; +} + export const SITE_TITLE = 'Иные Отражения'; export const SITE_DESCRIPTION = 'Ролевой проект по современной фантастике. Дозоры С. Лукьяненко, Амбер Р. Желязны, А. Пехов.'; export const SITE_URL = 'https://anotherreflections.ru'; @@ -69,7 +84,7 @@ export const WORLDS: World[] = [ { name: 'Ренессанс', tag: 'Историческая фантастика', - desc: 'Эпоха возрождения с фантастическими допущениями.', + desc: 'Эпоха Возрождения с фантастическими допущениями мира Сумрака.', url: 'https://renessans.anotherreflections.ru/', color: 'var(--c-roleplay)', }, diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index a99c2cd..41cfcc3 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -2,6 +2,7 @@ import '../styles/global.css'; import { SITE_TITLE, SITE_DESCRIPTION, SITE_URL, SITE_LANG, MAIN_NAV } from '../consts'; import BrandMark from '../components/BrandMark.astro'; +import SocialLinks from '../components/SocialLinks.astro'; interface Props { title?: string; @@ -60,6 +61,7 @@ const year = new Date().getFullYear();
+