mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
simplification
This commit is contained in:
1 parent
cfc0ebb8e5
commit
de8b3959b3
14 files changed
+111
-67
No files matched your search
@@ -402,7 +402,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"guesser": {
|
"guesser": {
|
||||||
"name": "Guess",
|
"name": "Guesser",
|
||||||
"description": "Silhouette mini-game",
|
"description": "Silhouette mini-game",
|
||||||
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
|
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
File renamed without changes.
Binary file not shown.
|
After Width: | Height: | Size: 187 KiB |
File renamed without changes.
@@ -2,6 +2,7 @@
|
|||||||
import { tools } from "../constants/tools";
|
import { tools } from "../constants/tools";
|
||||||
import { getStrings } from "../core/i18n/getStrings";
|
import { getStrings } from "../core/i18n/getStrings";
|
||||||
import { Heading } from "./Heading";
|
import { Heading } from "./Heading";
|
||||||
|
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,14 +16,16 @@ const { locale } = Astro.props;
|
|||||||
const strings = getStrings(locale);
|
const strings = getStrings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Heading size="5">{strings.home.cosmetics}</Heading>
|
<Section>
|
||||||
|
<Heading size="2">{strings.home.cosmetics}</Heading>
|
||||||
|
|
||||||
<ToolCardLayoutRoot minor>
|
<ToolCardLayoutRoot minor>
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.avatars} />
|
<ToolCard {locale} tool={tools.avatars} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
|
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.backgrounds} />
|
<ToolCard {locale} tool={tools.backgrounds} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
|
</Section>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
import { tools } from "../constants/tools";
|
import { tools } from "../constants/tools";
|
||||||
import { getStrings } from "../core/i18n/getStrings";
|
import { getStrings } from "../core/i18n/getStrings";
|
||||||
import { Heading } from "./Heading";
|
import { Heading } from "./Heading";
|
||||||
|
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,14 +16,16 @@ const { locale } = Astro.props;
|
|||||||
const strings = getStrings(locale);
|
const strings = getStrings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Heading size="5" className="title">{strings.home.games}</Heading>
|
<Section>
|
||||||
|
<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} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
|
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.guesser} />
|
<ToolCard {locale} tool={tools.guesser} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
|
</Section>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
import { tools } from "../constants/tools";
|
import { tools } from "../constants/tools";
|
||||||
import { getStrings } from "../core/i18n/getStrings";
|
import { getStrings } from "../core/i18n/getStrings";
|
||||||
import { Heading } from "./Heading";
|
import { Heading } from "./Heading";
|
||||||
|
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,15 +16,17 @@ const { locale } = Astro.props;
|
|||||||
const strings = getStrings(locale);
|
const strings = getStrings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Heading size="5">{strings.home.players}</Heading>
|
<Section>
|
||||||
|
<Heading size="2">{strings.home.players}</Heading>
|
||||||
|
|
||||||
<ToolCardLayoutRoot>
|
<ToolCardLayoutRoot>
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.session} />
|
<ToolCard {locale} minor tool={tools.session} />
|
||||||
<ToolCard {locale} tool={tools.playlist} />
|
<ToolCard {locale} minor tool={tools.playlist} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
|
|
||||||
<ToolCardLayoutColumn major>
|
<ToolCardLayoutColumn major>
|
||||||
<ToolCard {locale} tool={tools.players} />
|
<ToolCard {locale} tool={tools.players} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
|
</Section>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
import { tools } from "../constants/tools";
|
import { tools } from "../constants/tools";
|
||||||
import { getStrings } from "../core/i18n/getStrings";
|
import { getStrings } from "../core/i18n/getStrings";
|
||||||
import { Heading } from "./Heading";
|
import { Heading } from "./Heading";
|
||||||
|
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";
|
||||||
@@ -14,15 +15,17 @@ const { locale } = Astro.props;
|
|||||||
const strings = getStrings(locale);
|
const strings = getStrings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Heading size="5">{strings.home.tanks}</Heading>
|
<Section>
|
||||||
|
<Heading size="2">{strings.home.tanks}</Heading>
|
||||||
|
|
||||||
<ToolCardLayoutRoot>
|
<ToolCardLayoutRoot>
|
||||||
<ToolCardLayoutColumn major>
|
<ToolCardLayoutColumn major>
|
||||||
<ToolCard {locale} tool={tools.tanks} />
|
<ToolCard {locale} tool={tools.tanks} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
|
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.compare} />
|
<ToolCard {locale} minor tool={tools.compare} />
|
||||||
<ToolCard {locale} tool={tools.performance} />
|
<ToolCard {locale} minor tool={tools.performance} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
|
</Section>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
import { tools } from "../constants/tools";
|
import { tools } from "../constants/tools";
|
||||||
import { getStrings } from "../core/i18n/getStrings";
|
import { getStrings } from "../core/i18n/getStrings";
|
||||||
import { Heading } from "./Heading";
|
import { Heading } from "./Heading";
|
||||||
|
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,14 +16,16 @@ const { locale } = Astro.props;
|
|||||||
const strings = getStrings(locale);
|
const strings = getStrings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Heading size="5">{strings.home.technical}</Heading>
|
<Section>
|
||||||
|
<Heading size="2">{strings.home.technical}</Heading>
|
||||||
|
|
||||||
<ToolCardLayoutRoot minor>
|
<ToolCardLayoutRoot minor>
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.api} />
|
<ToolCard {locale} tool={tools.api} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
|
|
||||||
<ToolCardLayoutColumn>
|
<ToolCardLayoutColumn>
|
||||||
<ToolCard {locale} tool={tools.changelogs} />
|
<ToolCard {locale} tool={tools.changelogs} />
|
||||||
</ToolCardLayoutColumn>
|
</ToolCardLayoutColumn>
|
||||||
</ToolCardLayoutRoot>
|
</ToolCardLayoutRoot>
|
||||||
|
</Section>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
.section {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
max-width: var(--page-width);
|
||||||
|
|
||||||
|
gap: var(--space-4);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import type { ComponentProps } from "react";
|
||||||
|
import { classNames } from "../../ui/classNames";
|
||||||
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
|
export interface SectionProps extends ComponentProps<"div"> {}
|
||||||
|
|
||||||
|
export function Section({ className, children, ...props }: SectionProps) {
|
||||||
|
return (
|
||||||
|
<div className={classNames(styles.section, className)} {...props}>
|
||||||
|
<div className={styles.content}>{children}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -3,14 +3,14 @@ import type { Tool } from "../constants/tools";
|
|||||||
import { getStrings } from "../core/i18n/getStrings";
|
import { getStrings } from "../core/i18n/getStrings";
|
||||||
import { Heading } from "./Heading";
|
import { Heading } from "./Heading";
|
||||||
import { LinkI18n } from "./LinkI18n";
|
import { LinkI18n } from "./LinkI18n";
|
||||||
import { Text } from "./Text";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
tool: Tool;
|
tool: Tool;
|
||||||
locale: string;
|
locale: string;
|
||||||
|
minor?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { locale, tool } = Astro.props;
|
const { locale, tool, minor } = Astro.props;
|
||||||
const strings = getStrings(locale);
|
const strings = getStrings(locale);
|
||||||
const toolStrings =
|
const toolStrings =
|
||||||
strings.website.tools[
|
strings.website.tools[
|
||||||
@@ -20,12 +20,13 @@ const toolStrings =
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
border-radius: var(--radius-3);
|
border-radius: var(--space-3);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
height: 16rem;
|
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -56,7 +57,15 @@ const toolStrings =
|
|||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
gap: var(--space-4);
|
padding: var(--space-5);
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
backdrop-filter: blur(64px);
|
||||||
|
-webkit-backdrop-filter: blur(64px);
|
||||||
|
|
||||||
|
&[data-minor="true"] {
|
||||||
|
padding: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -74,7 +83,7 @@ const toolStrings =
|
|||||||
<LinkI18n
|
<LinkI18n
|
||||||
{locale}
|
{locale}
|
||||||
className="link"
|
className="link"
|
||||||
underline="none"
|
underline="never"
|
||||||
href={tool.href ?? `/${tool.id}`}
|
href={tool.href ?? `/${tool.id}`}
|
||||||
target={tool.href ? "_blank" : undefined}
|
target={tool.href ? "_blank" : undefined}
|
||||||
>
|
>
|
||||||
@@ -84,22 +93,11 @@ const toolStrings =
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="content" data-minor={minor}>
|
||||||
class="content"
|
|
||||||
style={{
|
|
||||||
backgroundColor: "var(--color-panel-translucent)",
|
|
||||||
backdropFilter: "blur(64px) brightness(50%)",
|
|
||||||
WebkitBackdropFilter: "blur(64px)",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<Heading weight="medium">
|
<Heading size={minor ? "3" : "2"} weight="medium">
|
||||||
{toolStrings.name}
|
{toolStrings.name}
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|
||||||
<Text color="gray">
|
|
||||||
{toolStrings.description}
|
|
||||||
</Text>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</LinkI18n>
|
</LinkI18n>
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ const { accent, locale } = Astro.props;
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
background-color: var(--gray-1);
|
background-color: var(--gray-1);
|
||||||
|
|
||||||
|
padding: var(--space-5);
|
||||||
|
gap: var(--space-6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export type Space = `${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`;
|
||||||
Reference in new issue
Block a user