From 0fd4603431bda7bf6082bf0e55fe6f6a67daf5e0 Mon Sep 17 00:00:00 2001 From: Gaius Date: Thu, 31 Mar 2022 20:26:24 +0800 Subject: [PATCH] feat: change font and style (#63) Signed-off-by: Gaius --- docusaurus.config.js | 14 +++++++++----- src/css/custom.css | 6 ++++++ src/pages/index.js | 2 +- src/pages/index.module.css | 11 +++++++++-- static/font/DIN.ttf | Bin 0 -> 39556 bytes 5 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 static/font/DIN.ttf diff --git a/docusaurus.config.js b/docusaurus.config.js index 5eaf1e18..000b31e0 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -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 = { @@ -177,11 +176,16 @@ const config = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} Dragonfly Authors.`, + copyright: ` +
+ © Dragonfly Authors ${new Date().getFullYear()} | Documentation Distributed under CC-BY-4.0 +
+
+ © ${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 Trademark Usage page. + `, }, prism: { - theme: lightCodeTheme, - darkTheme: darkCodeTheme, + theme: codeTheme, }, }), }; diff --git a/src/css/custom.css b/src/css/custom.css index 4c46a393..6fff3e27 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -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; diff --git a/src/pages/index.js b/src/pages/index.js index 90728c24..3c6eb74b 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -33,7 +33,7 @@ export default function Home() { > Star -

{siteConfig.tagline}

+

{siteConfig.tagline}