refactor(font): use local woff2
This commit is contained in:
parent
42951e4d01
commit
3b1fcf5663
9 changed files with 21 additions and 24 deletions
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -15,8 +15,6 @@
|
|||
"@astrojs/rss": "^4.0.7",
|
||||
"@astrojs/sitemap": "^3.1.6",
|
||||
"@astrojs/tailwind": "^5.1.0",
|
||||
"@fontsource/geist-mono": "^5.0.3",
|
||||
"@fontsource/geist-sans": "^5.0.3",
|
||||
"@hbsnow/rehype-sectionize": "^1.0.7",
|
||||
"@radix-ui/react-avatar": "^1.1.0",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
||||
|
@ -1171,18 +1169,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.7.tgz",
|
||||
"integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA=="
|
||||
},
|
||||
"node_modules/@fontsource/geist-mono": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/geist-mono/-/geist-mono-5.0.3.tgz",
|
||||
"integrity": "sha512-ekY5FNiK7aMxan/c6lgVQa/rIwQ/AMEJZJWY7768jBrLVdkrCxfEfCe1ePpe7C3JnySy7c9R6HC4Xh4ksfjTaw==",
|
||||
"license": "OFL-1.1"
|
||||
},
|
||||
"node_modules/@fontsource/geist-sans": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/geist-sans/-/geist-sans-5.0.3.tgz",
|
||||
"integrity": "sha512-oGwoSIqNPMvjtCwj1lZaEr47MeiG27XPhypwkF643u1TQduvwbm3V3hYB01JekeaT34SAGP4I1h+WCdRpJkcwA==",
|
||||
"license": "OFL-1.1"
|
||||
},
|
||||
"node_modules/@hbsnow/rehype-sectionize": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@hbsnow/rehype-sectionize/-/rehype-sectionize-1.0.7.tgz",
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
"@astrojs/rss": "^4.0.7",
|
||||
"@astrojs/sitemap": "^3.1.6",
|
||||
"@astrojs/tailwind": "^5.1.0",
|
||||
"@fontsource/geist-mono": "^5.0.3",
|
||||
"@fontsource/geist-sans": "^5.0.3",
|
||||
"@hbsnow/rehype-sectionize": "^1.0.7",
|
||||
"@radix-ui/react-avatar": "^1.1.0",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
||||
|
|
BIN
public/fonts/GeistMonoVF.woff2
Normal file
BIN
public/fonts/GeistMonoVF.woff2
Normal file
Binary file not shown.
BIN
public/fonts/GeistVF.woff2
Normal file
BIN
public/fonts/GeistVF.woff2
Normal file
Binary file not shown.
|
@ -2,9 +2,6 @@
|
|||
import '../styles/global.css'
|
||||
import '../styles/katex.css'
|
||||
|
||||
import '@fontsource/geist-mono'
|
||||
import '@fontsource/geist-sans'
|
||||
|
||||
import { ViewTransitions } from 'astro:transitions'
|
||||
|
||||
interface Props {
|
||||
|
|
|
@ -57,7 +57,7 @@ function buildToc(headings: Heading[]): Heading[] {
|
|||
>
|
||||
<div class="mr-6 flex justify-end">
|
||||
<ul
|
||||
class="max-h-[calc(100vh-8rem)] space-y-2 overflow-y-auto"
|
||||
class="max-h-[calc(100vh-8rem)] flex flex-col gap-y-2 overflow-y-auto mr-6 justify-end"
|
||||
id="toc-container"
|
||||
>
|
||||
<li>
|
||||
|
|
|
@ -8,11 +8,11 @@ const buttonVariants = cva(
|
|||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
||||
default: 'bg-primary text-primary-foreground hover:bg-secondary/50',
|
||||
destructive:
|
||||
'bg-destructive text-destructive-foreground over:bg-destructive/90',
|
||||
'bg-destructive text-destructive-foreground over:bg-destructive/50',
|
||||
outline:
|
||||
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
||||
'border border-input bg-background hover:bg-secondary/50',
|
||||
secondary:
|
||||
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
||||
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
||||
|
|
|
@ -2,6 +2,22 @@
|
|||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
src: url('/fonts/GeistVF.woff2') format('woff2');
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Geist Mono';
|
||||
src: url('/fonts/GeistMonoVF.woff2') format('woff2');
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
|
|
|
@ -7,7 +7,7 @@ const config: Config = {
|
|||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Geist Sans', ...defaultTheme.fontFamily.sans],
|
||||
sans: ['Geist', ...defaultTheme.fontFamily.sans],
|
||||
mono: ['Geist Mono', ...defaultTheme.fontFamily.mono],
|
||||
},
|
||||
colors: {
|
||||
|
|
Loading…
Add table
Reference in a new issue