From 0b1afda9aad7e00e2ef15c27944a320d97931444 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 7 Jul 2024 14:04:13 +0200 Subject: [PATCH] Move slim layout to slim container --- src/components/atoms/ContainerSlim.svelte | 23 ++++ src/lib/styles/mixins.scss | 18 +++ src/routes/+layout.svelte | 13 --- src/routes/+page.svelte | 61 +++++----- src/routes/blog/+page.svelte | 17 +-- src/routes/blog/[slug]/+page.svelte | 131 +++++++++++----------- 6 files changed, 150 insertions(+), 113 deletions(-) create mode 100644 src/components/atoms/ContainerSlim.svelte create mode 100644 src/lib/styles/mixins.scss diff --git a/src/components/atoms/ContainerSlim.svelte b/src/components/atoms/ContainerSlim.svelte new file mode 100644 index 0000000..323f968 --- /dev/null +++ b/src/components/atoms/ContainerSlim.svelte @@ -0,0 +1,23 @@ +
+ +
+ + diff --git a/src/lib/styles/mixins.scss b/src/lib/styles/mixins.scss new file mode 100644 index 0000000..8374b17 --- /dev/null +++ b/src/lib/styles/mixins.scss @@ -0,0 +1,18 @@ +@mixin mobile() { + @media (max-width: 600px) { + @content; + } +} + +@mixin landscape() { + @media (min-aspect-ratio: 16/11) { + @content; + } +} + + +@mixin portrait() { + @media (max-aspect-ratio: 10/16) { + @content; + } +} \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2f0e560..d35c86d 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -30,19 +30,6 @@ display: flex; flex-direction: column; } - .content { - margin: 0 20%; - transition-duration: 1s; - display: block; - - @include portrait { - margin: 0 5%; - } - - @include landscape { - margin: 0 25%; - } - } .footer-position { margin: 0; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 8b8f379..7b2f0f5 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,39 +1,42 @@ -

Welcome to my website

- -
-
- - Heyyy. I'm a software developer and tinkerer from Germany. I do a lot of - stuff so this website is an attempt in providing an overview. -

- Right now it's very much a work in progress as I'm figuring out how to - properly design a website (lol). But there's already some content to explore. -
+ +

Welcome to my website

+ +
+
+ + Heyyy. I'm a software developer and tinkerer from Germany. I do a lot + of stuff so this website is an attempt in providing an overview. +

+ Right now it's very much a work in progress as I'm figuring out how to + properly design a website (lol). But there's already some content to explore. +
+
+
+ +
-
- -
-
- + + + +