Skip to content

Commit 476c80d

Browse files
committed
Fix brand page and splash hero image
1 parent 7b02e48 commit 476c80d

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

app/pages/brand.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function Brand() {
3737
</p>
3838
<p>
3939
<a
40-
href="/_brand/React Router Brand Assets.zip"
40+
href={encodeURI("/_brand/React Router Brand Assets.zip")}
4141
className="underline hover:text-red-brand"
4242
download
4343
>
@@ -125,6 +125,10 @@ let background = {
125125
dark: "bg-black bg-[linear-gradient(45deg,theme(colors.gray.800)_25%,transparent_25%,transparent_75%,theme(colors.gray.800)_75%,theme(colors.gray.800)),linear-gradient(45deg,theme(colors.gray.800)_25%,transparent_25%,transparent_75%,theme(colors.gray.800)_75%,theme(colors.gray.800))] bg-[length:24px_24px] bg-[position:0_0,12px_12px]",
126126
};
127127

128+
function assetUrl(filePath: string, format = "svg") {
129+
return encodeURI(`${filePath}.${format}`);
130+
}
131+
128132
function LogoBox({
129133
filePath,
130134
theme,
@@ -147,15 +151,15 @@ function LogoBox({
147151
>
148152
<img
149153
className="max-h-[33%] max-w-[50%]"
150-
src={`${filePath}.svg`}
154+
src={assetUrl(filePath)}
151155
alt={alt}
152156
/>
153157
</div>
154158
<div className="mt-1 flex items-end gap-4 text-sm">
155159
{["svg", "png"].map((format) => (
156160
<a
157161
className="uppercase underline opacity-50 hover:opacity-100"
158-
href={`${filePath}.${format}`}
162+
href={assetUrl(filePath, format)}
159163
download={`${downloadFilePath}.${format}`}
160164
key={format}
161165
>

app/pages/splash.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,18 @@ export default function Home({ loaderData }: Route.ComponentProps) {
115115
<main className="flex min-h-full w-full flex-col items-center justify-center dark:bg-gray-900">
116116
<section className="from-23% via-82% flex w-full flex-col items-center gap-y-12 bg-gradient-to-b from-[#CCD2DE] via-[#D9DDE6] to-white to-100% py-[96px] dark:from-[#595F6C] dark:via-[#202228] dark:via-65% dark:to-gray-900 md:py-[160px]">
117117
<h1>
118-
<picture className="aspect-[32/5] w-[360px] md:w-[480px] lg:w-[640px] 2xl:w-[960px]">
119-
<source
120-
srcSet="/splash/hero-3d-logo.webp"
121-
media="(prefers-color-scheme: light)"
122-
/>
123-
<source
124-
srcSet="/splash/hero-3d-logo.dark.webp"
125-
media="(prefers-color-scheme: dark)"
126-
/>
118+
<span className="block">
127119
<img
128120
src="/splash/hero-3d-logo.webp"
129121
alt="React Router logo, six dots in an upward triangle (one on top, two in the middle, three on the bottom) with a path of three highlighted and connected from top to bottom, next to the text React Router"
130-
className="aspect-[32/5] w-[360px] md:w-[480px] lg:w-[640px] 2xl:w-[960px]"
122+
className="aspect-[32/5] w-[360px] dark:hidden md:w-[480px] lg:w-[640px] 2xl:w-[960px]"
123+
/>
124+
<img
125+
src="/splash/hero-3d-logo.dark.webp"
126+
alt="React Router logo, six dots in an upward triangle (one on top, two in the middle, three on the bottom) with a path of three highlighted and connected from top to bottom, next to the text React Router"
127+
className="hidden aspect-[32/5] w-[360px] dark:block md:w-[480px] lg:w-[640px] 2xl:w-[960px]"
131128
/>
132-
</picture>
129+
</span>
133130
</h1>
134131
<p className="mx-12 max-w-[540px] text-center text-xl text-gray-700 dark:text-gray-200 md:mx-0">
135132
A user‑obsessed, standards‑focused, multi‑strategy router you can
-135 Bytes
Loading

0 commit comments

Comments
 (0)