Skip to content

Commit

Permalink
changingTheme - Dark Mode support (#11)
Browse files Browse the repository at this point in the history
* changingTheme

* cleanup
  • Loading branch information
airinterface authored Jun 12, 2024
1 parent b73c04f commit a0c7686
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const config: Config = {
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
href: 'https://github.com/MicroEdgeCerts',
},
],
},
Expand Down
1 change: 1 addition & 0 deletions src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
height: 150px;
margin: 25px;
}

6 changes: 4 additions & 2 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary: #7cc2e7;
--ifm-heading-color: #7cc2e7;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
Expand All @@ -19,7 +20,8 @@

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary: #81c4ff;
--ifm-heading-color: #88ceff;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
Expand Down
3 changes: 3 additions & 0 deletions src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
background-size: cover;
background-position: center center;
}
.subtitle {
color: var(--ifm-heading-color);
}

@media screen and (max-width: 996px) {
.heroBanner {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function HomepageHeader() {
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">
<p className={`${styles.subtitle} hero__subtitle`}>
<Translate id="home.subtitle" description="the hero subtitle">
This header will be translated
</Translate>
Expand All @@ -29,8 +29,8 @@ export default function Home(): JSX.Element {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
title={`${siteConfig.title}`}
description="Open Badge for Learners.">
<HomepageHeader />
<main>
<HomepageFeatures />
Expand Down

0 comments on commit a0c7686

Please sign in to comment.