From b563646c8f134ed8e1b845e3d8c6f2c29b682010 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Sun, 24 Apr 2022 22:33:26 +0200 Subject: [PATCH] www: use green as accent color on docs page (#163) --- www/client_deps.ts | 12 ++++++++- www/components/DocsSidebar.tsx | 2 +- www/components/NavigationBar.tsx | 2 +- www/routes/_render.ts | 4 +-- www/routes/docs/[...slug].tsx | 46 +++++++++++++++++--------------- 5 files changed, 39 insertions(+), 27 deletions(-) diff --git a/www/client_deps.ts b/www/client_deps.ts index dab8219e..c89eaa05 100644 --- a/www/client_deps.ts +++ b/www/client_deps.ts @@ -1,7 +1,17 @@ export * from "../runtime.ts"; import { IS_BROWSER } from "../runtime.ts"; import { apply, setup, tw } from "https://esm.sh/twind@0.16.16"; +import * as colors from "https://esm.sh/twind@0.16.16/colors"; export { apply, setup, tw }; +export const theme = { + colors: { + black: colors.black, + gray: colors.gray, + green: colors.green, + white: colors.white, + yellow: colors.yellow, + }, +}; if (IS_BROWSER) { - setup({}); + setup({ theme: { colors } }); } diff --git a/www/components/DocsSidebar.tsx b/www/components/DocsSidebar.tsx index d7e881a6..fc5e1432 100644 --- a/www/components/DocsSidebar.tsx +++ b/www/components/DocsSidebar.tsx @@ -18,7 +18,7 @@ export default function DocsSidebar(props: { path: string }) { } const link = apply`text(gray-900 hover:gray-600)`; -const linkActive = apply`text(blue-600 hover:blue-500)`; +const linkActive = apply`text(green-600 hover:green-500)`; export function SidebarCategory(props: { path: string; diff --git a/www/components/NavigationBar.tsx b/www/components/NavigationBar.tsx index af734015..32c5f37f 100644 --- a/www/components/NavigationBar.tsx +++ b/www/components/NavigationBar.tsx @@ -15,7 +15,7 @@ export default function NavigationBar(props: { active: string }) { ]; return ( -