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>
|
||||
|
||||
<div class="tool" id="current-tool">
|
||||
<div
|
||||
style={`background-image: url(${alias(
|
||||
"api",
|
||||
`/tools/${tool.id}/banners/thumbnail.webp`,
|
||||
)})`}
|
||||
class="logo"
|
||||
/>
|
||||
{tool.id !== "home" && (
|
||||
<div
|
||||
style={`background-image: url(${alias(
|
||||
"api",
|
||||
`/tools/${tool.id}/banners/thumbnail.webp`,
|
||||
)})`}
|
||||
class="logo"
|
||||
/>
|
||||
)}
|
||||
|
||||
<Text className="name">
|
||||
{strings.tools[tool.id as keyof typeof strings.tools].name}
|
||||
|
||||
@@ -16,6 +16,7 @@ export interface Tool {
|
||||
export const tools: Record<string, Tool> = {
|
||||
home: {
|
||||
id: "home",
|
||||
slug: "",
|
||||
banner_background_position: "center",
|
||||
hide_in_navbar_desktop: true,
|
||||
},
|
||||
|
||||
@@ -6,18 +6,17 @@ import ColorScale from "../components/ColorScale.astro";
|
||||
import NavbarCourse from "../components/NavbarCourse.astro";
|
||||
import NavbarFine from "../components/NavbarFine.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 { Color } from "../ui/color";
|
||||
|
||||
type Props = LocaleAcceptorProps & {
|
||||
accent: Color;
|
||||
solidNavbar?: boolean;
|
||||
tool: Tool;
|
||||
};
|
||||
|
||||
const { locale, accent, solidNavbar = false } = Astro.props;
|
||||
|
||||
const tool = tools.tanks;
|
||||
const { locale, accent, solidNavbar = false, tool } = Astro.props;
|
||||
---
|
||||
|
||||
<html lang={locale} class="dark">
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Link } from "../components/Link";
|
||||
import { LinkI18n } from "../components/LinkI18n";
|
||||
import { Text } from "../components/Text";
|
||||
import { discordLink } from "../config/socials";
|
||||
import { tools } from "../constants/tools";
|
||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||
|
||||
// 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);
|
||||
---
|
||||
|
||||
<BaseLayout accent="blue" {locale}>
|
||||
<BaseLayout tool={tools.home} accent="blue" {locale}>
|
||||
<div class="page">
|
||||
<Heading size="3">{strings.website.not_found.title}</Heading>
|
||||
<Text lowContrast>{strings.website.not_found.body}</Text>
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
import { Flex, Heading, Text } from "@radix-ui/themes";
|
||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
||||
import { mixStaticPaths } from "../../../../../core/blitzkit/mixStaticPaths";
|
||||
import { tools } from "../../../../../constants/tools";
|
||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||
import { getStaticPaths as _getStaticPaths } from "../../index.astro";
|
||||
import { AUTH_PROVIDER_NAMES, AUTH_PROVIDERS, Authorize } from "./_index";
|
||||
@@ -16,7 +17,7 @@ const { provider } = Astro.params;
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale}>
|
||||
<BaseLayout tool={tools.home} {locale}>
|
||||
<PageWrapper>
|
||||
<Flex
|
||||
style={{ flex: 1 }}
|
||||
|
||||
@@ -10,7 +10,7 @@ export { getStaticPaths } from "../index.astro";
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale} accent="purple">
|
||||
<BaseLayout tool={tools.avatars} {locale} accent="purple">
|
||||
<ToolBanner {locale} tool={tools.avatars} slot="pre-app" />
|
||||
|
||||
<Section>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import ColorScale from "../../../../components/ColorScale.astro";
|
||||
import { tools } from "../../../../constants/tools";
|
||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||
import { Page } from "./_index";
|
||||
|
||||
@@ -8,7 +9,7 @@ export { getStaticPaths } from "../index.astro";
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout accent="pink" {locale}>
|
||||
<BaseLayout tool={tools.compare} accent="pink" {locale}>
|
||||
<ColorScale color="red" />
|
||||
<ColorScale color="jade" />
|
||||
<ColorScale color="amber" />
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { CheckIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
||||
import { Badge } from "../../../components/Badge";
|
||||
import ColorScale from "../../../components/ColorScale.astro";
|
||||
import { tools } from "../../../constants/tools";
|
||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||
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[];
|
||||
---
|
||||
|
||||
<BaseLayout accent="blue" {locale}>
|
||||
<BaseLayout tool={tools.home} accent="blue" {locale}>
|
||||
{extraColors.map((color) => (
|
||||
<ColorScale {color} />
|
||||
))}
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
---
|
||||
import { readFile } from "fs/promises";
|
||||
import { mixStaticPaths } from "../../../../../../core/blitzkit/mixStaticPaths";
|
||||
import { tools } from "../../../../../../constants/tools";
|
||||
import BaseLayout from "../../../../../../layouts/BaseLayout.astro";
|
||||
import { getStaticPaths as _getStaticPaths } from "../../../index.astro";
|
||||
import { Page } from "./_index";
|
||||
@@ -30,6 +31,6 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||
const { content, locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale}>
|
||||
<BaseLayout tool={tools.home} {locale}>
|
||||
<Page content={content} />
|
||||
</BaseLayout>
|
||||
@@ -3,6 +3,7 @@ import { MagicWandIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
||||
import { Flex, Heading, Link } from "@radix-ui/themes";
|
||||
import { compareVersions } from "compare-versions";
|
||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
||||
import { tools } from "../../../../../constants/tools";
|
||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||
|
||||
export { getStaticPaths } from "../../index.astro";
|
||||
@@ -21,7 +22,7 @@ const versions = Object.keys(
|
||||
.reverse();
|
||||
---
|
||||
|
||||
<BaseLayout {locale}>
|
||||
<BaseLayout tool={tools.changelogs} {locale}>
|
||||
<PageWrapper align="center">
|
||||
<Heading mt="6" mb="4">BlitzKit patches</Heading>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
import { mixStaticPaths } from "../../../../../astro/mixStaticPaths";
|
||||
import { embedConfigurations } from "../../../../../constants/embeds";
|
||||
import { tools } from "../../../../../constants/tools";
|
||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
||||
import { Page } from "./_index";
|
||||
@@ -17,6 +18,6 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||
const { locale, embed } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale} accent="red">
|
||||
<BaseLayout tool={tools.embed} {locale} accent="red">
|
||||
<Page {locale} client:load {embed} />
|
||||
</BaseLayout>
|
||||
@@ -9,7 +9,7 @@ export { getStaticPaths } from "../index.astro";
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale} accent="red">
|
||||
<BaseLayout tool={tools.embed} {locale} accent="red">
|
||||
<ToolBanner {locale} tool={tools.embed} />
|
||||
|
||||
<Page {locale} />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import ColorScale from "../../../../components/ColorScale.astro";
|
||||
import { tools } from "../../../../constants/tools";
|
||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||
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
|
||||
---
|
||||
|
||||
<BaseLayout accent="blue" {locale} solidNavbar>
|
||||
<BaseLayout tool={tools.guesser} accent="blue" {locale} solidNavbar>
|
||||
<ColorScale color="red" />
|
||||
|
||||
<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} /> -->
|
||||
|
||||
<HelpTranslate {locale} />
|
||||
|
||||
@@ -11,7 +11,7 @@ const { locale } = Astro.props;
|
||||
|
||||
<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} skeleton slot="fallback" />
|
||||
</Page>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import ColorScale from "../../../../components/ColorScale.astro";
|
||||
import { tools } from "../../../../constants/tools";
|
||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||
import { Page } from "./_index";
|
||||
|
||||
@@ -8,7 +9,7 @@ export { getStaticPaths } from "../index.astro";
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout accent="jade" {locale}>
|
||||
<BaseLayout tool={tools.performance} accent="jade" {locale}>
|
||||
<ColorScale color="red" />
|
||||
<ColorScale color="jade" />
|
||||
<ColorScale color="amber" />
|
||||
|
||||
@@ -11,7 +11,7 @@ const { locale } = Astro.props;
|
||||
|
||||
<ToolOpenGraph {locale} tool={tools.playlist} />
|
||||
|
||||
<BaseLayout {locale} noFooter>
|
||||
<BaseLayout tool={tools.playlist} {locale} noFooter>
|
||||
<Page {locale} client:only="react">
|
||||
<Page {locale} skeleton slot="fallback" />
|
||||
</Page>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
import { tools } from "../../../../constants/tools";
|
||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||
import { Page } from "./_index";
|
||||
|
||||
@@ -7,6 +8,6 @@ export { getStaticPaths } from "../index.astro";
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale}>
|
||||
<BaseLayout tool={tools.settings} {locale}>
|
||||
<Page {locale} client:load />
|
||||
</BaseLayout>
|
||||
@@ -3,6 +3,7 @@ import { api } from "../../../../../api/dynamic";
|
||||
import { mixStaticPaths } from "../../../../../astro/mixStaticPaths";
|
||||
import ColorScale from "../../../../../components/ColorScale.astro";
|
||||
import ColorRanks from "../../../../../components/ColorRanks.astro";
|
||||
import { tools } from "../../../../../constants/tools";
|
||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||
import { getStaticPaths as _getStaticPaths } from "../index.astro";
|
||||
import { Page } from "./_index";
|
||||
@@ -19,7 +20,7 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||
const { id, locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale} accent="violet">
|
||||
<BaseLayout tool={tools.tanks} {locale} accent="violet">
|
||||
<ColorScale color="ruby" />
|
||||
<ColorScale color="cyan" />
|
||||
<ColorScale color="green" />
|
||||
|
||||
@@ -11,7 +11,7 @@ export { getStaticPaths } from "../index.astro";
|
||||
const { locale } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout {locale} accent="purple">
|
||||
<BaseLayout tool={tools.tanks} {locale} accent="purple">
|
||||
<ColorScale color="blue" />
|
||||
<ColorScale color="amber" />
|
||||
<ColorScale color="red" />
|
||||
|
||||
Reference in new issue
Block a user