Skip to content

Commit c795506

Browse files
committed
install font-source, remove neutral-750
1 parent d5a1a68 commit c795506

4 files changed

Lines changed: 27 additions & 12 deletions

File tree

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"@astrojs/mdx": "^4.1.0",
1616
"@astrojs/rss": "^4.0.11",
1717
"@astrojs/sitemap": "^3.2.1",
18+
"@fontsource-variable/inter": "^5.2.5",
19+
"@fontsource/rubik": "^5.2.5",
1820
"@iconify-json/devicon": "^1.2.17",
1921
"@iconify-json/file-icons": "^1.2.1",
2022
"@iconify-json/skill-icons": "^1.2.0",

src/components/BaseHead.astro

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
import { ClientRouter } from 'astro:transitions';
33
import { SITE_TITLE } from '@/consts';
44
5+
// https://docs.astro.build/en/guides/fonts/#using-fontsource
6+
import '@fontsource-variable/inter';
7+
import '@fontsource/rubik/700.css';
8+
59
// Import the global.css file here so that it is included on all pages through the use of the <BaseHead /> component.
610
import '../styles/base.css';
711
@@ -42,14 +46,6 @@ const GA_ID = import.meta.env.PUBLIC_GA_ID!;
4246
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
4347
<meta name="generator" content={Astro.generator} />
4448

45-
<!-- Fonts -->
46-
<link rel="preconnect" href="https://fonts.googleapis.com" />
47-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
48-
<link
49-
href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Rubik:wght@700&display=swap"
50-
rel="stylesheet"
51-
/>
52-
5349
<!-- Canonical URL -->
5450
<link rel="canonical" href={canonicalURL} />
5551

src/styles/base.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
--breakpoint-xl: 1200px;
1515
--breakpoint-2xl: 1400px;
1616

17-
/* use https://oklch.com ? */
18-
--color-neutral-750: #333;
19-
2017
--font-display: 'Rubik', sans-serif;
21-
--font-sans: 'Inter', sans-serif;
18+
--font-sans: 'Inter Variable', sans-serif;
2219

2320
/* 15 / 16 */
2421
--text-base: 0.9375rem;

0 commit comments

Comments
 (0)