Skip to content

Commit

Permalink
add logo
Browse files Browse the repository at this point in the history
  • Loading branch information
willpinha committed Oct 16, 2024
1 parent 7318137 commit 18ef81e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
23 changes: 19 additions & 4 deletions app/components/loading/WelcomeLoading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, Title } from "@mantine/core";
import { Center, Flex, Image, Stack, Title } from "@mantine/core";
import { useTimeout } from "@mantine/hooks";
import { AnimatePresence, motion } from "framer-motion";
import { useEffect, useState } from "react";
Expand All @@ -24,9 +24,24 @@ function Base() {
color: "white",
}}
>
<Title>
<TextTyping text="Mantine Themes." />
</Title>
<Stack>
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.5 }}
>
<Center>
<Image
src="/logo-light.svg"
alt="Mantine Themes"
w={100}
/>
</Center>
</motion.div>
<Title>
<TextTyping text="Mantine Themes." />
</Title>
</Stack>
</Flex>
</motion.div>
);
Expand Down
9 changes: 6 additions & 3 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const links: LinksFunction = () => [
},
{
rel: "icon",
href: "/logo.svg",
href: "/logo-dark.svg",
},
];

Expand All @@ -33,12 +33,15 @@ export function Layout({ children }: { children: React.ReactNode }) {
name="viewport"
content="width=device-width, initial-scale=1"
/>
<ColorSchemeScript />
<ColorSchemeScript defaultColorScheme="dark" />
<Meta />
<Links />
</head>
<body>
<MantineProvider theme={themes[currentThemeName].mantineTheme}>
<MantineProvider
theme={themes[currentThemeName].mantineTheme}
defaultColorScheme="dark"
>
<WelcomeLoading />
{children}
</MantineProvider>
Expand Down
2 changes: 1 addition & 1 deletion app/themes/christimas.ts → app/themes/christmas.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createMantineTheme } from "~/lib/create-mantine-theme";
import { Theme } from "~/lib/theme";

export const christimas: Theme = {
export const christmas: Theme = {
label: "🎄 Christmas",
mantineTheme: createMantineTheme({
baseHue: 140,
Expand Down
4 changes: 2 additions & 2 deletions app/themes/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ThemeName } from "~/lib/theme";
import { christimas } from "./christimas";
import { christmas } from "./christmas";
import { dracula } from "./dracula";
import { forest } from "./forest";

export const themes = { christimas, dracula, forest };
export const themes = { christmas, dracula, forest };

export const sortedThemeNames = Object.keys(themes)
.map((key) => key as ThemeName)
Expand Down
1 change: 1 addition & 0 deletions public/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 18ef81e

Please sign in to comment.