diff --git a/src/components/Applications/AppItem.tsx b/src/components/Applications/AppItem.tsx index d6d0915..2eacf10 100644 --- a/src/components/Applications/AppItem.tsx +++ b/src/components/Applications/AppItem.tsx @@ -26,11 +26,12 @@ export function AppItem({ const { ref, width, height } = useElementSize(); const allIcons: any = { ...fa6, ...vsc, ...si }; const Icon = allIcons[icon]; - const { isMobile } = useCommonHooks(); + const { isMobile, theme } = useCommonHooks(); const [textDecoration, setTextDecoration] = useState('none'); const [hover, setHover] = useState(false); const validUrl = url.startsWith('http://') || url.startsWith('https://') ? url : `http://${url}`; + return ( diff --git a/src/components/HelpModal/HelpSection.tsx b/src/components/HelpModal/HelpSection.tsx index aab6f2f..2e04a03 100644 --- a/src/components/HelpModal/HelpSection.tsx +++ b/src/components/HelpModal/HelpSection.tsx @@ -1,12 +1,20 @@ import { Group, Text } from '@mantine/core'; +import { useCommonHooks } from 'hooks'; import { textClasses } from 'styles'; import type { SearchShortcut } from 'types'; import HintItem from './HintItem'; function HelpSection({ name, items }: { name: string; items: SearchShortcut[] }) { + const { theme } = useCommonHooks(); return ( - + {name} - + Current Weather @@ -148,6 +155,9 @@ export default function CurrentWeather({ current }: { current: CW }) { classNames={textClasses} style={{ textAlign: 'center', + textShadow: + theme.textShadowsEnabled && + '1px 1px 1px color-mix(in srgb, var(--mantine-color-accent-0), transparent 50%)', }} w={'100%'} > @@ -190,6 +200,9 @@ export default function CurrentWeather({ current }: { current: CW }) { classNames={textClasses} style={{ textAlign: 'center', + textShadow: + theme.textShadowsEnabled && + '1px 1px 1px color-mix(in srgb, var(--mantine-color-accent-0), transparent 50%)', }} w={'100%'} > @@ -234,6 +247,9 @@ export default function CurrentWeather({ current }: { current: CW }) { classNames={textClasses} style={{ textAlign: 'center', + textShadow: + theme.textShadowsEnabled && + '1px 1px 1px color-mix(in srgb, var(--mantine-color-accent-0), transparent 50%)', }} w={'100%'} > diff --git a/src/components/WeatherModal/ExtendedForecastCard.tsx b/src/components/WeatherModal/ExtendedForecastCard.tsx index bc0fa25..a345d18 100644 --- a/src/components/WeatherModal/ExtendedForecastCard.tsx +++ b/src/components/WeatherModal/ExtendedForecastCard.tsx @@ -9,7 +9,7 @@ export default function ExtendedForecastCard({ }: { forecast: ExtendedForecast[]; }) { - const { isMobile } = useCommonHooks(); + const { isMobile, theme } = useCommonHooks(); const day = forecast.slice(2, 14).filter((item: ExtendedForecast) => item.isDaytime); const night = forecast.slice(2, 14).filter((item: ExtendedForecast) => !item.isDaytime); return ( @@ -25,7 +25,13 @@ export default function ExtendedForecastCard({ overflow: 'visible', }} > - + Extended Forecast diff --git a/src/pages/homepage/components/Applications/Applications.tsx b/src/pages/homepage/components/Applications/Applications.tsx index 13fa092..fc5e967 100644 --- a/src/pages/homepage/components/Applications/Applications.tsx +++ b/src/pages/homepage/components/Applications/Applications.tsx @@ -9,7 +9,7 @@ function Applications({ contentType }: { contentType: string[] }) { const { data: applicationData, isFetching: isApplicationDataFetching } = useQueryAPI({ endpoint: 'api/enabledApplications', }); - const { appSort, appDensity, appScale } = useCommonHooks(); + const { appSort, appDensity, appScale, theme } = useCommonHooks(); const [applications, setApplications] = useState([]); useEffect(() => { @@ -42,7 +42,15 @@ function Applications({ contentType }: { contentType: string[] }) { <> {applications.length > 0 && contentType.length > 0 && ( - + Applications ([]); const [groups, setGroups] = useState([]); @@ -64,6 +64,11 @@ function Bookmarks({ contentType }: { contentType: string[] }) { classNames={textClasses} mb={'-.5rem'} mt={'1.25rem'} + style={{ + textShadow: + theme.textShadowsEnabled && + '1px 1px 1px color-mix(in srgb, var(--mantine-color-accent-0), transparent 50%)', + }} > Bookmarks diff --git a/src/pages/homepage/components/Header/Header.tsx b/src/pages/homepage/components/Header/Header.tsx index 646e257..ff21c48 100644 --- a/src/pages/homepage/components/Header/Header.tsx +++ b/src/pages/homepage/components/Header/Header.tsx @@ -22,7 +22,7 @@ function Header({ openWeatherModal: () => void; }) { const [time, setTime] = useState(new Date()); - const { isMobile, currentUser, fixDigits } = useCommonHooks(); + const { isMobile, currentUser, fixDigits, theme } = useCommonHooks(); useEffect(() => { setInterval(() => { @@ -80,6 +80,11 @@ function Header({ className={textClasses.greeting} classNames={textClasses} fz={isMobile ? 24 : undefined} + style={{ + textShadow: + theme.textShadowsEnabled && + '3px 3px 1px color-mix(in srgb, var(--mantine-color-primary-0), transparent 50%)', + }} > {greet ?.replace('$firstName', currentUser.firstName) @@ -97,7 +102,12 @@ function Header({ {date} @@ -119,7 +129,16 @@ function Header({ }} onClick={openWeatherModal} > - + {current.temperature}°F {current.highTemp}°F/{current.lowTemp}°F - + {`${ time.getHours() === 0 ? 12 diff --git a/src/pages/homepage/components/Header/LargeHeader.tsx b/src/pages/homepage/components/Header/LargeHeader.tsx index 50095f6..cd84b11 100644 --- a/src/pages/homepage/components/Header/LargeHeader.tsx +++ b/src/pages/homepage/components/Header/LargeHeader.tsx @@ -18,7 +18,7 @@ function LargeHeader({ setCurrent: (current: CW) => void; }) { const [time, setTime] = useState(new Date()); - const { isMobile, currentUser, fixDigits } = useCommonHooks(); + const { isMobile, currentUser, fixDigits, theme } = useCommonHooks(); useEffect(() => { setInterval(() => { @@ -71,6 +71,11 @@ function LargeHeader({ className={textClasses.greeting} classNames={textClasses} fz={isMobile ? '2rem' : '6rem'} + style={{ + textShadow: + theme.textShadowsEnabled && + '3px 3px 1px color-mix(in srgb, var(--mantine-color-primary-0), transparent 50%)', + }} > {greet ?.replace('$firstName', currentUser.firstName) @@ -83,11 +88,26 @@ function LargeHeader({ className={textClasses.dateTime} classNames={textClasses} m={0} - style={{ width: 'max-content' }} + style={{ + width: 'max-content', + textShadow: + theme.textShadowsEnabled && + '1px 1px 1px color-mix(in srgb, var(--mantine-color-accent-0), transparent 50%)', + }} > {date} - + {`${ time.getHours() === 0 ? 12 diff --git a/src/pages/homepage/components/SettingsButton/SettingsCard.tsx b/src/pages/homepage/components/SettingsButton/SettingsCard.tsx index ad6e827..4081685 100644 --- a/src/pages/homepage/components/SettingsButton/SettingsCard.tsx +++ b/src/pages/homepage/components/SettingsButton/SettingsCard.tsx @@ -7,6 +7,7 @@ import { Stack, Text, } from '@mantine/core'; +import { useCommonHooks } from 'hooks'; import { multiSelectClasses, selectClasses, sliderClasses, stackClasses } from 'styles'; function SettingsCard({ @@ -32,6 +33,7 @@ function SettingsCard({ scale: any; setScale: any; }) { + const { theme } = useCommonHooks(); return (