Skip to content

Commit 1a749b5

Browse files
committed
Simplify CSS serving
1 parent b2ffe8e commit 1a749b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+7
-2852
lines changed

src/components/Layout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export function Layout(
2929
{ bot, host, title, activityLink, children }: LayoutProps,
3030
) {
3131
const handle = `@${bot.username}@${host}`;
32+
const cssFilename = bot.pages.color === "azure"
33+
? `pico.min.css`
34+
: `pico.${bot.pages.color}.min.css`;
3235
return (
3336
<html>
3437
<head>
@@ -46,7 +49,10 @@ export function Layout(
4649
href={activityLink.toString()}
4750
/>
4851
)}
49-
<link rel="stylesheet" href={`/css/pico.${bot.pages.color}.min.css`} />
52+
<link
53+
rel="stylesheet"
54+
href={`https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/${cssFilename}`}
55+
/>
5056
<style>{bot.pages.css}</style>
5157
</head>
5258
<body>

src/css/pico.amber.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.azure.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.blue.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.cyan.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.fuchsia.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.green.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.grey.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.indigo.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/css/pico.jade.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)