refactor: «Миры» вынесены на отдельную /miry/
С главной убрана секция миров — лента из 50 постов длинная и до миров мало кто долистает. Меню «Миры» теперь ведёт на полноценную /miry/.
This commit is contained in:
@@ -107,6 +107,6 @@ export const WORLDS: World[] = [
|
|||||||
export const MAIN_NAV = [
|
export const MAIN_NAV = [
|
||||||
{ label: 'Новости', href: '/' },
|
{ label: 'Новости', href: '/' },
|
||||||
{ label: 'О нас', href: '/o-nas/' },
|
{ label: 'О нас', href: '/o-nas/' },
|
||||||
{ label: 'Миры', href: '/#worlds' },
|
{ label: 'Миры', href: '/miry/' },
|
||||||
{ label: 'Друзья', href: '/nashi-druzya/' },
|
{ label: 'Друзья', href: '/nashi-druzya/' },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const posts = (await getCollection('posts'))
|
|||||||
.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
|
.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
|
||||||
|
|
||||||
const totalPosts = posts.length;
|
const totalPosts = posts.length;
|
||||||
const totalWorlds = WORLDS.length;
|
const totalWorlds = WORLDS.length; // используется в hero-meta
|
||||||
const oldestYear = posts.length ? posts[posts.length - 1].data.pubDate.getFullYear() : SITE_FOUNDED;
|
const oldestYear = posts.length ? posts[posts.length - 1].data.pubDate.getFullYear() : SITE_FOUNDED;
|
||||||
|
|
||||||
const fmtDate = (d: Date) =>
|
const fmtDate = (d: Date) =>
|
||||||
@@ -57,27 +57,4 @@ const fmtDate = (d: Date) =>
|
|||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="worlds" style="margin-top: 4rem;">
|
|
||||||
<div class="section-head">
|
|
||||||
<h2>Миры и проекты</h2>
|
|
||||||
<span class="section-meta">{WORLDS.length} вселенных</span>
|
|
||||||
</div>
|
|
||||||
<ul class="worlds-grid">
|
|
||||||
{WORLDS.map((w) => (
|
|
||||||
<li>
|
|
||||||
<a
|
|
||||||
class="world-card"
|
|
||||||
href={w.url}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
style={`--cat-color: ${w.color}`}
|
|
||||||
>
|
|
||||||
<span class="world-tag">{w.tag}</span>
|
|
||||||
<span class="world-name">{w.name}</span>
|
|
||||||
<span class="world-desc">{w.desc}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|||||||
36
src/pages/miry.astro
Normal file
36
src/pages/miry.astro
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||||
|
import { WORLDS } from '../consts';
|
||||||
|
---
|
||||||
|
<BaseLayout
|
||||||
|
title="Миры"
|
||||||
|
description="Восемь игровых вселенных проекта «Иные Отражения» — Дозоры, Амбер, Киндрет, Над бездной, Глубина, Ренессанс, Warhammer 40k."
|
||||||
|
>
|
||||||
|
<section class="hero" style="padding: 4rem 1rem 2.5rem;">
|
||||||
|
<span class="hero-eyebrow">Игровые проекты</span>
|
||||||
|
<h1>Миры</h1>
|
||||||
|
<p class="hero-tagline">
|
||||||
|
Восемь вселенных проекта — каждая со своим тоном, правилами и многолетней историей игр.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<ul class="worlds-grid">
|
||||||
|
{WORLDS.map((w) => (
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
class="world-card"
|
||||||
|
href={w.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
style={`--cat-color: ${w.color}`}
|
||||||
|
>
|
||||||
|
<span class="world-tag">{w.tag}</span>
|
||||||
|
<span class="world-name">{w.name}</span>
|
||||||
|
<span class="world-desc">{w.desc}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
</BaseLayout>
|
||||||
Reference in New Issue
Block a user