Compare commits

...
Author SHA1 Message Date
tresabhi 51900f4c80 countdown 2026-10-19 19:22:20 -05:00
TrèsAbhi 989e3d395a Merge pull request #385 from blitzkit/main
Production
2026-10-14 13:15:55 -05:00
2 changed files with 13 additions and 10 deletions

No files matched your search

@@ -3,9 +3,9 @@ import { useEffect, useState, type ReactNode } from "react";
import type { MaybeSkeletonComponentProps } from "../types/maybeSkeletonComponentProps"; import type { MaybeSkeletonComponentProps } from "../types/maybeSkeletonComponentProps";
import { InlineSkeleton } from "./InlineSkeleton"; import { InlineSkeleton } from "./InlineSkeleton";
const TIME = 1764898200 * 1000; const TIME = 1792598400 * 1000;
export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) { export function Countdown({ skeleton }: MaybeSkeletonComponentProps) {
const [timeLeft, setTimeLeft] = useState<number>(TIME - Date.now()); const [timeLeft, setTimeLeft] = useState<number>(TIME - Date.now());
useEffect(() => { useEffect(() => {
@@ -31,14 +31,14 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
string = ( string = (
<> <>
in{" "} revealed in{" "}
<Code highContrast> <Code highContrast>
{hours}h {minutes}m {seconds}s {hours}h {minutes}m {seconds}s
</Code> </Code>
</> </>
); );
} else { } else {
string = "has ended. Come again later!"; string = "have been revealed.";
} }
return ( return (
@@ -47,7 +47,7 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
color="gray" color="gray"
highContrast highContrast
style={{ display: "content" }} style={{ display: "content" }}
href="https://discord.gg/njQdBhNS?event=1446208951136813117" href="/tanks"
underline="none" underline="none"
> >
<Flex <Flex
@@ -56,17 +56,17 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
py="4" py="4"
style={{ style={{
borderRadius: "var(--radius-3)", borderRadius: "var(--radius-3)",
backgroundImage: "url(https://i.imgur.com/LRYmSkg.png)", backgroundImage: "url(https://i.imgur.com/xgngxoy.png)",
backgroundSize: "cover", backgroundSize: "cover",
backgroundPosition: "center", backgroundPosition: "center",
boxSizing: "border-box", boxSizing: "border-box",
boxShadow: "0 0 var(--space-7) var(--blue-a5)", boxShadow: "0 0 var(--space-7) var(--white-a2)",
}} }}
align="center" align="center"
gap="5" gap="5"
> >
<img <img
src="https://i.imgur.com/mvmJQgB.png" src="https://i.imgur.com/kXV3r3P.png"
style={{ style={{
height: "min(15vw, 5rem)", height: "min(15vw, 5rem)",
filter: "drop-shadow(0.5rem 0.5rem 1rem #00000080)", filter: "drop-shadow(0.5rem 0.5rem 1rem #00000080)",
@@ -75,11 +75,11 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
<Flex direction="column"> <Flex direction="column">
<Heading size={{ initial: "4", sm: "6" }}> <Heading size={{ initial: "4", sm: "6" }}>
Music Box giveaway {!skeleton && string}{" "} Tier XIs {!skeleton && string}{" "}
{skeleton && <InlineSkeleton width="10rem" />} {skeleton && <InlineSkeleton width="10rem" />}
</Heading> </Heading>
<Text size={{ initial: "2", sm: "3" }}> <Text size={{ initial: "2", sm: "3" }}>
Join the BlitzKit Discord server event Get ready to go to the Tankopedia!
</Text> </Text>
</Flex> </Flex>
</Flex> </Flex>
@@ -5,6 +5,7 @@ import locales from "@blitzkit/i18n/locales.json";
import { literals } from "@blitzkit/i18n/src/literals"; import { literals } from "@blitzkit/i18n/src/literals";
import { Box, Flex, Link } from "@radix-ui/themes"; import { Box, Flex, Link } from "@radix-ui/themes";
import { AesonPlug } from "../../../components/AesonPlug"; import { AesonPlug } from "../../../components/AesonPlug";
import { Countdown } from "../../../components/Countdown";
import HomeHero from "../../../components/HomeHero.astro"; import HomeHero from "../../../components/HomeHero.astro";
import { Plugs } from "../../../components/Plugs"; import { Plugs } from "../../../components/Plugs";
import ToolCard from "../../../components/ToolCard.astro"; import ToolCard from "../../../components/ToolCard.astro";
@@ -65,6 +66,8 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
<BaseLayout {locale}> <BaseLayout {locale}>
<HomeHero /> <HomeHero />
<Countdown client:load />
{ {
locale !== locales.default && ( locale !== locales.default && (
<Flex justify="center" pt="4" my="4"> <Flex justify="center" pt="4" my="4">