From 964d609197978959174e2dbd69286cab06b043fd Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Sat, 9 Dec 2023 16:04:28 +0100 Subject: [PATCH] :sparkles: add SectionContainer for all pages & layouts --- src/components/SectionContainer.astro | 24 ++++++++ src/layouts/BlogPost.astro | 40 ++++++------- src/pages/about.astro | 34 ++++------- src/pages/blog/index.astro | 83 +++++++++++---------------- src/pages/index.astro | 55 +++++++----------- src/pages/tools.astro | 81 +++++++++++--------------- 6 files changed, 142 insertions(+), 175 deletions(-) create mode 100644 src/components/SectionContainer.astro diff --git a/src/components/SectionContainer.astro b/src/components/SectionContainer.astro new file mode 100644 index 0000000..a56e6a0 --- /dev/null +++ b/src/components/SectionContainer.astro @@ -0,0 +1,24 @@ +--- +import BaseHead from '../components/BaseHead.astro'; +import Header from '../components/Header.astro'; +import Footer from '../components/Footer.astro'; +import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; +--- + + + + + + + +
+
+
+ + + +
+
+
+ + \ No newline at end of file diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index fac2ed1..b82128d 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -1,34 +1,26 @@ --- import type { CollectionEntry } from 'astro:content'; import BaseHead from '../components/BaseHead.astro'; -import Header from '../components/Header.astro'; -import Footer from '../components/Footer.astro'; import FormattedDate from '../components/FormattedDate.astro'; +import SectionContainer from '../components/SectionContainer.astro'; type Props = CollectionEntry<'blog'>['data']; const { title, description, pubDate } = Astro.props; --- + + + - - - - - - -
-
-
-
-

{title}

-

{description}

- -
- -
-
-
-
-
- - + +
+
+

{title}

+

{description}

+ +
+ +
+
+
+
\ No newline at end of file diff --git a/src/pages/about.astro b/src/pages/about.astro index 5caccb8..58f9cc5 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -1,26 +1,14 @@ --- -import BaseHead from '../components/BaseHead.astro'; -import Header from '../components/Header.astro'; -import Footer from '../components/Footer.astro'; -import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; +import SectionContainer from '../components/SectionContainer.astro'; --- - - - - - - -
-
-
-

About me

-

Some information about me & stuff I like

- -
-
-
- - \ No newline at end of file + +
+

About me

+

Some information about me & stuff I like

+ link to tools +

+ sidojdjosajoidsajaiodoaisoiasdosiadjoiaskflsdmklmdfsmlkfdskmdjdoasijsadkldsanlndsalnasdnlksadnklsdnlkdoasjdoasidjaoisjdoiasjdoasijdoiasjdoaijdio flex justify-center mx-auto md:gap-64 gap-4 py-5 +

+
+
\ No newline at end of file diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 2c4c9f6..0b786fd 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,57 +1,44 @@ --- -import BaseHead from '../../components/BaseHead.astro'; -import Header from '../../components/Header.astro'; -import Footer from '../../components/Footer.astro'; -import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts'; import { getCollection } from 'astro:content'; import FormattedDate from '../../components/FormattedDate.astro'; +import SectionContainer from '../../components/SectionContainer.astro'; const posts = (await getCollection('blog')).sort( (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf() ); --- + +
+

Blog posts

+
+ +
+
+
- - - - - - - -
-
-
-

Blog posts

-
- -
-
-
-
- - + \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index e04dc4e..c5d0cd9 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,51 +3,40 @@ import BaseHead from '../components/BaseHead.astro'; import Header from '../components/Header.astro'; import Footer from '../components/Footer.astro'; import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; +import SectionContainer from '../components/SectionContainer.astro'; --- - - - - - - -
-
-
-
-

Sindre Kjelsrud

-

- Student at Western University of Applied Sciences. -

- -
-