diff --git a/package.json b/package.json index 95db10770..d48731845 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "@babel/preset-react": "^7.12.1", "@babel/preset-typescript": "^7.12.1", "@babel/runtime": "^7.12.1", + "@fontsource-variable/ibm-plex-sans": "^5.2.8", "@testing-library/dom": "^8.14.0", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "12.1.5", diff --git a/resources/scripts/assets/css/GlobalStylesheet.ts b/resources/scripts/assets/css/GlobalStylesheet.ts index 7f520be45..f7c2fe78d 100644 --- a/resources/scripts/assets/css/GlobalStylesheet.ts +++ b/resources/scripts/assets/css/GlobalStylesheet.ts @@ -1,7 +1,18 @@ import tw from 'twin.macro'; import { createGlobalStyle } from 'styled-components/macro'; +// @ts-expect-error untyped font file +import font from '@fontsource-variable/ibm-plex-sans/files/ibm-plex-sans-latin-wght-normal.woff2'; export default createGlobalStyle` + @font-face { + font-family: 'IBM Plex Sans'; + font-style: normal; + font-display: swap; + font-weight: 100 700; + src: url(${font}) format('woff2-variations'); + 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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; + } + body { ${tw`font-sans bg-neutral-800 text-neutral-200`}; letter-spacing: 0.015em; diff --git a/resources/scripts/components/NavigationBar.tsx b/resources/scripts/components/NavigationBar.tsx index 89180b14b..6142f6268 100644 --- a/resources/scripts/components/NavigationBar.tsx +++ b/resources/scripts/components/NavigationBar.tsx @@ -53,7 +53,7 @@ export default () => { {name} diff --git a/resources/scripts/components/server/console/ChartBlock.tsx b/resources/scripts/components/server/console/ChartBlock.tsx index cc55b02ca..8f4dcd7bb 100644 --- a/resources/scripts/components/server/console/ChartBlock.tsx +++ b/resources/scripts/components/server/console/ChartBlock.tsx @@ -11,7 +11,9 @@ interface ChartBlockProps { export default ({ title, legend, children }: ChartBlockProps) => (
-

{title}

+

+ {title} +

{legend &&

{legend}

}
{children}
diff --git a/resources/scripts/components/server/console/ServerConsoleContainer.tsx b/resources/scripts/components/server/console/ServerConsoleContainer.tsx index c3af78f1c..de7ba3b3f 100644 --- a/resources/scripts/components/server/console/ServerConsoleContainer.tsx +++ b/resources/scripts/components/server/console/ServerConsoleContainer.tsx @@ -34,7 +34,9 @@ const ServerConsoleContainer = () => { )}
-

{name}

+

+ {name} +

{description}

diff --git a/resources/scripts/components/server/console/StatBlock.tsx b/resources/scripts/components/server/console/StatBlock.tsx index 7e4d04d20..259ff472d 100644 --- a/resources/scripts/components/server/console/StatBlock.tsx +++ b/resources/scripts/components/server/console/StatBlock.tsx @@ -32,7 +32,7 @@ export default ({ title, copyOnClick, icon, color, className, children }: StatBl />
-

{title}

+

{title}

@endif @show - @yield('assets') diff --git a/webpack.config.js b/webpack.config.js index c7fb4928d..ea1c911b0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -65,6 +65,10 @@ module.exports = { name: 'images/[name].[hash:8].[ext]', }, }, + { + test: /\.(woff|woff2)$/i, + type: 'asset/resource', + }, { test: /\.svg$/, loader: 'svg-url-loader', diff --git a/yarn.lock b/yarn.lock index 4b1dad7d1..609bd5832 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1636,6 +1636,11 @@ "@floating-ui/dom" "^0.5.3" use-isomorphic-layout-effect "^1.1.1" +"@fontsource-variable/ibm-plex-sans@^5.2.8": + version "5.2.8" + resolved "https://registry.yarnpkg.com/@fontsource-variable/ibm-plex-sans/-/ibm-plex-sans-5.2.8.tgz#8947cca46a35ca91266b88ebcbcac09ff264aabc" + integrity sha512-n5PF2iFa0CZT0QYTPzxvZ39opC9LnU0zdoRccoADbs+Dtsd+lbXOZF7RNuIPHcQX1dKjF63sxnRImQIB5eD0Ag== + "@fortawesome/fontawesome-common-types@^0.2.32": version "0.2.32" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.32.tgz#3436795d5684f22742989bfa08f46f50f516f259"