Skip to content

Commit 512484b

Browse files
committed
🎈 perf: optimize fonts
1 parent 0a1d244 commit 512484b

File tree

9 files changed

+32
-15
lines changed

9 files changed

+32
-15
lines changed

public/fonts/Lato-Bold.woff2

27.2 KB
Binary file not shown.

public/fonts/Lato-BoldItalic.woff2

29 KB
Binary file not shown.

public/fonts/Lato-Italic.woff2

28.9 KB
Binary file not shown.

public/fonts/Lato-Regular.woff2

27.8 KB
Binary file not shown.

src/components/Articles.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const allPosts = await Astro.glob('../pages/posts/*.md');
3838
)}
3939
class=" mb-0 p-1 pb-0 text-lg text-lime-200/60 drop-shadow-[0_15px_20px_black] max-sm:text-base"
4040
/>
41-
<header class="m-1 text-2xl font-extrabold text-teal-200 max-md:text-3xl">
41+
<header class="m-1 text-2xl font-bold text-teal-200 max-md:text-3xl">
4242
<h3 class="m-0 drop-shadow-[0_15px_20px_black]">
4343
{post.frontmatter.title}
4444
</h3>

src/components/Experience.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const { HEADER_EXPERIENCE, EXPERIENCE } = Astro.props;
3636
loading="lazy"
3737
/>
3838
</div>
39-
<h3 class="reveal-experience-info my-0.5 text-xl font-semibold text-teal-200">
39+
<h3 class="reveal-experience-info my-0.5 text-xl font-bold text-teal-200">
4040
{job.ocupation}
4141
</h3>
4242
</div>

src/components/Work/Project.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const {
6767
class="m-0 flex min-h-72 w-11/12 flex-col items-start justify-between p-5 transition-[transform] duration-300 group-hover:scale-105 max-sm:w-full max-sm:justify-evenly max-sm:p-4 max-sm:group-hover:scale-105"
6868
>
6969
<header
70-
class="m-1 text-xl font-extrabold text-teal-200 max-sm:text-[1.65rem]"
70+
class="m-1 text-xl font-bold text-teal-200 max-sm:text-[1.65rem]"
7171
>
7272
<h3 class="m-0 text-3xl drop-shadow-[0_15px_20px_black]">
7373
{title}

src/layouts/Layout.astro

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,6 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
5252
href="/images/favicon-dark.png"
5353
media="(prefers-color-scheme: dark)"
5454
/>
55-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
56-
<!-- TODO: Optimize fonts-->
57-
<link
58-
rel="preload"
59-
href="https://fonts.googleapis.com/css?family=Lato:400&display=swap"
60-
as="font"
61-
/>
62-
<link
63-
rel="preload"
64-
as="font"
65-
href="https://fonts.googleapis.com/css?family=Lato:400italic%27&display=swap"
66-
/>
6755
<link rel="sitemap" href="/sitemap-index.xml" />
6856
<meta name="generator" content={Astro.generator} />
6957
<link rel="canonical" href={canonicalURL} />

src/styles/styles.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,35 @@
1717
}
1818

1919
/* || GENERAL STYLES */
20+
@font-face {
21+
font-family: 'Lato';
22+
font-style: normal;
23+
font-weight: 400;
24+
font-display: swap;
25+
src: url("/fonts/Lato-Regular.woff2") format("woff2");
26+
}
27+
@font-face {
28+
font-family: 'Lato';
29+
font-style: italic;
30+
font-weight: 400;
31+
font-display: swap;
32+
src: url("/fonts/Lato-Italic.woff2") format("woff2");
33+
}
34+
35+
@font-face {
36+
font-family: 'Lato';
37+
font-style: normal;
38+
font-weight: 700;
39+
font-display: swap;
40+
src: url("/fonts/Lato-Bold.woff2") format("woff2");
41+
}
42+
@font-face {
43+
font-family: 'Lato';
44+
font-style: italic;
45+
font-weight: 700;
46+
font-display: swap;
47+
src: url("/fonts/Lato-BoldItalic.woff2") format("woff2");
48+
}
2049

2150
h1,
2251
h2,

0 commit comments

Comments
 (0)