summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Sapka <michal@sapka.me>2022-09-06 23:15:20 +0200
committerMichal Sapka <michal@sapka.me>2022-09-06 23:15:20 +0200
commit13c5e9ce54f45a921de69cb06f4410c4e5f7006e (patch)
treef46fd18cf6a318e59d696fb5e0964895e605923a
parent596340f811d144fcef3237003ac84798614bc3b4 (diff)
feat: start theme all over again
-rw-r--r--lib/theme.tsx65
-rw-r--r--pages/index.tsx1
2 files changed, 6 insertions, 60 deletions
diff --git a/lib/theme.tsx b/lib/theme.tsx
index ad9e6dc..2309bff 100644
--- a/lib/theme.tsx
+++ b/lib/theme.tsx
@@ -1,66 +1,13 @@
-import { extendTheme } from "@chakra-ui/react"
+import { extendTheme ,type ThemeConfig } from "@chakra-ui/react"
import { mode } from '@chakra-ui/theme-tools'
+import type { StyleFunctionProps } from '@chakra-ui/styled-system'
-type propsType = any
-
-const styles = {
- global: (props : propsType) => {
- body: {
- bg: mode('#d5d6db', '#24283b')(props);
- color: mode('#0f4b6e', '#7dcfff')(props);
- }
- }
-}
-
-const components = {
- Link: {
- baseStyle: (props : propsType) => {
- color: mode('#34548a', '##34548a')(props);
- textUnderlineOffset: 3;
- }
- },
- Heading: {
- baseStyle: {
- },
- variants: {
- 'section-title': {
- fontSize: 20,
- marginBottom: 2,
- },
- 'main-title': {
- fontSize: 30.
- }
- }
- },
- Text: {
- baseStyle: {
- textAlign: 'justify',
- textIndent: '1em'
- },
- variants: {
- 'main-title': {
- fontSize: '1em',
- textIndent: 0
- }
- }
- }
-}
-
-const fonts = {
- body: `'Lato', sans-serif`,
-}
-
-const config = {
- initialColorMode: 'dark',
+const config: ThemeConfig = {
+ initialColorMode: 'light',
useSystemColorMode: false,
}
-const theme = extendTheme({
- config,
- styles,
- fonts,
- components
-})
-
+// 3. extend the theme
+const theme = extendTheme({ config })
export default theme
diff --git a/pages/index.tsx b/pages/index.tsx
index 1e82aa8..47a944f 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -12,7 +12,6 @@ import {
Stack,
Button,
} from '@chakra-ui/react'
-import Head from 'next/head'
import { AiFillGithub,AiFillMediumCircle} from "react-icons/ai";
import Publications from "../data/publications"
import { NextSeo } from 'next-seo'