Skip to content

Commit

Permalink
fix(website): store fonts locally (#88)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Schultz <pschultz@pobox.com>
  • Loading branch information
schultzp2020 committed Jun 12, 2023
1 parent c9c4caf commit f190c98
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const config = {
editUrl: 'https://github.com/janus-idp/janus-idp.io/tree/main/apps/website/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: require.resolve('./src/css/tailwind.css'),
},
}),
],
Expand Down
5 changes: 0 additions & 5 deletions apps/website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
* work well for content-centric websites.
*/

@tailwind base;
@tailwind components;
@tailwind utilities;
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #009596;
Expand Down
31 changes: 31 additions & 0 deletions apps/website/src/css/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* devanagari */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/poppins-devanagari.woff2') format('woff2');
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839,
U+A8E0-A8FF;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/poppins-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/poppins-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
U+FFFD;
}
5 changes: 5 additions & 0 deletions apps/website/src/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import 'tailwindcss/base';
@import './fonts.css';
@import './custom.css';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
Binary file not shown.
Binary file added apps/website/static/fonts/poppins-latin-ext.woff2
Binary file not shown.
Binary file added apps/website/static/fonts/poppins-latin.woff2
Binary file not shown.

0 comments on commit f190c98

Please sign in to comment.