mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
home page
This commit is contained in:
22 files changed
+190
-66
No files matched your search
@@ -50,6 +50,7 @@ Pages that are not migrated yet are named `_index.astro` so Astro skips them. Mi
|
|||||||
- Select elements by their own class, never by structure or tag (`> *`, `> div`, `:first-child`, bare `svg`, `[data-x] > *`). If an element needs styling, give it a class and nest that class under its parent. The exception is content a component renders internally that has no `className` to pass, like the icon inside an `IconButton` (`.swatch svg`).
|
- Select elements by their own class, never by structure or tag (`> *`, `> div`, `:first-child`, bare `svg`, `[data-x] > *`). If an element needs styling, give it a class and nest that class under its parent. The exception is content a component renders internally that has no `className` to pass, like the icon inside an `IconButton` (`.swatch svg`).
|
||||||
- Nest CSS to mirror the markup: a child's rules go inside its parent's block (`.marker { .bar { } }`), so the stylesheet reads like the HTML tree.
|
- Nest CSS to mirror the markup: a child's rules go inside its parent's block (`.marker { .bar { } }`), so the stylesheet reads like the HTML tree.
|
||||||
- Fully rounded corners use `var(--radius-max)`, never `var(--max-size)`.
|
- Fully rounded corners use `var(--radius-max)`, never `var(--max-size)`.
|
||||||
|
- Zero takes no unit (`0`, not `0px`), except where it ends up inside `calc()`, which needs a length (`calc(100dvh - var(--x, 0px))`).
|
||||||
- Avoid `z-index: 2` or above unless nothing else works. Resolve overlaps first by DOM order (a later sibling at the same `z-index` paints on top, so put overlays and curtains before what must sit above them) or by leveling the field (give competing siblings the same `position: relative`/`z-index: 1`, or `isolation: isolate` a container so its children's layers stay inside it).
|
- Avoid `z-index: 2` or above unless nothing else works. Resolve overlaps first by DOM order (a later sibling at the same `z-index` paints on top, so put overlays and curtains before what must sit above them) or by leveling the field (give competing siblings the same `position: relative`/`z-index: 1`, or `isolation: isolate` a container so its children's layers stay inside it).
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
|||||||
@@ -526,6 +526,7 @@
|
|||||||
"tanks": "Tanks",
|
"tanks": "Tanks",
|
||||||
"players": "Players",
|
"players": "Players",
|
||||||
"games": "Games",
|
"games": "Games",
|
||||||
|
"tools": "Tools",
|
||||||
"cosmetics": "Cosmetics",
|
"cosmetics": "Cosmetics",
|
||||||
"technical": "Technical"
|
"technical": "Technical"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ styles += "}";
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--page-width: 64rem;
|
--page-width: 80rem;
|
||||||
--page-padding: var(--space-4);
|
--page-padding: var(--space-4);
|
||||||
|
|
||||||
--max-size: max(100vw, 100vh);
|
--max-size: max(100vw, 100vh);
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { api } from "../api/dynamic";
|
import { api } from "../api/dynamic";
|
||||||
import { tools } from "../config/tools";
|
import { tools } from "../config/tools";
|
||||||
import { Heading } from "./Heading";
|
import HomeSection from "./HomeSection.astro";
|
||||||
import { Section } from "./Section";
|
|
||||||
import ToolCard from "./ToolCard.astro";
|
import ToolCard from "./ToolCard.astro";
|
||||||
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
||||||
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
||||||
@@ -16,9 +15,7 @@ const { locale } = Astro.props;
|
|||||||
const strings = await api.strings(locale);
|
const strings = await api.strings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Section>
|
<HomeSection title={strings.home.cosmetics}>
|
||||||
<Heading size="2">{strings.home.cosmetics}</Heading>
|
|
||||||
|
|
||||||
<ToolCardLayoutRoot minor>
|
<ToolCardLayoutRoot minor>
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.avatars} />
|
<ToolCard {locale} tool={tools.avatars} />
|
||||||
@@ -28,4 +25,4 @@ const strings = await api.strings(locale);
|
|||||||
<ToolCard {locale} tool={tools.backgrounds} />
|
<ToolCard {locale} tool={tools.backgrounds} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
</Section>
|
</HomeSection>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { api } from "../api/dynamic";
|
import { api } from "../api/dynamic";
|
||||||
import { tools } from "../config/tools";
|
import { tools } from "../config/tools";
|
||||||
import { Heading } from "./Heading";
|
import HomeSection from "./HomeSection.astro";
|
||||||
import { Section } from "./Section";
|
|
||||||
import ToolCard from "./ToolCard.astro";
|
import ToolCard from "./ToolCard.astro";
|
||||||
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
||||||
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
||||||
@@ -16,9 +15,7 @@ const { locale } = Astro.props;
|
|||||||
const strings = await api.strings(locale);
|
const strings = await api.strings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Section>
|
<HomeSection title={strings.home.games}>
|
||||||
<Heading size="2" className="title">{strings.home.games}</Heading>
|
|
||||||
|
|
||||||
<ToolCardLayoutRoot>
|
<ToolCardLayoutRoot>
|
||||||
<ToolCardLayoutColumn major>
|
<ToolCardLayoutColumn major>
|
||||||
<ToolCard {locale} tool={tools.mixer} />
|
<ToolCard {locale} tool={tools.mixer} />
|
||||||
@@ -28,4 +25,4 @@ const strings = await api.strings(locale);
|
|||||||
<ToolCard {locale} tool={tools.guesser} />
|
<ToolCard {locale} tool={tools.guesser} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
</Section>
|
</HomeSection>
|
||||||
@@ -62,11 +62,7 @@ const season = SEASONS[Math.floor(((month + 2) % 12) / 3)];
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
|
|
||||||
background: linear-gradient(
|
background: linear-gradient(var(--black-a8), var(--gray-1));
|
||||||
var(--black-a8),
|
|
||||||
var(--black-a4),
|
|
||||||
var(--gray-1)
|
|
||||||
);
|
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
max-width: 20rem;
|
max-width: 20rem;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { api } from "../api/dynamic";
|
import { api } from "../api/dynamic";
|
||||||
import { tools } from "../config/tools";
|
import { tools } from "../config/tools";
|
||||||
import { Heading } from "./Heading";
|
import HomeSection from "./HomeSection.astro";
|
||||||
import { Section } from "./Section";
|
|
||||||
import ToolCard from "./ToolCard.astro";
|
import ToolCard from "./ToolCard.astro";
|
||||||
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
||||||
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
||||||
@@ -16,18 +15,14 @@ const { locale } = Astro.props;
|
|||||||
const strings = await api.strings(locale);
|
const strings = await api.strings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Section>
|
<HomeSection title={strings.home.players}>
|
||||||
<Heading size="2">{strings.home.players}</Heading>
|
|
||||||
|
|
||||||
<ToolCardLayoutRoot>
|
<ToolCardLayoutRoot>
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} minor tool={tools.session} />
|
<ToolCard {locale} tool={tools.session} />
|
||||||
<ToolCard {locale} minor tool={tools.embed} />
|
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
|
|
||||||
<ToolCardLayoutColumn major>
|
<ToolCardLayoutColumn major>
|
||||||
<ToolCard {locale} minor tool={tools.playlist} />
|
<ToolCard {locale} tool={tools.players} />
|
||||||
<!-- <ToolCard {locale} tool={tools.players} /> -->
|
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
</Section>
|
</HomeSection>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
import { Heading } from "./Heading";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { title } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.home-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-4);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<section class="home-section">
|
||||||
|
<Heading size="2">{title}</Heading>
|
||||||
|
<slot />
|
||||||
|
</section>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { api } from "../api/dynamic";
|
import { api } from "../api/dynamic";
|
||||||
import { tools } from "../config/tools";
|
import { tools } from "../config/tools";
|
||||||
import { Heading } from "./Heading";
|
import HomeSection from "./HomeSection.astro";
|
||||||
import { Section } from "./Section";
|
|
||||||
import ToolCard from "./ToolCard.astro";
|
import ToolCard from "./ToolCard.astro";
|
||||||
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
||||||
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
||||||
@@ -15,9 +14,7 @@ const { locale } = Astro.props;
|
|||||||
const strings = await api.strings(locale);
|
const strings = await api.strings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Section>
|
<HomeSection title={strings.home.tanks}>
|
||||||
<Heading size="2">{strings.home.tanks}</Heading>
|
|
||||||
|
|
||||||
<ToolCardLayoutRoot>
|
<ToolCardLayoutRoot>
|
||||||
<ToolCardLayoutColumn major>
|
<ToolCardLayoutColumn major>
|
||||||
<ToolCard {locale} tool={tools.tanks} />
|
<ToolCard {locale} tool={tools.tanks} />
|
||||||
@@ -28,4 +25,4 @@ const strings = await api.strings(locale);
|
|||||||
<ToolCard {locale} minor tool={tools.performance} />
|
<ToolCard {locale} minor tool={tools.performance} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
</Section>
|
</HomeSection>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { api } from "../api/dynamic";
|
import { api } from "../api/dynamic";
|
||||||
import { tools } from "../config/tools";
|
import { tools } from "../config/tools";
|
||||||
import { Heading } from "./Heading";
|
import HomeSection from "./HomeSection.astro";
|
||||||
import { Section } from "./Section";
|
|
||||||
import ToolCard from "./ToolCard.astro";
|
import ToolCard from "./ToolCard.astro";
|
||||||
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
||||||
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
||||||
@@ -16,9 +15,7 @@ const { locale } = Astro.props;
|
|||||||
const strings = await api.strings(locale);
|
const strings = await api.strings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Section>
|
<HomeSection title={strings.home.technical}>
|
||||||
<Heading size="2">{strings.home.technical}</Heading>
|
|
||||||
|
|
||||||
<ToolCardLayoutRoot minor>
|
<ToolCardLayoutRoot minor>
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.api} />
|
<ToolCard {locale} tool={tools.api} />
|
||||||
@@ -28,4 +25,4 @@ const strings = await api.strings(locale);
|
|||||||
<ToolCard {locale} tool={tools.changelogs} />
|
<ToolCard {locale} tool={tools.changelogs} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
</Section>
|
</HomeSection>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
import { api } from "../api/dynamic";
|
||||||
|
import { tools } from "../config/tools";
|
||||||
|
import HomeSection from "./HomeSection.astro";
|
||||||
|
import ToolCard from "./ToolCard.astro";
|
||||||
|
import ToolCardLayoutColumn from "./ToolCardLayoutColumn.astro";
|
||||||
|
import ToolCardLayoutRoot from "./ToolCardLayoutRoot.astro";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
locale: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { locale } = Astro.props;
|
||||||
|
|
||||||
|
const strings = await api.strings(locale);
|
||||||
|
---
|
||||||
|
|
||||||
|
<HomeSection title={strings.home.tools}>
|
||||||
|
<ToolCardLayoutRoot>
|
||||||
|
<ToolCardLayoutColumn>
|
||||||
|
<ToolCard {locale} minor tool={tools.playlist} />
|
||||||
|
<ToolCard {locale} minor tool={tools.embed} />
|
||||||
|
</ToolCardLayoutColumn>
|
||||||
|
|
||||||
|
<ToolCardLayoutColumn major>
|
||||||
|
<ToolCard {locale} tool={tools.tier_list} />
|
||||||
|
</ToolCardLayoutColumn>
|
||||||
|
</ToolCardLayoutRoot>
|
||||||
|
</HomeSection>
|
||||||
@@ -206,9 +206,18 @@ const groups = toolGroups.map((group) => {
|
|||||||
const triggers = navbar.querySelectorAll<HTMLElement>(".trigger");
|
const triggers = navbar.querySelectorAll<HTMLElement>(".trigger");
|
||||||
const panels = navbar.querySelectorAll<HTMLElement>(".panel");
|
const panels = navbar.querySelectorAll<HTMLElement>(".panel");
|
||||||
const icons = navbar.querySelectorAll<HTMLElement>(".bar .icon");
|
const icons = navbar.querySelectorAll<HTMLElement>(".bar .icon");
|
||||||
|
const bar = navbar.querySelector<HTMLElement>(".bar")!;
|
||||||
|
|
||||||
let hoverTimeout: number | undefined;
|
let hoverTimeout: number | undefined;
|
||||||
|
|
||||||
|
// Lets sticky page elements sit below the bar instead of behind it
|
||||||
|
new ResizeObserver(() => {
|
||||||
|
document.documentElement.style.setProperty(
|
||||||
|
"--navbar-fine-height",
|
||||||
|
`${bar.offsetHeight}px`,
|
||||||
|
);
|
||||||
|
}).observe(bar);
|
||||||
|
|
||||||
function resize(height: number) {
|
function resize(height: number) {
|
||||||
const duration = Math.min(MAX_DURATION, Math.max(MIN_DURATION, height / 2));
|
const duration = Math.min(MAX_DURATION, Math.max(MIN_DURATION, height / 2));
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,31 @@
|
|||||||
|
---
|
||||||
|
interface Props {
|
||||||
|
// Centers the sections within the page width, lined up with the navbar
|
||||||
|
centered?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { centered } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.sections {
|
.sections {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--page-padding);
|
gap: var(--space-6);
|
||||||
|
|
||||||
padding: 0 var(--page-padding) var(--page-padding);
|
padding: 0 var(--page-padding) var(--page-padding);
|
||||||
|
|
||||||
|
&[data-centered="true"] {
|
||||||
|
padding-inline: max(
|
||||||
|
var(--page-padding),
|
||||||
|
(100% - var(--page-width)) / 2
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="sections">
|
<div class="sections" data-centered={centered}>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.fullscreen {
|
||||||
|
position: absolute;
|
||||||
|
right: var(--space-4);
|
||||||
|
bottom: var(--space-4);
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import { EnterFullScreenIcon, ExitFullScreenIcon } from "@radix-ui/react-icons";
|
||||||
|
import { useCallback, useEffect, useState, type RefObject } from "react";
|
||||||
|
import { IconButton } from "../IconButton";
|
||||||
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
|
interface TankopediaFullscreenProps {
|
||||||
|
target: RefObject<HTMLElement | null>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function TankopediaFullscreen({ target }: TankopediaFullscreenProps) {
|
||||||
|
const [available, setAvailable] = useState(false);
|
||||||
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
function handleFullscreenChange() {
|
||||||
|
setIsFullscreen(document.fullscreenElement === target.current);
|
||||||
|
}
|
||||||
|
|
||||||
|
setAvailable(document.fullscreenEnabled);
|
||||||
|
document.addEventListener("fullscreenchange", handleFullscreenChange);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleClick = useCallback(() => {
|
||||||
|
if (isFullscreen) {
|
||||||
|
document.exitFullscreen();
|
||||||
|
} else {
|
||||||
|
target.current!.requestFullscreen();
|
||||||
|
}
|
||||||
|
}, [isFullscreen]);
|
||||||
|
|
||||||
|
if (!available) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<IconButton
|
||||||
|
className={styles.fullscreen}
|
||||||
|
variant="ghost"
|
||||||
|
highContrast
|
||||||
|
onClick={handleClick}
|
||||||
|
>
|
||||||
|
{isFullscreen ? <ExitFullScreenIcon /> : <EnterFullScreenIcon />}
|
||||||
|
</IconButton>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
background-color: var(--gray-2);
|
background-color: var(--gray-2);
|
||||||
|
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: var(--navbar-fine-height, 0);
|
||||||
|
|
||||||
max-height: 100dvh;
|
max-height: calc(100dvh - var(--navbar-fine-height, 0px));
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
padding: var(--space-5);
|
padding: var(--space-5);
|
||||||
|
|||||||
@@ -9,9 +9,5 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
|
|
||||||
@media (pointer: fine) {
|
|
||||||
border-radius: var(--space-4);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,7 @@ import { SmartCanvas } from "../SmartCanvas";
|
|||||||
import { TankDynamicArmor } from "../TankDynamicArmor";
|
import { TankDynamicArmor } from "../TankDynamicArmor";
|
||||||
import { TankModel } from "../TankModel";
|
import { TankModel } from "../TankModel";
|
||||||
import { TankopediaAntagonistControl } from "../TankopediaAntagonistControl";
|
import { TankopediaAntagonistControl } from "../TankopediaAntagonistControl";
|
||||||
|
import { TankopediaFullscreen } from "../TankopediaFullscreen";
|
||||||
import { TankopediaOptions } from "../TankopediaOptions";
|
import { TankopediaOptions } from "../TankopediaOptions";
|
||||||
import { TankopediaQuickInputs } from "../TankopediaQuickInputs";
|
import { TankopediaQuickInputs } from "../TankopediaQuickInputs";
|
||||||
import { TankopediaSkinSwitcher } from "../TankopediaSkinSwitcher";
|
import { TankopediaSkinSwitcher } from "../TankopediaSkinSwitcher";
|
||||||
@@ -214,6 +215,7 @@ function Sandbox({ id }: TankopediaSandboxProps) {
|
|||||||
<Thicknesses thicknessRange={thicknessRange} />
|
<Thicknesses thicknessRange={thicknessRange} />
|
||||||
<TankopediaAntagonistControl penetration={antagonistPenetration} />
|
<TankopediaAntagonistControl penetration={antagonistPenetration} />
|
||||||
<TankopediaOptions />
|
<TankopediaOptions />
|
||||||
|
<TankopediaFullscreen target={wrapper} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const name = strings.tools[tool.id as keyof typeof strings.tools];
|
|||||||
{locale}
|
{locale}
|
||||||
className="link"
|
className="link"
|
||||||
underline="never"
|
underline="never"
|
||||||
href={tool.href ?? `/${tool.id}`}
|
href={tool.href ?? `/${tool.slug ?? tool.id}`}
|
||||||
target={tool.href ? "_blank" : undefined}
|
target={tool.href ? "_blank" : undefined}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -107,18 +107,23 @@ export const toolGroups: ToolGroup[] = [
|
|||||||
{
|
{
|
||||||
id: "tanks",
|
id: "tanks",
|
||||||
default: "tanks",
|
default: "tanks",
|
||||||
tools: ["tanks", "compare", "performance", "tier_list"],
|
tools: ["tanks", "compare", "performance"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "players",
|
id: "players",
|
||||||
default: "players",
|
default: "players",
|
||||||
tools: ["players", "session", "embed", "playlist"],
|
tools: ["players", "session"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "games",
|
id: "games",
|
||||||
default: "mixer",
|
default: "mixer",
|
||||||
tools: ["mixer", "guesser"],
|
tools: ["mixer", "guesser"],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "tools",
|
||||||
|
default: "tier_list",
|
||||||
|
tools: ["tier_list", "playlist", "embed"],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "cosmetics",
|
id: "cosmetics",
|
||||||
default: "avatars",
|
default: "avatars",
|
||||||
|
|||||||
@@ -2,7 +2,13 @@
|
|||||||
import { assertSecret } from "@blitzkit/core";
|
import { assertSecret } from "@blitzkit/core";
|
||||||
import locales from "@blitzkit/i18n/locales.json";
|
import locales from "@blitzkit/i18n/locales.json";
|
||||||
import { mixStaticPaths } from "../../../astro/mixStaticPaths";
|
import { mixStaticPaths } from "../../../astro/mixStaticPaths";
|
||||||
|
import HomeCosmetics from "../../../components/HomeCosmetics.astro";
|
||||||
|
import HomeGames from "../../../components/HomeGames.astro";
|
||||||
import HomeHero from "../../../components/HomeHero.astro";
|
import HomeHero from "../../../components/HomeHero.astro";
|
||||||
|
import HomePlayers from "../../../components/HomePlayers.astro";
|
||||||
|
import HomeTanks from "../../../components/HomeTanks.astro";
|
||||||
|
import HomeTechnical from "../../../components/HomeTechnical.astro";
|
||||||
|
import HomeTools from "../../../components/HomeTools.astro";
|
||||||
import Sections from "../../../components/Sections.astro";
|
import Sections from "../../../components/Sections.astro";
|
||||||
import { tools, type Tool } from "../../../config/tools";
|
import { tools, type Tool } from "../../../config/tools";
|
||||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||||
@@ -47,12 +53,13 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
|
|||||||
|
|
||||||
<!-- {environment === "preview" && <AesonPlug />} -->
|
<!-- {environment === "preview" && <AesonPlug />} -->
|
||||||
|
|
||||||
<Sections>
|
<Sections centered>
|
||||||
<!-- <HomeTanks {locale} /> -->
|
<HomeTanks {locale} />
|
||||||
<!-- <HomePlayers {locale} /> -->
|
<HomePlayers {locale} />
|
||||||
<!-- <HomeGames {locale} /> -->
|
<HomeGames {locale} />
|
||||||
<!-- <HomeCosmetics {locale} /> -->
|
<HomeTools {locale} />
|
||||||
<!-- <HomeTechnical {locale} /> -->
|
<HomeCosmetics {locale} />
|
||||||
|
<HomeTechnical {locale} />
|
||||||
</Sections>
|
</Sections>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ const { id, locale } = Astro.props;
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
gap: var(--space-4);
|
|
||||||
|
|
||||||
.sandbox {
|
.sandbox {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
||||||
@@ -45,8 +43,12 @@ const { id, locale } = Astro.props;
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
|
|
||||||
@media (pointer: fine) {
|
.content {
|
||||||
padding-top: var(--space-4);
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-4);
|
||||||
|
|
||||||
|
padding-inline: var(--page-padding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,12 +57,15 @@ const { id, locale } = Astro.props;
|
|||||||
<BaseLayout tool={tools.tanks} {locale} accent="violet">
|
<BaseLayout tool={tools.tanks} {locale} accent="violet">
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="sandbox">
|
<div class="sandbox">
|
||||||
<TankopediaTitle {id} {locale} />
|
|
||||||
<TankopediaSandbox {id} {locale} client:load />
|
<TankopediaSandbox {id} {locale} client:load />
|
||||||
<TankopediaCharacteristics {id} {locale} client:load />
|
|
||||||
<TankopediaGameModeAbilities {id} {locale} />
|
<div class="content">
|
||||||
<TankopediaVideos {id} {locale} />
|
<TankopediaTitle {id} {locale} />
|
||||||
<TankopediaTabs {id} {locale} client:load />
|
<TankopediaCharacteristics {id} {locale} client:load />
|
||||||
|
<TankopediaGameModeAbilities {id} {locale} />
|
||||||
|
<TankopediaVideos {id} {locale} />
|
||||||
|
<TankopediaTabs {id} {locale} client:load />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TankopediaLoadout {id} {locale} client:load />
|
<TankopediaLoadout {id} {locale} client:load />
|
||||||
|
|||||||
Reference in new issue
Block a user