From 2fa2bce317ad9c054c596d59d784f4a1bc2c08ea Mon Sep 17 00:00:00 2001 From: Fluffy Date: Fri, 24 May 2024 14:45:19 +0100 Subject: [PATCH] Move more styling out of astro files, and into SCSS files --- src/layouts/Layout.astro | 48 ----------------------------- src/pages/index.astro | 30 +++++++++--------- src/pages/posts/index.astro | 61 +------------------------------------ src/styles/_banner.scss | 24 +++++++++++++++ src/styles/_main.scss | 17 ++++------- src/styles/_section.scss | 11 +++++++ src/styles/styles.scss | 6 ++-- 7 files changed, 61 insertions(+), 136 deletions(-) create mode 100644 src/styles/_banner.scss create mode 100644 src/styles/_section.scss diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 13b3678..acdb58a 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -43,51 +43,3 @@ const { title, src, alt } = Astro.props; - - diff --git a/src/pages/index.astro b/src/pages/index.astro index 6909791..bb7675d 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -15,11 +15,11 @@ const posts = await getPosts("posts");

Leggy Land

Made with Coffee, lots of it.

-
+
-
+

Who am I

My name is MichaƂ, I go by Fluffy, I'm 19 and I like computers @@ -30,9 +30,9 @@ const posts = await getPosts("posts");

I use Arch btw.

-
+
-
+

Find me on

-
+ -
+

Tools

    {tools.map(tool => (
  • {tool}
  • ))}
-
+ -
+

Languages

    {languages.map(language => (
  • {language}
  • ))}
-
+ -
+

Frameworks

    {frameworks.map(framework => (
  • {framework}
  • ))}
-
+ -
+

Projects

    {projects.slice(0, 2).map(project => ( @@ -75,9 +75,9 @@ const posts = await getPosts("posts"); ))}
All Projects -
+ -
+

Recent Posts

    {posts.slice(0, 2).map(project => ( @@ -89,7 +89,7 @@ const posts = await getPosts("posts"); ))}
All Posts -
+ diff --git a/src/styles/_banner.scss b/src/styles/_banner.scss new file mode 100644 index 0000000..8af614b --- /dev/null +++ b/src/styles/_banner.scss @@ -0,0 +1,24 @@ +.banner { + margin: 0 -16px; + + position: relative; + + height: 700px; + + box-shadow: 0 8px 8px rgba(#000, 0.3); + + overflow: hidden; + + > img { + width: 100%; + height: 100%; + + position: absolute; + top: 0; + left: 0; + + display: block; + + object-fit: cover; + } +} diff --git a/src/styles/_main.scss b/src/styles/_main.scss index 1178877..0147cc7 100644 --- a/src/styles/_main.scss +++ b/src/styles/_main.scss @@ -18,19 +18,14 @@ main { box-shadow: 0 8px 8px rgba(#000, 0.3); z-index: 10; - // causes problems on chrome - //animation: mainSlide 1s cubic-bezier(0,1,0,1) forwards; - > h1 { padding-bottom: 8px; } -} -@keyframes mainSlide { - 0% { - transform: translateY(100px); + > hr { + margin: 32px 0; + + border: 0 solid transparent; + border-bottom: 2px solid $gray; } - 100% { - transform: translateY(0); - } -} \ No newline at end of file +} diff --git a/src/styles/_section.scss b/src/styles/_section.scss new file mode 100644 index 0000000..80a0d8f --- /dev/null +++ b/src/styles/_section.scss @@ -0,0 +1,11 @@ +.section { + padding-bottom: 32px; + + > h2 { + padding-bottom: 10px; + } + + &:last-of-type { + padding-bottom: 0; + } +} diff --git a/src/styles/styles.scss b/src/styles/styles.scss index 796fc3e..9e9da95 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -1,8 +1,10 @@ @import "vars"; -@import "reset"; +@import "reset"; +@import "main"; +@import "banner"; +@import "section"; @import "button"; @import "pill"; @import "pill_list"; @import "project_list"; -@import "main";