mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: some footer
This commit is contained in:
1 parent
a21bc6174d
commit
455679a981
7 files changed
+81
-38
No files matched your search
@@ -20,10 +20,14 @@ import "@fontsource-variable/roboto-flex";
|
|||||||
|
|
||||||
--font-size-regular: 1rem;
|
--font-size-regular: 1rem;
|
||||||
--font-size-minor: 0.75rem;
|
--font-size-minor: 0.75rem;
|
||||||
|
--font-size-major: 1.25rem;
|
||||||
|
|
||||||
--font-family-regular: "Roboto Flex Variable", sans-serif;
|
--font-family-regular: "Roboto Flex Variable", sans-serif;
|
||||||
--font-family-mono: "JetBrains Mono Variable", monospace;
|
--font-family-mono: "JetBrains Mono Variable", monospace;
|
||||||
|
|
||||||
|
--color-regular: var(--gray-12);
|
||||||
|
--color-low-contrast: var(--gray-11);
|
||||||
|
|
||||||
--weight-light: 300;
|
--weight-light: 300;
|
||||||
--weight-regular: 400;
|
--weight-regular: 400;
|
||||||
--weight-medium: 500;
|
--weight-medium: 500;
|
||||||
|
|||||||
@@ -1,20 +1,75 @@
|
|||||||
|
---
|
||||||
|
import packageJson from "../../../../package.json";
|
||||||
|
import { api } from "../core/api/dynamic";
|
||||||
|
import { BlitzKitIcon } from "../icons/BlitzKit";
|
||||||
|
import { Code } from "./Code";
|
||||||
|
import { Text } from "./Text";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
locale: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { locale } = Astro.props;
|
||||||
|
|
||||||
|
const strings = await api.strings(locale);
|
||||||
|
---
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.footer {
|
.footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
margin-top: calc(var(--space-4) * -1);
|
margin-top: calc(var(--space-4) * -1);
|
||||||
padding: var(--space-6) var(--space-4);
|
padding: var(--space-5) var(--space-5);
|
||||||
|
|
||||||
background-color: var(--gray-3);
|
background-color: var(--gray-3);
|
||||||
|
color: var(--color-low-contrast);
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
max-width: 52rem;
|
max-width: 52rem;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: var(--space-6);
|
||||||
|
height: var(--space-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: end;
|
||||||
|
gap: var(--space-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer-spacer {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<div class="footer-spacer"></div>
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="content">poopy</div>
|
<div class="content">
|
||||||
|
<div class="logo">
|
||||||
|
<BlitzKitIcon className="icon" />
|
||||||
|
|
||||||
|
<div class="info">
|
||||||
|
<Text lowContrast weight="medium" size="major">
|
||||||
|
{strings.common.name}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<Code>
|
||||||
|
{packageJson.version}
|
||||||
|
</Code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -5,6 +5,10 @@
|
|||||||
font-size: var(--font-size-minor);
|
font-size: var(--font-size-minor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[data-size="major"] {
|
||||||
|
font-size: var(--font-size-major);
|
||||||
|
}
|
||||||
|
|
||||||
&[data-weight="light"] {
|
&[data-weight="light"] {
|
||||||
font-weight: var(--weight-light);
|
font-weight: var(--weight-light);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export interface TextProps extends ComponentProps<"span"> {
|
|||||||
color?: Color;
|
color?: Color;
|
||||||
weight?: "light" | "regular" | "medium" | "bold" | "black";
|
weight?: "light" | "regular" | "medium" | "bold" | "black";
|
||||||
lowContrast?: boolean;
|
lowContrast?: boolean;
|
||||||
size?: "regular" | "minor";
|
size?: "regular" | "minor" | "major";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Text({
|
export function Text({
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ import Navbar from "../components/Navbar.astro";
|
|||||||
import type { Color } from "../core/ui/color";
|
import type { Color } from "../core/ui/color";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
locale: string;
|
||||||
accent: Color;
|
accent: Color;
|
||||||
noNavbar?: boolean;
|
noNavbar?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { accent, noNavbar } = Astro.props;
|
const { accent, noNavbar, locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
@@ -35,6 +36,7 @@ const { accent, noNavbar } = Astro.props;
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-5);
|
gap: var(--space-5);
|
||||||
|
min-height: 100dvh;
|
||||||
|
|
||||||
background-color: var(--gray-1);
|
background-color: var(--gray-1);
|
||||||
color: var(--gray-12);
|
color: var(--gray-12);
|
||||||
@@ -50,6 +52,6 @@ const { accent, noNavbar } = Astro.props;
|
|||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<Footer />
|
<Footer {locale} />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
interface Props {
|
||||||
|
skeleton?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Page({ skeleton }: Props) {}
|
||||||
@@ -1,41 +1,14 @@
|
|||||||
---
|
---
|
||||||
import { ProfileAvatarComponent_Category } from "@protos/blitz_static_profile_avatar_component";
|
|
||||||
import { Grade } from "@protos/blitz_static_standard_grades_enum";
|
|
||||||
import { api } from "../../../core/api/dynamic";
|
|
||||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||||
|
import { Page } from "./_index";
|
||||||
|
|
||||||
export { getStaticPaths } from "../index.astro";
|
export { getStaticPaths } from "../index.astro";
|
||||||
|
|
||||||
const { avatars } = await api.avatars();
|
const { locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout accent="gold">
|
<BaseLayout {locale} accent="gold">
|
||||||
{
|
<Page client:only="react">
|
||||||
avatars.map((avatar) => {
|
<Page skeleton slot="fallback" />
|
||||||
return (
|
</Page>
|
||||||
<>
|
|
||||||
<h3>
|
|
||||||
{avatar.stuff_ui!.display_name} {Grade[avatar.stuff_ui!.grade]}{" "}
|
|
||||||
{ProfileAvatarComponent_Category[avatar.profile_avatar!.category]}
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
{avatar.stuff_ui!.description && (
|
|
||||||
<p>{avatar.stuff_ui!.description}</p>
|
|
||||||
)}
|
|
||||||
{avatar.stuff_ui!.obtaining_methods && (
|
|
||||||
<p>{avatar.stuff_ui!.obtaining_methods}</p>
|
|
||||||
)}
|
|
||||||
{avatar.stuff_ui!.features && <p>{avatar.stuff_ui!.features}</p>}
|
|
||||||
|
|
||||||
<img width="128" src={`/api/avatars/${avatar.name}.webp`} />
|
|
||||||
|
|
||||||
{avatar.sellable && (
|
|
||||||
<pre>{JSON.stringify(avatar.sellable, null, 2)}</pre>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<br />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
Reference in new issue
Block a user