Skip to content

Commit

Permalink
feat: change font and style (#63)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Mar 31, 2022
1 parent 5058293 commit 0fd4603
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
14 changes: 9 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const codeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -177,11 +176,16 @@ const config = {
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Dragonfly Authors.`,
copyright: `
<br />
<strong>© Dragonfly Authors ${new Date().getFullYear()} | Documentation Distributed under <a href="https://creativecommons.org/licenses/by/4.0">CC-BY-4.0</a> </strong>
<br />
<br />
© ${new Date().getFullYear()} The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage/"> Trademark Usage</a> page.
`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: codeTheme,
},
}),
};
Expand Down
6 changes: 6 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
* work well for content-centric websites.
*/

@font-face {
font-family: 'Din';
src: url('/static/font/DIN.ttf');
}

/* You can override the default Infima variables here. */
:root {
--ifm-font-family-base: 'Din';
--ifm-color-primary: #239b56;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Home() {
>
Star
</GitHubButton>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<p className={styles.tagline}>{siteConfig.tagline}</p>
</div>
<div className={styles.buttonWrapper}>
<Button href={useBaseUrl('docs/')}>
Expand Down
11 changes: 9 additions & 2 deletions src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.heroBanner {
display: flex;
flex-flow: column;
padding: 4rem 0;
padding: 3.5rem 0;
text-align: center;
position: relative;
overflow: hidden;
Expand All @@ -37,6 +37,14 @@ html[data-theme='dark'] .heroBanner {
}
}

.tagline {
margin-top: 1rem;
position: relative;
left: 50%;
transform: translateX(-50%);
font-size: 1.5rem;
}

.heroLogoWrapper {
position: relative;
left: 50%;
Expand Down Expand Up @@ -65,7 +73,6 @@ html[data-theme='dark'] .heroBanner {
.buttonWrapper {
display: flex;
flex-flow: row;
margin-top: 1.5rem;
}

.badgeWrapper {
Expand Down
Binary file added static/font/DIN.ttf
Binary file not shown.

0 comments on commit 0fd4603

Please sign in to comment.