mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-21 12:53:56 +01:00
navbars
This commit is contained in:
12 files changed
+265
-42
No files matched your search
@@ -1,18 +0,0 @@
|
||||
---
|
||||
import locales from "@blitzkit/i18n/locales.json";
|
||||
import BaseLayout2 from "../../../layouts/BaseLayout2.astro";
|
||||
import { getStaticPaths as _getStaticPaths } from "../_index";
|
||||
|
||||
import { mixStaticPaths } from "../../../astro/mixStaticPaths";
|
||||
|
||||
export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
|
||||
return locales.supported.map(({ locale }) => ({
|
||||
props: { locale },
|
||||
params: { locale: locale === locales.default ? undefined : locale },
|
||||
}));
|
||||
});
|
||||
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout2 {locale} />
|
||||
+21
-2
@@ -1,12 +1,17 @@
|
||||
.page {
|
||||
max-height: 100dvh;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
|
||||
gap: var(--space-4);
|
||||
|
||||
.sandbox {
|
||||
flex-grow: 1;
|
||||
|
||||
margin-left: calc(-1 * var(--space-4));
|
||||
padding-top: var(--space-4);
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.loadout {
|
||||
@@ -15,6 +20,11 @@
|
||||
|
||||
background-color: var(--gray-2);
|
||||
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
||||
max-height: 100dvh;
|
||||
|
||||
.content {
|
||||
padding: var(--space-5);
|
||||
|
||||
@@ -23,4 +33,13 @@
|
||||
gap: var(--space-5);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
.sandbox,
|
||||
.loadout {
|
||||
&[data-tabbed="false"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,14 @@ import { TankopediaCharacteristics } from "../../../../../components/TankopediaC
|
||||
import { TankopediaGameModeAbilities } from "../../../../../components/TankopediaGameModeAbilities";
|
||||
import { TankopediaLoadout } from "../../../../../components/TankopediaLoadout";
|
||||
import { TankopediaSandbox } from "../../../../../components/TankopediaSandbox";
|
||||
import { TankopediaTabs } from "../../../../../components/TankopediaTabs";
|
||||
import { TankopediaVideos } from "../../../../../components/TankopediaVideos";
|
||||
import { defaultEqualizer } from "../../../../../config/equalizer";
|
||||
import { withErrorWrapper } from "../../../../../hocs/withErrorWrapper";
|
||||
import { withLocale } from "../../../../../hocs/withLocale";
|
||||
import { useAwait } from "../../../../../hooks/useAwait";
|
||||
import { useCharacteristics } from "../../../../../hooks/useCharacteristics";
|
||||
import { Tankopedia } from "../../../../../stores/tankopedia";
|
||||
import { Tankopedia, TankopediaTab } from "../../../../../stores/tankopedia";
|
||||
import type { MaybeSkeletonComponentProps } from "../../../../../types/maybeSkeletonComponentProps";
|
||||
import styles from "./_index.module.css";
|
||||
|
||||
@@ -45,9 +46,12 @@ export const Page = withErrorWrapper(
|
||||
);
|
||||
|
||||
function Loadout() {
|
||||
const tabbed = Tankopedia.use((state) => state.tab === TankopediaTab.Loadout);
|
||||
|
||||
return (
|
||||
<Scroller
|
||||
className={styles.loadout}
|
||||
data-tabbed={tabbed}
|
||||
orientation={ScrollerOrientation.Vertical}
|
||||
>
|
||||
<div className={styles.content}>
|
||||
@@ -82,11 +86,10 @@ function Sandbox({ skeleton, tier }: SandboxProps) {
|
||||
return { value } satisfies ThicknessRange;
|
||||
}, [protagonist, equalize]);
|
||||
|
||||
const tabbed = Tankopedia.use((state) => state.tab === TankopediaTab.Sandbox);
|
||||
|
||||
return (
|
||||
<Scroller
|
||||
className={styles.sandbox}
|
||||
orientation={ScrollerOrientation.Vertical}
|
||||
>
|
||||
<div className={styles.sandbox}>
|
||||
<TankopediaSandbox
|
||||
antagonistCharacteristics={antagonistCharacteristics}
|
||||
skeleton={skeleton}
|
||||
@@ -95,6 +98,18 @@ function Sandbox({ skeleton, tier }: SandboxProps) {
|
||||
<TankopediaCharacteristics characteristics={characteristics} />
|
||||
<TankopediaGameModeAbilities />
|
||||
<TankopediaVideos />
|
||||
</Scroller>
|
||||
|
||||
<TankopediaTabs />
|
||||
</div>
|
||||
);
|
||||
|
||||
// return (
|
||||
// <Scroller
|
||||
// id="main"
|
||||
// className={styles.sandbox}
|
||||
// data-tabbed={tabbed}
|
||||
// orientation={ScrollerOrientation.Vertical}
|
||||
// >
|
||||
// </Scroller>
|
||||
// );
|
||||
}
|
||||
Reference in new issue
Block a user