Skip to content

Commit

Permalink
feat: serve fonts from local directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ElianCodes committed Aug 9, 2023
1 parent bf51091 commit d6592c9
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 8 deletions.
Binary file added public/fonts/dm-serif.ttf
Binary file not shown.
Binary file added public/fonts/outfit.ttf
Binary file not shown.
Binary file added public/fonts/poppins.ttf
Binary file not shown.
Binary file added public/fonts/righteous.ttf
Binary file not shown.
Binary file added public/fonts/sanchez.ttf
Binary file not shown.
8 changes: 0 additions & 8 deletions src/components/layout/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const { title, description, ogImage } = Astro.props;
<meta property='og:description' content={description} />
<meta property='og:image' content={ogImage} />


<meta property='twitter:card' content='summary_large_image' />
<meta property='twitter:url' content={canonicalURL} />
<meta property='twitter:title' content={title} />
Expand All @@ -46,12 +45,5 @@ const { title, description, ogImage } = Astro.props;

<title>Brutal Theme | {title}</title>

<!-- fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link
href='https://fonts.bunny.net/css2?family=DM+Serif+Text&family=Fredoka+One&family=Outfit:wght@400;500&family=Poppins:wght@300;400;500&family=Righteous&family=Sanchez&display=swap'
rel='stylesheet'
/>

<slot />
</head>
1 change: 1 addition & 0 deletions src/layouts/Default.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import BaseNavigation from '@components/layout/BaseNavigation.astro';
import BaseFooter from '@components/layout/BaseFooter.astro';
import BaseHead from '@components/layout/BaseHead.astro';
import '../styles/global.css';
interface Props {
title: string;
Expand Down
38 changes: 38 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
font-family: "DM Serif Text";
font-style: normal;
font-display: swap;
src: url("/fonts/dm-serif.ttf") format("truetype");
}

@font-face {
font-family: "Outfit";
font-style: normal;
font-display: swap;
src: url("/fonts/outfit.ttf") format("truetype");
}

@font-face {
font-family: "Poppins";
font-style: normal;
font-display: swap;
src: url("/fonts/poppins.ttf") format("truetype");
}

@font-face {
font-family: "Righteous";
font-style: normal;
font-display: swap;
src: url("/fonts/righteous.ttf") format("truetype");
}

@font-face {
font-family: "Sanchez";
font-style: normal;
font-display: swap;
src: url("/fonts/sanchez.ttf") format("truetype");
}

0 comments on commit d6592c9

Please sign in to comment.