Setup Inter font (#182)
This commit is contained in:
parent
f617e3995f
commit
0698d62a63
5 changed files with 18 additions and 1 deletions
BIN
public/fonts/Inter-roman.var.woff2
Normal file
BIN
public/fonts/Inter-roman.var.woff2
Normal file
Binary file not shown.
10
src/components/fonts.astro
Normal file
10
src/components/fonts.astro
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<style is:global>
|
||||
@font-face {
|
||||
font-family: 'Inter var';
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
font-style: normal;
|
||||
font-named-instance: 'Regular';
|
||||
src: url('/fonts/Inter-roman.var.woff2') format('woff2');
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
import Fonts from '@/components/fonts.astro';
|
||||
import Footer from '@/pdf/components/footer.astro';
|
||||
import EducationSection from '@/pdf/sections/education-section.pdf.astro';
|
||||
import ExperienceSection from '@/pdf/sections/experience-section.pdf.astro';
|
||||
|
|
@ -23,6 +24,7 @@ const shouldRenderSection = (section: keyof typeof sections) => sections[section
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>PDF preview</title>
|
||||
<Fonts />
|
||||
</head>
|
||||
<body class="flex flex-col bg-white p-[10mm] print:p-0">
|
||||
{shouldRenderSection('main') && <MainSection {...sections.main} />}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
import Fonts from '@/components/fonts.astro';
|
||||
import Favicons from '@/web/head/favicons.auto-generated.astro';
|
||||
import InitialTheme from '@/web/head/initial-theme.astro';
|
||||
import Meta from '@/web/head/meta.astro';
|
||||
|
||||
import type { MetaConfig } from '@/types/config/meta-config.types';
|
||||
|
||||
interface Props {
|
||||
|
|
@ -16,4 +16,5 @@ const { meta } = Astro.props;
|
|||
<Meta meta={meta} />
|
||||
<Favicons />
|
||||
<InitialTheme />
|
||||
<Fonts />
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const colors = require('tailwindcss/colors');
|
||||
const defaultTheme = require('tailwindcss/defaultTheme');
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
|
|
@ -22,6 +23,9 @@ module.exports = {
|
|||
animation: {
|
||||
show: 'show 225ms ease-in-out',
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
|
|
|
|||
Loading…
Reference in a new issue