Added remaining automatic light and dark mode

This commit is contained in:
Jarrod Norwell 2024-09-26 03:38:11 +08:00
parent 483952c1b4
commit 9b1f24fc18
2 changed files with 26 additions and 19 deletions

View File

@ -122,8 +122,10 @@ export default function NewHome() {
); );
}); });
const date = new Date();
return ( return (
<MantineProvider theme={theme}> <MantineProvider theme={theme} forceColorScheme={date.getHours() >= 7 && date.getHours() <= 19 ? "light" : "dark"}>
<Flex align={'center'} justify={'center'} h={'100vh'} px={'md'} w={'100vw'}> <Flex align={'center'} justify={'center'} h={'100vh'} px={'md'} w={'100vw'}>
<Stack> <Stack>
<Anchor href='https://twitter.com/antique_codes' ta={'center'} target='_blank'> <Anchor href='https://twitter.com/antique_codes' ta={'center'} target='_blank'>

View File

@ -1,8 +1,12 @@
import { Container, Space, Text, Title } from "@mantine/core"; import { Container, MantineProvider, Space, Text, Title } from "@mantine/core";
import classes from './PrivacyPolicyMarkdown.module.css'; import classes from './PrivacyPolicyMarkdown.module.css';
import { theme } from "../../theme";
export function PrivacyPolicyMarkdown() { export function PrivacyPolicyMarkdown() {
const date = new Date();
return ( return (
<MantineProvider theme={theme} forceColorScheme={date.getHours() >= 7 && date.getHours() <= 19 ? "light" : "dark"}>
<Container className={classes.wrapper}> <Container className={classes.wrapper}>
<Title order={1}> <Title order={1}>
Privacy Policy Privacy Policy
@ -20,5 +24,6 @@ export function PrivacyPolicyMarkdown() {
© 2024 Jarrod Norwell. All Right Reserved. © 2024 Jarrod Norwell. All Right Reserved.
</Text> </Text>
</Container> </Container>
</MantineProvider>
) )
} }