feat: add styles

This commit is contained in:
Ruidy 2024-12-31 09:04:36 +01:00
parent 01274c92bc
commit 9385a8a39d
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
4 changed files with 30 additions and 2 deletions

View file

@ -1,4 +1,6 @@
--- ---
import "../styles/global.css"
const pageTitle = "About Me" const pageTitle = "About Me"
const identity = { const identity = {
@ -23,6 +25,7 @@ const skills = [
const happy = true const happy = true
const finished = true const finished = true
const goal = 3 const goal = 3
const skillColor = "navy"
--- ---
<html lang="en"> <html lang="en">
@ -32,13 +35,13 @@ const goal = 3
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>{pageTitle}</title> <title>{pageTitle}</title>
<style> <style define:vars={{skillColor }}>
h1 { h1 {
color: purple; color: purple;
font-size: 4rem; font-size: 4rem;
} }
.skill { .skill {
color: green; color: var(--skillColor);
font-weight: bold; font-weight: bold;
} }
</style> </style>

View file

@ -1,4 +1,6 @@
--- ---
import "../styles/global.css"
const pageTitle = "Blog posts" const pageTitle = "Blog posts"
--- ---

View file

@ -1,4 +1,6 @@
--- ---
import "../styles/global.css"
const pageTitle = "Orbital Orbit" const pageTitle = "Orbital Orbit"
--- ---

21
src/styles/global.css Normal file
View file

@ -0,0 +1,21 @@
html {
background-color: #f1f5f9;
font-family: sans-serif;
}
body {
margin: 0 auto;
width: 100%;
max-width: 80ch;
padding: 1rem;
line-height: 1.5;
}
* {
box-sizing: border-box;
}
h1 {
margin: 1rem 0;
font-size: 2.5rem;
}