From ed484cdde9326823a696fd39682f8e6d6e33c3cb Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> Date: Wed, 1 Jan 2025 18:46:23 +0100 Subject: Give the site a cleaner look --- src/layouts/Layout.astro | 39 +------- src/partials/Footer.astro | 7 +- src/partials/Header.astro | 225 ++-------------------------------------------- styles/shared.scss | 29 ++++++ 4 files changed, 44 insertions(+), 256 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 3bf3b6b..26507bd 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -68,27 +68,8 @@ const { title, description } = Astro.props; flex-direction: column; gap: 1.5rem; - background-color: $light; + background-color: $background; color: $dark; - - background-image: radial-gradient( - circle at 1px 1px, - #a9a9a988 1px, - transparent 0 - ); - background-size: 15px 15px; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-family: $mainFontStack; - @extend %tracking-tight; - line-height: 1.25; - margin-block: 0.6em; } a { @@ -105,18 +86,14 @@ const { title, description } = Astro.props; main { box-sizing: border-box; - margin: 0.75rem 1rem 3rem; - padding: 1.5rem 3rem; - border-radius: $floatingRadius; - box-shadow: $shadow; margin-bottom: auto; align-self: center; max-width: 82ch; font-size: 1.2rem; - - background-color: $lightAlt; + + padding-block-end: 3rem; a { color: $accentDark; @@ -127,10 +104,6 @@ const { title, description } = Astro.props; } } - > * { - margin-block: 0.75em; - } - > p > code { word-break: break-word; font-family: $monoFontStack; @@ -139,12 +112,6 @@ const { title, description } = Astro.props; background-color: #f6f6f6; } - h1 { - font-size: 2.75rem; - line-height: 1; - margin-bottom: 1rem; - } - p.meta { display: block; font-size: 0.85rem; diff --git a/src/partials/Footer.astro b/src/partials/Footer.astro index 0dc9483..9db5a05 100644 --- a/src/partials/Footer.astro +++ b/src/partials/Footer.astro @@ -26,9 +26,14 @@ text-align: center; padding: 0.5rem 1rem; - + a { color: $accentLight; } + + p { + max-width: 82ch; + margin-inline: auto; + } } diff --git a/src/partials/Header.astro b/src/partials/Header.astro index 90a1429..aa0d26a 100644 --- a/src/partials/Header.astro +++ b/src/partials/Header.astro @@ -2,192 +2,35 @@ import Favicon from "../assets/Favicon.astro"; --- - diff --git a/styles/shared.scss b/styles/shared.scss index 22a7292..1d9ccdc 100644 --- a/styles/shared.scss +++ b/styles/shared.scss @@ -5,6 +5,8 @@ $accent: hsl(209, 94%, 42%); $accentLight: hsl(215, 90%, 60%); $accentDark: hsl(215, 90%, 30%); $dark: hsl(340, 13%, 5%); + +$background: hsl(210, 40%, 98%); $light: hsl(214, 64%, 98%); $lightAlt: hsl(0, 0%, 100%); @@ -23,3 +25,30 @@ $breakpointDesktop: 1024px; letter-spacing: -0.05em; } +%heading { + font-family: $mainFontStack; + @extend %tracking-tight; + line-height: 1.25; + margin-block-start: 0.75em; + margin-block-end: 0.25em; +} + +h1 { + @extend %heading; + font-size: 3rem; +} + +h2 { + @extend %heading; + font-size: 2.25rem; +} + +h3 { + @extend %heading; + font-size: 1.5rem; +} + +h4 { + @extend %heading; + font-size: 1.25rem; +} \ No newline at end of file -- cgit v1.3