mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
fix: website fonts
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
import '../styles/main.css';
|
||||||
import '@code-hike/mdx/styles.css';
|
import '@code-hike/mdx/styles.css';
|
||||||
import '../styles/ch.css';
|
import '../styles/ch.css';
|
||||||
import type { MarkdownLayoutProps } from 'astro';
|
import type { MarkdownLayoutProps } from 'astro';
|
||||||
|
|||||||
16
packages/guide/src/styles/main.css
Normal file
16
packages/guide/src/styles/main.css
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@import url('https://rsms.me/inter/inter.css');
|
||||||
|
|
||||||
|
:root {
|
||||||
|
font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
|
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||||
|
'Noto Color Emoji';
|
||||||
|
font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (font-variation-settings: normal) {
|
||||||
|
:root {
|
||||||
|
font-family: 'Inter var', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
|
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||||
|
'Noto Color Emoji';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,10 @@ import type { PropsWithChildren } from 'react';
|
|||||||
|
|
||||||
export function DiscordMessages({ rounded, children }: PropsWithChildren<{ rounded?: boolean }>) {
|
export function DiscordMessages({ rounded, children }: PropsWithChildren<{ rounded?: boolean }>) {
|
||||||
return (
|
return (
|
||||||
<div className={`pt-0.1 bg-[rgb(54_57_63)] pb-4 ${rounded ? 'rounded' : ''}`} id="messages-wrapper">
|
<div
|
||||||
|
className={`font-source-sans-pro pt-0.1 bg-[rgb(54_57_63)] pb-4 ${rounded ? 'rounded' : ''}`}
|
||||||
|
id="messages-wrapper"
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,7 +22,23 @@ export default defineConfig({
|
|||||||
presetWebFonts({
|
presetWebFonts({
|
||||||
provider: 'bunny',
|
provider: 'bunny',
|
||||||
fonts: {
|
fonts: {
|
||||||
mono: ['JetBrains Mono', 'JetBrains Mono:400,600,700'],
|
mono: ['JetBrains Mono:400,600,700'],
|
||||||
|
'source-sans-pro': [
|
||||||
|
'Source Sans Pro:300,400,500,600',
|
||||||
|
{ name: 'ui-sans-serif', provider: 'none' },
|
||||||
|
{ name: 'system-ui', provider: 'none' },
|
||||||
|
{ name: '-apple-system', provider: 'none' },
|
||||||
|
{ name: 'BlinkMacSystemFont', provider: 'none' },
|
||||||
|
{ name: 'Segoe UI', provider: 'none' },
|
||||||
|
{ name: 'Roboto', provider: 'none' },
|
||||||
|
{ name: 'Helvetica Neue', provider: 'none' },
|
||||||
|
{ name: 'Arial', provider: 'none' },
|
||||||
|
{ name: 'sans-serif', provider: 'none' },
|
||||||
|
{ name: 'Apple Color Emoji', provider: 'none' },
|
||||||
|
{ name: 'Segoe UI Emoji', provider: 'none' },
|
||||||
|
{ name: 'Segoe UI Symbol', provider: 'none' },
|
||||||
|
{ name: 'Noto Color Emoji', provider: 'none' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
presetTypography({
|
presetTypography({
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"dev": "yarn run --top-level docs && concurrently 'yarn dev:css' 'yarn dev:next'",
|
"dev": "yarn run --top-level docs && concurrently 'yarn dev:css' 'yarn dev:next'",
|
||||||
"dev:next": "next dev",
|
"dev:next": "next dev",
|
||||||
"dev:css": "yarn generate:css --watch",
|
"dev:css": "yarn generate:css --watch",
|
||||||
"generate:css": "unocss 'src/**/*.tsx' '../ui/src/**/*.tsx' --out-file ./src/styles/unocss.css --config ../ui/unocss.config.ts",
|
"generate:css": "unocss 'src/**/*.tsx' '../ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../ui/unocss.config.ts",
|
||||||
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx",
|
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx",
|
||||||
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix"
|
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
@import url('https://rsms.me/inter/inter.css');
|
@import url('https://rsms.me/inter/inter.css');
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue;
|
font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
|
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||||
|
'Noto Color Emoji';
|
||||||
font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
|
font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
|
||||||
}
|
}
|
||||||
|
|
||||||
@supports (font-variation-settings: normal) {
|
@supports (font-variation-settings: normal) {
|
||||||
:root {
|
:root {
|
||||||
font-family: 'Inter var', Arial, Noto Sans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', Segoe UI Symbol,
|
font-family: 'Inter var', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
|
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||||
'Noto Color Emoji';
|
'Noto Color Emoji';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user