mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: some work on footer
This commit is contained in:
1 parent
821bd363ad
commit
bf9262f1f1
7 files changed
+107
-36
No files matched your search
@@ -110,5 +110,10 @@
|
|||||||
"navbar": {
|
"navbar": {
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"settings": "Settings"
|
"settings": "Settings"
|
||||||
|
},
|
||||||
|
|
||||||
|
"companies": {
|
||||||
|
"discord": "Discord",
|
||||||
|
"github": "GitHub"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
import { DiscordLogoIcon, GitHubLogoIcon } from "@radix-ui/react-icons";
|
||||||
import packageJson from "../../../../package.json";
|
import packageJson from "../../../../package.json";
|
||||||
import { api } from "../core/api/dynamic";
|
import { api } from "../core/api/dynamic";
|
||||||
import { BlitzKitIcon } from "../icons/BlitzKit";
|
import { BlitzKitIcon } from "../icons/BlitzKit";
|
||||||
import { Code } from "./Code";
|
import { Code } from "./Code";
|
||||||
|
import { Link } from "./Link";
|
||||||
import { Text } from "./Text";
|
import { Text } from "./Text";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -28,20 +30,36 @@ const strings = await api.strings(locale);
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
max-width: var(--page-width);
|
max-width: var(--page-width);
|
||||||
|
|
||||||
.logo {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
align-items: center;
|
gap: var(--space-4);
|
||||||
gap: var(--space-4);
|
|
||||||
|
|
||||||
.icon {
|
.row-info {
|
||||||
width: var(--space-6);
|
display: flex;
|
||||||
height: var(--space-6);
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--space-4);
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: var(--space-6);
|
||||||
|
height: var(--space-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.links {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
gap: var(--space-1);
|
gap: var(--space-5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,17 +68,39 @@ const strings = await api.strings(locale);
|
|||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="logo">
|
<div class="row-info">
|
||||||
<BlitzKitIcon className="icon" />
|
<div class="logo">
|
||||||
|
<BlitzKitIcon className="icon" />
|
||||||
|
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<Text lowContrast weight="medium" size="major">
|
<Text lowContrast weight="medium" size="major">
|
||||||
{strings.common.name}
|
{strings.common.name}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Code>
|
<Code>
|
||||||
{packageJson.version}
|
{packageJson.version}
|
||||||
</Code>
|
</Code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="links">
|
||||||
|
<Link
|
||||||
|
underline="hover"
|
||||||
|
color="gray"
|
||||||
|
href="https://discord.gg/nDt7AjGJQH"
|
||||||
|
>
|
||||||
|
<DiscordLogoIcon />
|
||||||
|
{strings.companies.discord}
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link
|
||||||
|
underline="hover"
|
||||||
|
color="gray"
|
||||||
|
href="https://github.com/blitzkit/blitzkit"
|
||||||
|
>
|
||||||
|
<GitHubLogoIcon />
|
||||||
|
{strings.companies.github}
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+4
-5
@@ -1,7 +1,10 @@
|
|||||||
.link {
|
.link {
|
||||||
color: var(--accent-11);
|
|
||||||
text-decoration-color: currentColor;
|
text-decoration-color: currentColor;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--space-3);
|
||||||
|
|
||||||
&[data-underline="hover"],
|
&[data-underline="hover"],
|
||||||
&[data-underline="never"] {
|
&[data-underline="never"] {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -12,10 +15,6 @@
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-high-contrast="true"] {
|
|
||||||
color: var(--accent-12);
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 1.25em;
|
width: 1.25em;
|
||||||
height: 1.25em;
|
height: 1.25em;
|
||||||
@@ -1,21 +1,29 @@
|
|||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps } from "react";
|
||||||
import { classNames } from "../../core/ui/classNames";
|
import { classNames } from "../../core/ui/classNames";
|
||||||
import "./index.css";
|
import type { Color } from "../../core/ui/color";
|
||||||
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
export interface LinkProps extends ComponentProps<"a"> {
|
export interface LinkProps extends ComponentProps<"a"> {
|
||||||
underline?: "always" | "hover" | "never";
|
underline?: "always" | "hover" | "never";
|
||||||
highContrast?: boolean;
|
highContrast?: boolean;
|
||||||
|
color?: Color | "accent";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Link({
|
export function Link({
|
||||||
highContrast,
|
highContrast,
|
||||||
className,
|
className,
|
||||||
underline = "always",
|
underline = "always",
|
||||||
|
color = "accent",
|
||||||
|
style,
|
||||||
...props
|
...props
|
||||||
}: LinkProps) {
|
}: LinkProps) {
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
className={classNames("link", className)}
|
className={classNames(styles.link, className)}
|
||||||
|
style={{
|
||||||
|
color: `var(--${color}-${highContrast ? 12 : 11})`,
|
||||||
|
...style,
|
||||||
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
data-underline={underline}
|
data-underline={underline}
|
||||||
data-high-contrast={highContrast}
|
data-high-contrast={highContrast}
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
---
|
---
|
||||||
import { BlitzKitIcon } from "../icons/BlitzKit";
|
import { BlitzKitIcon } from "../icons/BlitzKit";
|
||||||
import { LinkI18n } from "./LinkI18n";
|
import { LinkI18n } from "./LinkI18n";
|
||||||
import { Text } from "./Text";
|
|
||||||
import { api } from "../core/api/dynamic";
|
|
||||||
import { tools } from "../core/tools/tools";
|
|
||||||
import type { Tool } from "../core/tools/tools";
|
|
||||||
import { HamburgerMenuIcon, MagnifyingGlassIcon } from "@radix-ui/react-icons";
|
import { HamburgerMenuIcon, MagnifyingGlassIcon } from "@radix-ui/react-icons";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -56,9 +52,7 @@ const { locale } = Astro.props;
|
|||||||
gap: var(--space-2);
|
gap: var(--space-2);
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--color-regular);
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--gray-11);
|
|
||||||
|
|
||||||
.selector {
|
.selector {
|
||||||
padding: var(--space-2);
|
padding: var(--space-2);
|
||||||
@@ -102,7 +96,14 @@ const { locale } = Astro.props;
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<LinkI18n {locale} href="/" className="action" tabIndex={0}>
|
<LinkI18n
|
||||||
|
color="gray"
|
||||||
|
highContrast
|
||||||
|
{locale}
|
||||||
|
href="/"
|
||||||
|
className="action"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
<div class="selector">
|
<div class="selector">
|
||||||
<BlitzKitIcon className="icon" />
|
<BlitzKitIcon className="icon" />
|
||||||
</div>
|
</div>
|
||||||
@@ -110,13 +111,27 @@ const { locale } = Astro.props;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<LinkI18n {locale} href="/" className="action" tabIndex={0}>
|
<LinkI18n
|
||||||
|
color="gray"
|
||||||
|
highContrast
|
||||||
|
{locale}
|
||||||
|
href="/"
|
||||||
|
className="action"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
<div class="selector">
|
<div class="selector">
|
||||||
<MagnifyingGlassIcon className="icon" />
|
<MagnifyingGlassIcon className="icon" />
|
||||||
</div>
|
</div>
|
||||||
</LinkI18n>
|
</LinkI18n>
|
||||||
|
|
||||||
<LinkI18n {locale} href="/" className="action" tabIndex={0}>
|
<LinkI18n
|
||||||
|
color="gray"
|
||||||
|
highContrast
|
||||||
|
{locale}
|
||||||
|
href="/"
|
||||||
|
className="action"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
<div class="selector">
|
<div class="selector">
|
||||||
<HamburgerMenuIcon className="icon" />
|
<HamburgerMenuIcon className="icon" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.tool-card {
|
.tool-card {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 10rem;
|
height: 10rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 0;
|
||||||
|
|
||||||
border-radius: var(--space-3);
|
border-radius: var(--space-3);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import BaseMeta from "../components/BaseMeta.astro";
|
|||||||
import BaseStyles from "../components/BaseStyles.astro";
|
import BaseStyles from "../components/BaseStyles.astro";
|
||||||
import ColorAlias from "../components/ColorAlias.astro";
|
import ColorAlias from "../components/ColorAlias.astro";
|
||||||
import ColorScale from "../components/ColorScale.astro";
|
import ColorScale from "../components/ColorScale.astro";
|
||||||
|
import Footer from "../components/Footer.astro";
|
||||||
import Navbar from "../components/Navbar.astro";
|
import Navbar from "../components/Navbar.astro";
|
||||||
import type { Color } from "../core/ui/color";
|
import type { Color } from "../core/ui/color";
|
||||||
|
|
||||||
@@ -66,5 +67,7 @@ const { accent, noNavbar, locale } = Astro.props;
|
|||||||
<div class="app">
|
<div class="app">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Footer {locale} />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in new issue
Block a user