From 33a93508e130a9daf1f974fbc1ae9f480182c43e Mon Sep 17 00:00:00 2001 From: Azhar Hussain Date: Tue, 25 Oct 2022 18:59:38 +0500 Subject: [PATCH 1/3] feat: UI Enhancement #10 --- Components/CategoryPage.js | 2 +- Components/Contribution.js | 44 ++++++++++++++++++-------------- Components/Footer.js | 5 ++-- Components/HomePage.js | 52 ++++++++++++++++++++++++-------------- Components/IdeaPage.js | 2 +- Components/Navbar.js | 26 ++++++++++++------- pages/_app.js | 8 +++--- pages/contribution.js | 2 +- theme.js | 40 +++++++++++++++++------------ 9 files changed, 108 insertions(+), 73 deletions(-) diff --git a/Components/CategoryPage.js b/Components/CategoryPage.js index bb9aa9f..de7f329 100644 --- a/Components/CategoryPage.js +++ b/Components/CategoryPage.js @@ -41,7 +41,7 @@ export default function CategoryPage({ ideas: inIdeas }) { } return ( - + + + Light + + + + Dark + ) diff --git a/pages/_app.js b/pages/_app.js index bc9e506..26c6e09 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -1,7 +1,7 @@ -import "@fontsource/league-spartan" -import { ChakraProvider } from "@chakra-ui/react" -import "../styles/globals.css" -import theme from "../theme" +import { ChakraProvider } from "@chakra-ui/react"; +import "@fontsource/plus-jakarta-sans"; +import "../styles/globals.css"; +import theme from "../theme"; function MyApp({ Component, pageProps }) { return ( diff --git a/pages/contribution.js b/pages/contribution.js index 7490b7a..06ddaaf 100644 --- a/pages/contribution.js +++ b/pages/contribution.js @@ -5,7 +5,7 @@ import Navbar from "../Components/Navbar" export default function contribution() { return ( - + diff --git a/theme.js b/theme.js index c431592..f795451 100644 --- a/theme.js +++ b/theme.js @@ -1,21 +1,29 @@ import { extendTheme } from "@chakra-ui/react" - +import { mode } from '@chakra-ui/theme-tools'; const overrides = { fonts: { - heading: `'League Spartan', sans-serif`, - body: `sans-serif`, - }, - fontWeights: { - hairline: 100, - thin: 200, - light: 300, - normal: 400, - medium: 500, - semibold: 600, - bold: 700, - extrabold: 800, - black: 900, - }, + heading: `'Plus Jakarta Sans', sans-serif`, + body: `'Plus Jakarta Sans', sans-serif`, + } +} + +const light ={ + textColor: '#1A202C', + bodyBg: '#FFF9F7', +} + +const dark ={ + textColor: '#FFFFFF', + bodyBg: '#1A202C', +} + +const customStyles = { + global: + (props)=>({ + body: { + bg: mode(light.bodyBg, dark.bodyBg)(props) + } + }) } const config = { @@ -23,6 +31,6 @@ const config = { useSystemColorMode: false, } -const theme = extendTheme({ overrides, config }) +const theme = extendTheme({ fonts: overrides.fonts, config, styles: customStyles }) export default theme From d8ebf20e03dad57cff756d5710b60549118dfe55 Mon Sep 17 00:00:00 2001 From: Azhar Hussain Date: Fri, 4 Nov 2022 11:46:16 +0500 Subject: [PATCH 2/3] trigger build --- Components/CategoryPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Components/CategoryPage.js b/Components/CategoryPage.js index de7f329..5acc38a 100644 --- a/Components/CategoryPage.js +++ b/Components/CategoryPage.js @@ -41,7 +41,7 @@ export default function CategoryPage({ ideas: inIdeas }) { } return ( - +