aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-01-01 18:46:23 +0100
committerAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-01-01 18:46:23 +0100
commited484cdde9326823a696fd39682f8e6d6e33c3cb (patch)
treeca54226e74bfd6cacb1c38075b273fb3b9cb00c3
parent078d34867aa33fd7684ebe54b723309f2dcbc0ff (diff)
Give the site a cleaner look
-rw-r--r--src/layouts/Layout.astro39
-rw-r--r--src/partials/Footer.astro7
-rw-r--r--src/partials/Header.astro225
-rw-r--r--styles/shared.scss29
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;
+ }
}
</style>
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";
---
-<header class="collapsed">
- <div id="brand">
- <button
- id="mobile-menu"
- type="button"
- aria-controls="nav-pages nav-socials"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="24"
- height="24"
- viewBox="0 0 24 24"
- stroke-width="2"
- stroke="currentColor"
- fill="none"
- stroke-linecap="round"
- stroke-linejoin="round"
- >
- <title>Hambuger menu</title>
- <path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path
- d="M4 6l16 0"></path><path d="M4 12l16 0"></path><path
- d="M4 18l16 0"></path>
- </svg>
- </button>
+<header>
- <a href="/" style="line-height: 1;">
- <Favicon />
- </a>
- </div>
-
- <nav id="nav-pages">
<a href="/">Inicio</a>
<a href="/trajectory">Trayectoria</a>
<a href="/portfolio">Portfolio</a>
<a href="/blog">Blog</a>
<a href="/contact">Contacto</a>
- </nav>
- <nav id="nav-socials">
- <a href="https://github.com/arielcostas" title="GitHub">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- class="icon icon-tabler icon-tabler-brand-github"
- width="32"
- height="32"
- viewBox="0 0 24 24"
- stroke-width="2"
- stroke="currentColor"
- fill="none"
- stroke-linecap="round"
- stroke-linejoin="round"
- >
- <title>GitHub logo</title>
- <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
- <path
- d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"
- ></path>
- </svg>
- </a>
- <a href="https://linkedin.com/in/ariel-costas" title="LinkedIn">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- class="icon icon-tabler icon-tabler-brand-linkedin"
- width="32"
- height="32"
- viewBox="0 0 24 24"
- stroke-width="2"
- stroke="currentColor"
- fill="none"
- stroke-linecap="round"
- stroke-linejoin="round"
- >
- <title>LinkedIn logo</title>
- <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
- <path
- d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"
- ></path>
- <path d="M8 11l0 5"></path>
- <path d="M8 8l0 .01"></path>
- <path d="M12 16l0 -5"></path>
- <path d="M16 16v-3a2 2 0 0 0 -4 0"></path>
- </svg>
- </a>
- <a href="https://bsky.app/profile/costas.dev" title="BlueSky">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="32"
- height="32"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- stroke-linecap="round"
- stroke-linejoin="round"
- class="icon icon-tabler icons-tabler-outline icon-tabler-brand-bluesky"
- ><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path
- d="M6.335 5.144c-1.654 -1.199 -4.335 -2.127 -4.335 .826c0 .59 .35 4.953 .556 5.661c.713 2.463 3.13 2.75 5.444 2.369c-4.045 .665 -4.889 3.208 -2.667 5.41c1.03 1.018 1.913 1.59 2.667 1.59c2 0 3.134 -2.769 3.5 -3.5c.333 -.667 .5 -1.167 .5 -1.5c0 .333 .167 .833 .5 1.5c.366 .731 1.5 3.5 3.5 3.5c.754 0 1.637 -.571 2.667 -1.59c2.222 -2.203 1.378 -4.746 -2.667 -5.41c2.314 .38 4.73 .094 5.444 -2.369c.206 -.708 .556 -5.072 .556 -5.661c0 -2.953 -2.68 -2.025 -4.335 -.826c-2.293 1.662 -4.76 5.048 -5.665 6.856c-.905 -1.808 -3.372 -5.194 -5.665 -6.856z"
- ></path>
- </svg>
- </a>
- </nav>
</header>
<style lang="scss">
@import "../../styles/shared.scss";
header {
- background-color: $lightAlt;
color: $accent;
- box-shadow: $shadow;
display: flex;
- flex-direction: column;
- align-items: stretch;
- justify-content: space-between;
- gap: 0.5rem 0;
-
- padding: calc(1rem - 2px) 1rem 1rem 1rem;
-
- position: relative;
- overflow: hidden;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ gap: 2rem;
- border-top: 4px solid $accent;
+ padding: 2rem;
a {
- display: inline-block;
- }
-
- #brand {
- display: flex;
- flex-direction: row;
- align-items: center;
- gap: 1rem;
-
- h1 {
- font-size: 2rem;
- margin: 0;
- font-weight: 500;
- line-height: 1;
-
- a {
- font-family: $mainFontStack;
- color: $accent;
- text-decoration: none;
- }
- }
- }
-
- #nav-pages {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- gap: 0.25rem;
-
- padding-inline-start: 2.5rem;
-
- transition: max-height 0.2s linear;
- max-height: 100vh;
-
- a {
- @extend %tracking-tight;
- }
- }
-
- #nav-socials {
- align-self: center;
-
- display: flex;
- gap: 1.5rem;
-
- transition: max-height 0.2s linear;
- max-height: 100vh;
-
- a {
- font-size: 1.5rem;
- transition: color 0.2s ease-in-out;
- line-height: 1;
- }
- }
-
- nav > a {
text-decoration: none;
font-weight: 700;
font-size: 1.2rem;
text-transform: uppercase;
- letter-spacing: 0.1rem;
transition: color 0.2s ease-in-out,
border-bottom-color 0.2s ease-in-out;
color: $accent;
@@ -203,71 +46,15 @@ import Favicon from "../assets/Favicon.astro";
color: $accentDark;
}
}
-
- button#mobile-menu {
- display: block;
- background-color: transparent;
- border: none;
- font-size: 2rem;
- cursor: pointer;
- }
}
@media (max-width: $breakpointTablet) {
- header.collapsed {
- gap: 0;
-
- #nav-pages,
- #nav-socials {
- max-height: 0;
- overflow: hidden;
- }
- }
}
@media (min-width: $breakpointTablet) {
- header {
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
-
- #nav-pages {
- justify-self: start;
- flex-direction: row;
- gap: 1.5rem;
- padding-inline-start: 0;
- }
-
- button#mobile-menu {
- display: none;
- }
-
- &.collapsed {
- #nav-pages,
- #nav-socials {
- display: flex;
- max-height: unset;
- align-self:center;
- }
- }
- }
}
@media (min-width: $breakpointDesktop) {
- header {
- padding: calc(1rem - 2px) 5.5rem 1rem 5.5rem;
- gap: 1.5rem;
- justify-content: center;
-
- h1 {
- margin-bottom: 0.5rem;
- }
-
- #nav-socials {
- align-self: flex-end;
- margin-left: auto;
- }
- }
}
</style>
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