Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
feat: override theme dark-mode class
Browse files Browse the repository at this point in the history
  • Loading branch information
tabathadelane committed May 6, 2022
1 parent eeae132 commit 7182892
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
exports.onClientEntry = () => {
if (localStorage && 'setItem' in localStorage) {
localStorage.setItem('darkMode', 'false');
}
const pageBodyClass = document.body.classList;
if (pageBodyClass.contains('dark-mode')) {
pageBodyClass.replace('dark-mode', 'light-mode');
Expand Down
2 changes: 2 additions & 0 deletions src/components/GlobalStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const GlobalStyles = styled.div`
--brand-primary-text-color: var(--brand-grey-black);
--brand-secondary-text-color: var(--brand-white);
background-color: var(--brand-white);
/* FONTS */
@font-face {
font-family: 'Söhne-Buch';
Expand Down
2 changes: 1 addition & 1 deletion src/components/LandingBanner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const LandingBanner = ({ quickstart, className, location }) => {
<div
css={css`
align-self: start;
background-color: white;
background-color: var(--brand-white);
border-radius: 0 0 7px 7px;
grid-area: logo;
justify-self: center;
Expand Down
3 changes: 2 additions & 1 deletion src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ const QuickstartsPage = ({ data, location }) => {
grid-template-rows: 1fr auto;
grid-gap: 20px;
min-height: calc(100vh - var(--global-header-height));
margin: var(--banner-height) auto;
margin: 0 auto;
padding: var(--banner-height) 0;
max-width: var(--site-max-width);
Expand Down

0 comments on commit 7182892

Please sign in to comment.