mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-21 12:53:56 +01:00
correct default navbar tool
This commit is contained in:
20 files changed
+41
-28
No files matched your search
@@ -243,13 +243,15 @@ const strings = await api.strings(locale);
|
|||||||
</LinkI18nWrapper>
|
</LinkI18nWrapper>
|
||||||
|
|
||||||
<div class="tool" id="current-tool">
|
<div class="tool" id="current-tool">
|
||||||
<div
|
{tool.id !== "home" && (
|
||||||
style={`background-image: url(${alias(
|
<div
|
||||||
"api",
|
style={`background-image: url(${alias(
|
||||||
`/tools/${tool.id}/banners/thumbnail.webp`,
|
"api",
|
||||||
)})`}
|
`/tools/${tool.id}/banners/thumbnail.webp`,
|
||||||
class="logo"
|
)})`}
|
||||||
/>
|
class="logo"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<Text className="name">
|
<Text className="name">
|
||||||
{strings.tools[tool.id as keyof typeof strings.tools].name}
|
{strings.tools[tool.id as keyof typeof strings.tools].name}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export interface Tool {
|
|||||||
export const tools: Record<string, Tool> = {
|
export const tools: Record<string, Tool> = {
|
||||||
home: {
|
home: {
|
||||||
id: "home",
|
id: "home",
|
||||||
|
slug: "",
|
||||||
banner_background_position: "center",
|
banner_background_position: "center",
|
||||||
hide_in_navbar_desktop: true,
|
hide_in_navbar_desktop: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,18 +6,17 @@ import ColorScale from "../components/ColorScale.astro";
|
|||||||
import NavbarCourse from "../components/NavbarCourse.astro";
|
import NavbarCourse from "../components/NavbarCourse.astro";
|
||||||
import NavbarFine from "../components/NavbarFine.astro";
|
import NavbarFine from "../components/NavbarFine.astro";
|
||||||
import SystemTheme from "../components/SystemTheme.astro";
|
import SystemTheme from "../components/SystemTheme.astro";
|
||||||
import { tools } from "../constants/tools";
|
import type { Tool } from "../constants/tools";
|
||||||
import type { LocaleAcceptorProps } from "../hooks/useLocale";
|
import type { LocaleAcceptorProps } from "../hooks/useLocale";
|
||||||
import type { Color } from "../ui/color";
|
import type { Color } from "../ui/color";
|
||||||
|
|
||||||
type Props = LocaleAcceptorProps & {
|
type Props = LocaleAcceptorProps & {
|
||||||
accent: Color;
|
accent: Color;
|
||||||
solidNavbar?: boolean;
|
solidNavbar?: boolean;
|
||||||
|
tool: Tool;
|
||||||
};
|
};
|
||||||
|
|
||||||
const { locale, accent, solidNavbar = false } = Astro.props;
|
const { locale, accent, solidNavbar = false, tool } = Astro.props;
|
||||||
|
|
||||||
const tool = tools.tanks;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<html lang={locale} class="dark">
|
<html lang={locale} class="dark">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { Link } from "../components/Link";
|
|||||||
import { LinkI18n } from "../components/LinkI18n";
|
import { LinkI18n } from "../components/LinkI18n";
|
||||||
import { Text } from "../components/Text";
|
import { Text } from "../components/Text";
|
||||||
import { discordLink } from "../config/socials";
|
import { discordLink } from "../config/socials";
|
||||||
|
import { tools } from "../constants/tools";
|
||||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||||
|
|
||||||
// the 404 page is not locale-scoped, so it always renders in the default locale
|
// the 404 page is not locale-scoped, so it always renders in the default locale
|
||||||
@@ -15,7 +16,7 @@ const locale = locales.default;
|
|||||||
const strings = await api.strings(locale);
|
const strings = await api.strings(locale);
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout accent="blue" {locale}>
|
<BaseLayout tool={tools.home} accent="blue" {locale}>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<Heading size="3">{strings.website.not_found.title}</Heading>
|
<Heading size="3">{strings.website.not_found.title}</Heading>
|
||||||
<Text lowContrast>{strings.website.not_found.body}</Text>
|
<Text lowContrast>{strings.website.not_found.body}</Text>
|
||||||
|
|||||||
+2
-1
@@ -2,6 +2,7 @@
|
|||||||
import { Flex, Heading, Text } from "@radix-ui/themes";
|
import { Flex, Heading, Text } from "@radix-ui/themes";
|
||||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
import { PageWrapper } from "../../../../../components/PageWrapper";
|
||||||
import { mixStaticPaths } from "../../../../../core/blitzkit/mixStaticPaths";
|
import { mixStaticPaths } from "../../../../../core/blitzkit/mixStaticPaths";
|
||||||
|
import { tools } from "../../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||||
import { getStaticPaths as _getStaticPaths } from "../../index.astro";
|
import { getStaticPaths as _getStaticPaths } from "../../index.astro";
|
||||||
import { AUTH_PROVIDER_NAMES, AUTH_PROVIDERS, Authorize } from "./_index";
|
import { AUTH_PROVIDER_NAMES, AUTH_PROVIDERS, Authorize } from "./_index";
|
||||||
@@ -16,7 +17,7 @@ const { provider } = Astro.params;
|
|||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale}>
|
<BaseLayout tool={tools.home} {locale}>
|
||||||
<PageWrapper>
|
<PageWrapper>
|
||||||
<Flex
|
<Flex
|
||||||
style={{ flex: 1 }}
|
style={{ flex: 1 }}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export { getStaticPaths } from "../index.astro";
|
|||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale} accent="purple">
|
<BaseLayout tool={tools.avatars} {locale} accent="purple">
|
||||||
<ToolBanner {locale} tool={tools.avatars} slot="pre-app" />
|
<ToolBanner {locale} tool={tools.avatars} slot="pre-app" />
|
||||||
|
|
||||||
<Section>
|
<Section>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
import ColorScale from "../../../../components/ColorScale.astro";
|
import ColorScale from "../../../../components/ColorScale.astro";
|
||||||
|
import { tools } from "../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ export { getStaticPaths } from "../index.astro";
|
|||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout accent="pink" {locale}>
|
<BaseLayout tool={tools.compare} accent="pink" {locale}>
|
||||||
<ColorScale color="red" />
|
<ColorScale color="red" />
|
||||||
<ColorScale color="jade" />
|
<ColorScale color="jade" />
|
||||||
<ColorScale color="amber" />
|
<ColorScale color="amber" />
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { CheckIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
import { CheckIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
||||||
import { Badge } from "../../../components/Badge";
|
import { Badge } from "../../../components/Badge";
|
||||||
import ColorScale from "../../../components/ColorScale.astro";
|
import ColorScale from "../../../components/ColorScale.astro";
|
||||||
|
import { tools } from "../../../constants/tools";
|
||||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||||
import type { Color } from "../../../ui/color";
|
import type { Color } from "../../../ui/color";
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ const iconLayouts = ["leading", "trailing", "both", "icon only"] as const;
|
|||||||
const extraColors = ["red", "amber", "green"] satisfies Color[];
|
const extraColors = ["red", "amber", "green"] satisfies Color[];
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout accent="blue" {locale}>
|
<BaseLayout tool={tools.home} accent="blue" {locale}>
|
||||||
{extraColors.map((color) => (
|
{extraColors.map((color) => (
|
||||||
<ColorScale {color} />
|
<ColorScale {color} />
|
||||||
))}
|
))}
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { readFile } from "fs/promises";
|
import { readFile } from "fs/promises";
|
||||||
import { mixStaticPaths } from "../../../../../../core/blitzkit/mixStaticPaths";
|
import { mixStaticPaths } from "../../../../../../core/blitzkit/mixStaticPaths";
|
||||||
|
import { tools } from "../../../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../../../layouts/BaseLayout.astro";
|
||||||
import { getStaticPaths as _getStaticPaths } from "../../../index.astro";
|
import { getStaticPaths as _getStaticPaths } from "../../../index.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
@@ -30,6 +31,6 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
|||||||
const { content, locale } = Astro.props;
|
const { content, locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale}>
|
<BaseLayout tool={tools.home} {locale}>
|
||||||
<Page content={content} />
|
<Page content={content} />
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
@@ -3,6 +3,7 @@ import { MagicWandIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
|||||||
import { Flex, Heading, Link } from "@radix-ui/themes";
|
import { Flex, Heading, Link } from "@radix-ui/themes";
|
||||||
import { compareVersions } from "compare-versions";
|
import { compareVersions } from "compare-versions";
|
||||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
import { PageWrapper } from "../../../../../components/PageWrapper";
|
||||||
|
import { tools } from "../../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||||
|
|
||||||
export { getStaticPaths } from "../../index.astro";
|
export { getStaticPaths } from "../../index.astro";
|
||||||
@@ -21,7 +22,7 @@ const versions = Object.keys(
|
|||||||
.reverse();
|
.reverse();
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale}>
|
<BaseLayout tool={tools.changelogs} {locale}>
|
||||||
<PageWrapper align="center">
|
<PageWrapper align="center">
|
||||||
<Heading mt="6" mb="4">BlitzKit patches</Heading>
|
<Heading mt="6" mb="4">BlitzKit patches</Heading>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { mixStaticPaths } from "../../../../../astro/mixStaticPaths";
|
import { mixStaticPaths } from "../../../../../astro/mixStaticPaths";
|
||||||
import { embedConfigurations } from "../../../../../constants/embeds";
|
import { embedConfigurations } from "../../../../../constants/embeds";
|
||||||
|
import { tools } from "../../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||||
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
@@ -17,6 +18,6 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
|||||||
const { locale, embed } = Astro.props;
|
const { locale, embed } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale} accent="red">
|
<BaseLayout tool={tools.embed} {locale} accent="red">
|
||||||
<Page {locale} client:load {embed} />
|
<Page {locale} client:load {embed} />
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
@@ -9,7 +9,7 @@ export { getStaticPaths } from "../index.astro";
|
|||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale} accent="red">
|
<BaseLayout tool={tools.embed} {locale} accent="red">
|
||||||
<ToolBanner {locale} tool={tools.embed} />
|
<ToolBanner {locale} tool={tools.embed} />
|
||||||
|
|
||||||
<Page {locale} />
|
<Page {locale} />
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
import ColorScale from "../../../../components/ColorScale.astro";
|
import ColorScale from "../../../../components/ColorScale.astro";
|
||||||
|
import { tools } from "../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ const { locale } = Astro.props;
|
|||||||
// TODO: the tank search popup is complete unreviewed AI slop, write a proper system for it manually
|
// TODO: the tank search popup is complete unreviewed AI slop, write a proper system for it manually
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout accent="blue" {locale} solidNavbar>
|
<BaseLayout tool={tools.guesser} accent="blue" {locale} solidNavbar>
|
||||||
<ColorScale color="red" />
|
<ColorScale color="red" />
|
||||||
|
|
||||||
<Page {locale} client:only="react">
|
<Page {locale} client:only="react">
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
|
|||||||
});
|
});
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout accent="blue" {locale}>
|
<BaseLayout tool={tools.home} accent="blue" {locale}>
|
||||||
<!-- <HomeHero {locale} /> -->
|
<!-- <HomeHero {locale} /> -->
|
||||||
|
|
||||||
<HelpTranslate {locale} />
|
<HelpTranslate {locale} />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const { locale } = Astro.props;
|
|||||||
|
|
||||||
<ToolOpenGraph {locale} tool={tools.mixer} />
|
<ToolOpenGraph {locale} tool={tools.mixer} />
|
||||||
|
|
||||||
<BaseLayout accent="gray" {locale} solidNavbar>
|
<BaseLayout tool={tools.mixer} accent="gray" {locale} solidNavbar>
|
||||||
<Page {locale} client:only="react">
|
<Page {locale} client:only="react">
|
||||||
<Page {locale} skeleton slot="fallback" />
|
<Page {locale} skeleton slot="fallback" />
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
import ColorScale from "../../../../components/ColorScale.astro";
|
import ColorScale from "../../../../components/ColorScale.astro";
|
||||||
|
import { tools } from "../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ export { getStaticPaths } from "../index.astro";
|
|||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout accent="jade" {locale}>
|
<BaseLayout tool={tools.performance} accent="jade" {locale}>
|
||||||
<ColorScale color="red" />
|
<ColorScale color="red" />
|
||||||
<ColorScale color="jade" />
|
<ColorScale color="jade" />
|
||||||
<ColorScale color="amber" />
|
<ColorScale color="amber" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const { locale } = Astro.props;
|
|||||||
|
|
||||||
<ToolOpenGraph {locale} tool={tools.playlist} />
|
<ToolOpenGraph {locale} tool={tools.playlist} />
|
||||||
|
|
||||||
<BaseLayout {locale} noFooter>
|
<BaseLayout tool={tools.playlist} {locale} noFooter>
|
||||||
<Page {locale} client:only="react">
|
<Page {locale} client:only="react">
|
||||||
<Page {locale} skeleton slot="fallback" />
|
<Page {locale} skeleton slot="fallback" />
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
import { tools } from "../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
|
|
||||||
@@ -7,6 +8,6 @@ export { getStaticPaths } from "../index.astro";
|
|||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale}>
|
<BaseLayout tool={tools.settings} {locale}>
|
||||||
<Page {locale} client:load />
|
<Page {locale} client:load />
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
@@ -3,6 +3,7 @@ import { api } from "../../../../../api/dynamic";
|
|||||||
import { mixStaticPaths } from "../../../../../astro/mixStaticPaths";
|
import { mixStaticPaths } from "../../../../../astro/mixStaticPaths";
|
||||||
import ColorScale from "../../../../../components/ColorScale.astro";
|
import ColorScale from "../../../../../components/ColorScale.astro";
|
||||||
import ColorRanks from "../../../../../components/ColorRanks.astro";
|
import ColorRanks from "../../../../../components/ColorRanks.astro";
|
||||||
|
import { tools } from "../../../../../constants/tools";
|
||||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||||
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
@@ -19,7 +20,7 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
|||||||
const { id, locale } = Astro.props;
|
const { id, locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale} accent="violet">
|
<BaseLayout tool={tools.tanks} {locale} accent="violet">
|
||||||
<ColorScale color="ruby" />
|
<ColorScale color="ruby" />
|
||||||
<ColorScale color="cyan" />
|
<ColorScale color="cyan" />
|
||||||
<ColorScale color="green" />
|
<ColorScale color="green" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export { getStaticPaths } from "../index.astro";
|
|||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale} accent="purple">
|
<BaseLayout tool={tools.tanks} {locale} accent="purple">
|
||||||
<ColorScale color="blue" />
|
<ColorScale color="blue" />
|
||||||
<ColorScale color="amber" />
|
<ColorScale color="amber" />
|
||||||
<ColorScale color="red" />
|
<ColorScale color="red" />
|
||||||
|
|||||||
Reference in new issue
Block a user