move section and curtains into recently viweed tanks

This commit is contained in:
tresabhi committed 2026-12-03 21:34:39 -06:00
1 parent 91644255a1
commit f50b791245
5 files changed
+45 -33

No files matched your search

+6 -1
View File
@@ -1,6 +1,11 @@
# BlitzKit
Read `README.md` for setup and running: the dev server starts with `scripts/dev-website.sh` (Bun, not npm/Node).
Read `README.md` for setup and running: the dev server starts with `scripts/dev-website.sh`.
## Tooling
- Use Bun only: `bun`, `bun x`, `bun run`. Never `npm`, `npx`, `node`, `yarn` or `pnpm`.
- Format with `bun x prettier --write <files>`.
## Git
+4 -1
View File
@@ -7,6 +7,7 @@
"dependencies": {
"@gltf-transform/extensions": "^4.4.2",
"lz4js": "^0.2.0",
"prettier": "^3.10.2",
"sharp": "^0.34.5",
"typescript": "^5.9.3",
},
@@ -1997,7 +1998,7 @@
"potpack": ["[email protected]", "", {}, "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="],
"prettier": ["prettier@2.8.7", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="],
"prettier": ["prettier@3.10.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-VQGIFOC0JNYLvfT57+Tre9wvgpc1Njx0JcnTDwRD6IFQGPTfPMghvi2A7gSwa/I0emKTK4KpBIN4mWYHyCDNDQ=="],
"pretty-bytes": ["[email protected]", "", {}, "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ=="],
@@ -2777,6 +2778,8 @@
"wrap-ansi/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="],
"yaml-language-server/prettier": ["[email protected]", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="],
"yaml-language-server/request-light": ["[email protected]", "", {}, "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="],
"yaml-language-server/vscode-languageserver": ["[email protected]", "", { "dependencies": { "vscode-languageserver-protocol": "3.16.0" }, "bin": { "installServerIntoExtension": "bin/installServerIntoExtension" } }, "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw=="],
+1
View File
@@ -10,6 +10,7 @@
"dependencies": {
"@gltf-transform/extensions": "^4.4.2",
"lz4js": "^0.2.0",
"prettier": "^3.10.2",
"sharp": "^0.34.5",
"typescript": "^5.9.3"
}
@@ -7,6 +7,8 @@ import { useStrings } from "../../hooks/useStrings";
import { TankFilters } from "../../stores/tankFilters";
import { TankopediaPersistent } from "../../stores/tankopediaPersistent";
import { TankSort } from "../../stores/tankopediaSort";
import { ScrollerCurtains } from "../ScrollerCurtains";
import { Section } from "../Section";
import { TankCard } from "../TankCard";
import { TankCardSkeleton } from "../TankCardSkeleton";
import { MAX_RECENTLY_VIEWED } from "../TankSearchResults/constants";
@@ -43,35 +45,39 @@ function Content() {
}
return (
<div className={styles.recent}>
<Text color="gray" lowContrast className={styles.label}>
{strings.website.common.tank_search.recent}
</Text>
<Section overflow>
<ScrollerCurtains />
<div
className={styles.list}
data-empty={mounted && recentlyViewed.length === 0}
>
{!mounted &&
Array.from({ length: MAX_RECENTLY_VIEWED }, (_, index) => (
<TankCardSkeleton compact key={index} />
))}
<div className={styles.recent}>
<Text color="gray" lowContrast className={styles.label}>
{strings.website.common.tank_search.recent}
</Text>
{mounted && recentlyViewed.length === 0 && (
<>
<TankCardSkeleton compact className={styles.placeholder} />
<div
className={styles.list}
data-empty={mounted && recentlyViewed.length === 0}
>
{!mounted &&
Array.from({ length: MAX_RECENTLY_VIEWED }, (_, index) => (
<TankCardSkeleton compact key={index} />
))}
<Text color="gray" lowContrast className={styles.message}>
{strings.website.common.tank_search.recent_empty}
</Text>
</>
)}
{mounted && recentlyViewed.length === 0 && (
<>
<TankCardSkeleton compact className={styles.placeholder} />
{mounted &&
recentlyViewed.map((id) => (
<TankCard compact tank={tankDefinitions.tanks[id]} key={id} />
))}
<Text color="gray" lowContrast className={styles.message}>
{strings.website.common.tank_search.recent_empty}
</Text>
</>
)}
{mounted &&
recentlyViewed.map((id) => (
<TankCard compact tank={tankDefinitions.tanks[id]} key={id} />
))}
</div>
</div>
</div>
</Section>
);
}
@@ -3,10 +3,10 @@ import ColorScale from "../../../../components/ColorScale.astro";
import { RecentlyViewedTanks } from "../../../../components/RecentlyViewedTanks";
import { ScrollerCurtains } from "../../../../components/ScrollerCurtains";
import { Section } from "../../../../components/Section";
import Sections from "../../../../components/Sections.astro";
import { TankSearchBar } from "../../../../components/TankSearchBar";
import { TankSearchFilters } from "../../../../components/TankSearchFilters";
import { TankSearchResults } from "../../../../components/TankSearchResults";
import Sections from "../../../../components/Sections.astro";
import ToolBanner from "../../../../components/ToolBanner.astro";
import { tools } from "../../../../config/tools";
import BaseLayout from "../../../../layouts/BaseLayout.astro";
@@ -24,11 +24,6 @@ const { locale } = Astro.props;
<ToolBanner {locale} tool={tools.tanks} />
<Sections>
<Section overflow>
<ScrollerCurtains client:load />
<RecentlyViewedTanks {locale} client:load />
</Section>
<Section>
<TankSearchBar {locale} client:load />
</Section>
@@ -38,6 +33,8 @@ const { locale } = Astro.props;
<TankSearchFilters {locale} client:load />
</Section>
<RecentlyViewedTanks {locale} client:load />
<Section>
<TankSearchResults {locale} client:load />
</Section>