mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
fix: styles of home page
This commit is contained in:
1 parent
a149af50fd
commit
6d31dcb74b
7 files changed
+47
-22
No files matched your search
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": ".",
|
||||
},
|
||||
{
|
||||
"path": "C:/Program Files/WindowsApps/7458BE2C.WorldofTanksBlitz_11.1.256.0_x64__x4tje2y229k00/Data",
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
.text {
|
||||
font-size: var(--font-size-regular);
|
||||
color: var(--gray-12);
|
||||
|
||||
&[data-size="minor"] {
|
||||
font-size: var(--font-size-minor);
|
||||
|
||||
@@ -21,6 +21,13 @@ export function Text({
|
||||
color = "gray",
|
||||
...props
|
||||
}: TextProps) {
|
||||
const scale = color === "gray" && lowContrast ? "white" : color;
|
||||
let power: string | number = 12;
|
||||
|
||||
if (lowContrast) {
|
||||
power = color === "gray" ? "a9" : 11;
|
||||
}
|
||||
|
||||
return (
|
||||
<span
|
||||
className={classNames(styles.text, className)}
|
||||
@@ -28,7 +35,9 @@ export function Text({
|
||||
data-size={size}
|
||||
data-weight={weight}
|
||||
data-align={align === "left" ? undefined : align}
|
||||
style={{ color: `var(--${color}-${lowContrast ? 10 : 12})` }}
|
||||
style={{
|
||||
color: `var(--${scale}-${power})`,
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -20,6 +20,7 @@ const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
|
||||
|
||||
<style>
|
||||
.tool-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 10rem;
|
||||
position: relative;
|
||||
|
||||
@@ -243,10 +243,6 @@ export class ServerAPI extends AbstractAPI {
|
||||
strings[key] = parsed[key].replaceAll('\\"', '"');
|
||||
}
|
||||
|
||||
console.log(
|
||||
namespaceStrings["ProfileAvatarEntity__1_ct_legendary__DisplayName"],
|
||||
);
|
||||
|
||||
Object.assign(strings, namespaceStrings);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
import locales from "@blitzkit/i18n/locales.json";
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import ColorScale from "../../components/ColorScale.astro";
|
||||
import HomeCosmetics from "../../components/HomeCosmetics.astro";
|
||||
import HomeGames from "../../components/HomeGames.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 { tools } from "../../core/tools/tools";
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
|
||||
export const getStaticPaths = (() => {
|
||||
return [
|
||||
...locales.supported
|
||||
.filter(({ locale }) => locale !== locales.default)
|
||||
.map(({ locale }) => ({ params: { locale }, props: { locale } })),
|
||||
{ params: { locale: undefined }, props: { locale: locales.default } },
|
||||
];
|
||||
}) satisfies GetStaticPaths;
|
||||
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale} accent="amber">
|
||||
<HomeHero {locale} />
|
||||
|
||||
{Object.values(tools).map((tool) => <ColorScale color={tool.accent} />)}
|
||||
|
||||
<HomeTanks {locale} />
|
||||
<HomePlayers {locale} />
|
||||
<HomeGames {locale} />
|
||||
<HomeCosmetics {locale} />
|
||||
<HomeTechnical {locale} />
|
||||
</BaseLayout>
|
||||
@@ -3,10 +3,7 @@ import locales from "@blitzkit/i18n/locales.json";
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import ColorScale from "../../components/ColorScale.astro";
|
||||
import HomeCosmetics from "../../components/HomeCosmetics.astro";
|
||||
import HomeGames from "../../components/HomeGames.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 { tools } from "../../core/tools/tools";
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
@@ -28,9 +25,6 @@ const { locale } = Astro.props;
|
||||
|
||||
{Object.values(tools).map((tool) => <ColorScale color={tool.accent} />)}
|
||||
|
||||
<HomeTanks {locale} />
|
||||
<HomePlayers {locale} />
|
||||
<HomeGames {locale} />
|
||||
<HomeCosmetics {locale} />
|
||||
<HomeTechnical {locale} />
|
||||
</BaseLayout>
|
||||
Reference in new issue
Block a user