From 5dbaddc513e69e9fe2fffa9591567c28713bf3dd Mon Sep 17 00:00:00 2001 From: Darius Cepulis Date: Tue, 28 Oct 2025 13:33:25 -0500 Subject: [PATCH] feat(site): raise prominence of home page demo toggles Also: sneakily remove dark mode favicon. I didn't like it. --- website/public/favicon-dark.ico | Bin 4286 -> 0 bytes website/public/favicon-dark.svg | 7 -- website/src/components/ThemeInit.astro | 8 --- website/src/components/ThemeToggle.tsx | 52 +++----------- website/src/components/ToggleGroup.tsx | 63 +++++++++-------- .../src/components/home/HomePageControls.tsx | 66 ++++++++---------- website/src/pages/index.astro | 2 +- 7 files changed, 74 insertions(+), 124 deletions(-) delete mode 100644 website/public/favicon-dark.ico delete mode 100644 website/public/favicon-dark.svg diff --git a/website/public/favicon-dark.ico b/website/public/favicon-dark.ico deleted file mode 100644 index 342b70ce47e403f329313161567f54ef1a5f4d85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmZQzU<5)11qKkwutI==L5zWcK?8_^LJST-3=#(epqwx_1VaQE7z(Xd{2#@mVKABo zaHoNM>!tr4^+Wz=So z*##o>5o0znYEbQmxWnMTf#D>e8=lj_9oX!LgoU<_|9=zHBQ$mcZu=o&q4Qtgp!vU< z`6C*+gOL4@u+Y+W`EP8pg9dIO&VE?>)YC5khQ%E!x`QGs3ILRT*Zm{+gjbc0gTr~d?T!dsO54>Ow>TFol$zjDkS!gkskL-@m~+L z_akL?gWN@;{c84Q|CQpNP;M_QOo+5!-O%;FO7LFl*-NbbS~~w#o!fxn^osg+69|8G zlYsxq;iqY1FFyZk8~j)GnEGES@jY$r#^Qf9i@5*FQP-$quh_;v{|Vx?-@y4_-N^jE uZ0+j*VjF%F)uM}4BUt-A%`r1pZ`$pA`#>)^*1F&&`fuaGs!&7$v diff --git a/website/public/favicon-dark.svg b/website/public/favicon-dark.svg deleted file mode 100644 index b6764fc3..00000000 --- a/website/public/favicon-dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/website/src/components/ThemeInit.astro b/website/src/components/ThemeInit.astro index 61a6571c..4640865d 100644 --- a/website/src/components/ThemeInit.astro +++ b/website/src/components/ThemeInit.astro @@ -29,13 +29,5 @@ import { THEME_KEY } from '@/consts'; if (themeColorMeta) { themeColorMeta.setAttribute('content', isDark ? '#393836' : '#ebe4c1'); } - const svgFavicon = document.querySelector('link[rel="icon"][type="image/svg+xml"]'); - const icoFavicon = document.querySelector('link[rel="icon"][sizes="32x32"]'); - if (svgFavicon) { - svgFavicon.setAttribute('href', isDark ? '/favicon-dark.svg' : '/favicon.svg'); - } - if (icoFavicon) { - icoFavicon.setAttribute('href', isDark ? '/favicon-dark.ico' : '/favicon.ico'); - } } diff --git a/website/src/components/ThemeToggle.tsx b/website/src/components/ThemeToggle.tsx index 89aa11a6..d5633594 100644 --- a/website/src/components/ThemeToggle.tsx +++ b/website/src/components/ThemeToggle.tsx @@ -1,18 +1,17 @@ -import { Toggle } from '@base-ui-components/react/toggle'; -import { ToggleGroup } from '@base-ui-components/react/toggle-group'; import clsx from 'clsx'; import { Monitor, Moon, Sun } from 'lucide-react'; -import { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { THEME_KEY } from '@/consts'; +import ToggleGroup from './ToggleGroup'; type Preference = 'system' | 'light' | 'dark'; type Theme = 'light' | 'dark'; const themeOptions = [ - { value: 'system' as const, label: 'System', icon: Monitor }, - { value: 'light' as const, label: 'Light', icon: Sun }, - { value: 'dark' as const, label: 'Dark', icon: Moon }, + { value: 'system' as const, label: