LCP fixes

This commit is contained in:
Firq 2025-04-17 21:46:30 +02:00
parent ce4e7777e0
commit 94687c6866
Signed by: Firq
GPG key ID: DCE182BA39C697B2
6 changed files with 16 additions and 18 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "@firq/fgosite",
"version": "0.2.0-pre.107",
"version": "0.2.0-pre.108",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@firq/fgosite",
"version": "0.2.0-pre.107",
"version": "0.2.0-pre.108",
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.5.6",
"@astrojs/check": "^0.9.4",

View file

@ -1,7 +1,7 @@
{
"name": "@firq/fgosite",
"type": "module",
"version": "0.2.0-pre.107",
"version": "0.2.0-pre.108",
"private": true,
"scripts": {
"dev": "astro dev",

View file

@ -65,16 +65,18 @@ const text = buttontext || baseurl
padding-top: 2rem;
font-size: 3.25rem;
font-weight: 700;
font-family: 'Work Sans Variable', system-ui, 'Segoe UI', sans-serif;
font-family: 'Work Sans Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
font-size-adjust: 0.52;
line-height: 1.4;
}
.sub {
margin: 0 .5rem;
font-size: 0.9rem;
font-weight: 500;
font-family: 'Work Sans Variable', system-ui, 'Segoe UI', sans-serif;
font-family: 'Work Sans Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
font-size-adjust: 0.52;
line-height: 1.4;
}
.head {

View file

@ -34,16 +34,18 @@ import LinkContainer from "../links/linkContainer.astro";
padding-top: 2rem;
font-size: 3rem;
font-weight: 700;
font-family: 'Work Sans Variable', system-ui, 'Segoe UI', sans-serif;
font-family: 'Work Sans Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
font-size-adjust: 0.52;
line-height: 1.4;
min-height: 4.8rem;
}
.sub {
font-size: 1rem;
font-weight: 400;
font-family: 'Work Sans Variable', system-ui, 'Segoe UI', sans-serif;
font-family: 'Work Sans Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
font-size-adjust: 0.52;
line-height: 1.4;
width: 97.5%;
min-height: 1.5rem;
}

View file

@ -1,6 +1,6 @@
---
import '@fontsource-variable/work-sans'
import workSans from '@fontsource-variable/work-sans/files/work-sans-latin-wght-normal.woff2'
import workSans from '@fontsource-variable/work-sans/files/work-sans-latin-wght-normal.woff2?url'
import Navbar from '@components/navbar/navbar.astro'
import NavbarEntry from '@components/navbar/navbarEntry.astro'
@ -113,15 +113,7 @@ const mapped_navdata = navdata.map((item) => ({
</body>
</html>
<style is:global define:vars={{ workSans }}>
@font-face {
font-family: 'Work Sans Variable';
src: var(--workSans) format('woff2');
font-display: swap;
font-weight: 100 900;
font-style: normal;
}
<style is:global>
:root {
/* Animations */
--a-time-default: 200ms;
@ -152,6 +144,8 @@ const mapped_navdata = navdata.map((item) => ({
/* Scrollbar */
scrollbar-color: var(--c-secondary-background) var(--c-primary-background);
/* Font Size Adjusting to prevent LCP issue */
}
body {

View file

@ -19,7 +19,7 @@ const { title } = Astro.props
font-size: 24px;
font-weight: 700;
line-height: 32px;
font-family: 'Work Sans Adaptive', sans-serif;
font-family: 'Work Sans Variable', sans-serif;
width: max-content;
margin: 0 auto 0.5rem;
&:after {