Skip to content

Commit

Permalink
perf: move fonts to local files
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Oct 16, 2024
1 parent 495814e commit dd8d01f
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
Binary file added public/fonts/AlfaSlabOne-Regular.woff2
Binary file not shown.
Binary file added public/fonts/Work-Sans-500.woff2
Binary file not shown.
Binary file added public/fonts/Work-Sans-600.woff2
Binary file not shown.
Binary file added public/fonts/Work-Sans-Regular.woff2
Binary file not shown.
29 changes: 29 additions & 0 deletions src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,35 @@
--black: #000;
}

@font-face {
font-family: "Alfa Slab One";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('fonts/AlfaSlabOne-Regular.woff2') format("woff2");
}
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('fonts/Work-Sans-Regular.woff2') format('woff2');
}
@font-face {
font-family: 'Work Sans';
font-style: medium;
font-weight: 500;
font-display: swap;
src: url('fonts/Work-Sans-500.woff2') format('woff2');
}
@font-face {
font-family: 'Work Sans';
font-style: semibold;
font-weight: 600;
font-display: swap;
src: url('fonts/Work-Sans-600.woff2') format('woff2');
}

body {
background: var(--background);
box-sizing: border-box;
Expand Down
5 changes: 0 additions & 5 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ import Community from "../sections/Community.astro";
<meta name="twitter:creator" content="@rust_lang_es" />

<!-- -->
<link
href="https://fonts.cdnfonts.com/css/alfa-slab-one"
rel="stylesheet"
/>
<link href="https://fonts.cdnfonts.com/css/work-sans" rel="stylesheet" />
<script type="text/javascript">
(function (c, l, a, r, i, t, y) {
if (
Expand Down

0 comments on commit dd8d01f

Please sign in to comment.