mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 02:37:59 +02:00
docs(website): bump announcement bar + include Twitter link + refactor site colors (#5351)
* bump announcement bar + include Twitter link * customize announcementBar css background + refactor infima colors
This commit is contained in:
parent
c76dfb8a2c
commit
174fd2d248
2 changed files with 46 additions and 10 deletions
|
@ -47,6 +47,9 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
|
|||
|
||||
const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
|
||||
|
||||
const TwitterSvg =
|
||||
'<svg style="fill: #1DA1F2; vertical-align: middle;" width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>';
|
||||
|
||||
/** @type {import('@docusaurus/types').DocusaurusConfig} */
|
||||
(module.exports = {
|
||||
title: 'Docusaurus',
|
||||
|
@ -294,9 +297,8 @@ const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
|
|||
respectPrefersColorScheme: true,
|
||||
},
|
||||
announcementBar: {
|
||||
id: 'announcementBar-1', // Increment on change
|
||||
content:
|
||||
'⭐️ If you like Docusaurus, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/facebook/docusaurus">GitHub</a>! ⭐',
|
||||
id: 'announcementBar-2', // Increment on change
|
||||
content: `⭐️ If you like Docusaurus, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/facebook/docusaurus">GitHub</a> and follow us on <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/docusaurus" >Twitter</a> ${TwitterSvg}`,
|
||||
},
|
||||
prism: {
|
||||
theme: require('prism-react-renderer/themes/github'),
|
||||
|
|
|
@ -6,13 +6,28 @@
|
|||
*/
|
||||
|
||||
:root {
|
||||
--ifm-color-primary: #25c2a0;
|
||||
--ifm-color-primary-dark: rgb(33, 175, 144);
|
||||
--ifm-color-primary-darker: rgb(31, 165, 136);
|
||||
--ifm-color-primary-darkest: rgb(26, 136, 112);
|
||||
--ifm-color-primary-light: rgb(70, 203, 174);
|
||||
--ifm-color-primary-lighter: rgb(102, 212, 189);
|
||||
--ifm-color-primary-lightest: rgb(146, 224, 208);
|
||||
/*
|
||||
See css var + hsl color palette technique:
|
||||
https://blog.maximeheckel.com/posts/the-power-of-composition-with-css-variables/
|
||||
*/
|
||||
--site-primary-hue-saturation: 167, 68%;
|
||||
--site-primary-hue-saturation-light: 167, 56%; /* do we really need this extra one? */
|
||||
|
||||
--ifm-color-primary: hsl(var(--site-primary-hue-saturation), 45%);
|
||||
--ifm-color-primary-dark: hsl(var(--site-primary-hue-saturation), 41%);
|
||||
--ifm-color-primary-darker: hsl(var(--site-primary-hue-saturation), 38%);
|
||||
--ifm-color-primary-darkest: hsl(var(--site-primary-hue-saturation), 32%);
|
||||
|
||||
--ifm-color-primary-light: hsl(var(--site-primary-hue-saturation-light), 54%);
|
||||
--ifm-color-primary-lighter: hsl(
|
||||
var(--site-primary-hue-saturation-light),
|
||||
62%
|
||||
);
|
||||
--ifm-color-primary-lightest: hsl(
|
||||
var(--site-primary-hue-saturation-light),
|
||||
73%
|
||||
);
|
||||
|
||||
--ifm-color-feedback-background: #fff;
|
||||
}
|
||||
|
||||
|
@ -113,3 +128,22 @@ html[data-theme='dark'] .DocSearch {
|
|||
var(--ifm-color-emphasis-100) 100%
|
||||
);
|
||||
}
|
||||
|
||||
div[class^='announcementBar_'] {
|
||||
--site-announcement-bar-stripe-color1: hsl(
|
||||
var(--site-primary-hue-saturation),
|
||||
85%
|
||||
);
|
||||
--site-announcement-bar-stripe-color2: hsl(
|
||||
var(--site-primary-hue-saturation),
|
||||
95%
|
||||
);
|
||||
background: repeating-linear-gradient(
|
||||
35deg,
|
||||
var(--site-announcement-bar-stripe-color1),
|
||||
var(--site-announcement-bar-stripe-color1) 20px,
|
||||
var(--site-announcement-bar-stripe-color2) 10px,
|
||||
var(--site-announcement-bar-stripe-color2) 40px
|
||||
);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue