diff --git a/public/rickroll.mp3 b/public/rickroll.mp3 new file mode 100644 index 0000000..77cc891 Binary files /dev/null and b/public/rickroll.mp3 differ diff --git a/src/components/Header.astro b/src/components/Header.astro index 9ec8097..80582e2 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,31 +1,27 @@ --- -const { pathname } = Astro.url; +const pathname = new URL(Astro.request.url).pathname; +const pathSegments = pathname.slice(1).split('/').filter(segment => segment !== ''); + +function buildHref(index) { + if (pathSegments.length === 0) return '/'; + return ' /' + pathSegments.slice(0, index + 1).join('/'); +} + +const isLandingPage = pathSegments.length === 0; --- -
-
- -

Sids' blog

+ +
+
+ ~ + {isLandingPage ? / : ''} + {pathSegments.map((segment, index) => ( + <> + / + + {segment} + + + ))}
-
- diff --git a/src/components/HeaderLink.astro b/src/components/HeaderLink.astro new file mode 100644 index 0000000..dce58b1 --- /dev/null +++ b/src/components/HeaderLink.astro @@ -0,0 +1,21 @@ +--- +import type { HTMLAttributes } from 'astro/types'; + +type Props = HTMLAttributes<'a'>; + +const { href, class: className, ...props } = Astro.props; + +const { pathname } = Astro.url; +const isActive = href === pathname || href === pathname.replace(/\/$/, ''); +--- + + + + + diff --git a/src/data/guestbook.json b/src/data/guestbook.json new file mode 100644 index 0000000..94bd0a9 --- /dev/null +++ b/src/data/guestbook.json @@ -0,0 +1,79 @@ +{ + "visitors": [ + { + "name": "Sid", + "social": "kjelsrud.dev", + "sociallink": "https://kjelsrud.dev", + "image": "/img/guestbook/sid_pizza.webp", + "date": { + "year": "2024", + "month": "03", + "day": "01", + "string": "01.03.2024" + } + }, + { + "name": "Albert", + "social": "bayazidi.xyz", + "sociallink": "https://bayazidi.xyz", + "image": "/img/guestbook/albert_pizza.webp", + "date": { + "year": "2024", + "month": "03", + "day": "02", + "string": "02.03.2024" + } + }, + { + "name": "Azlen", + "social": "azlen.me", + "sociallink": "https://azlen.me/", + "image": "/img/guestbook/azlen_pizza.webp", + "date": { + "year": "2024", + "month": "08", + "day": "10", + "string": "10.08.2024" + } + }, + { + "name": "Luca", + "social": "les.cx", + "sociallink": "https://les.cx/", + "image": "/img/guestbook/luca_pizza.webp", + "date": { + "year": "2024", + "month": "08", + "day": "26", + "string": "26.08.2024" + } + }, + { + "name": "Kristoffer", + "social": "@kristoffer-jorgensborg", + "sociallink": "https://www.linkedin.com/in/kristoffer-jorgensborg/", + "image": "/img/guestbook/kristoffer_pizza.webp", + "date": { + "year": "2024", + "month": "08", + "day": "29", + "string": "29.08.2024" + } + }, + { + "name": "Kai Waløen", + "social": "kwal.no", + "sociallink": "https://www.kwal.no", + "image": "/img/guestbook/kai_pizza.webp", + "date": { + "year": "2024", + "month": "09", + "day": "14", + "string": "14.09.2024" + } + } + ], + "meta": { + "lastModified": "September 15, 2024" + } +} \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index eeeb6a4..b861f0b 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -6,7 +6,7 @@ const {frontmatter} = Astro.props;
-

[ {frontmatter.title} ]

+

[ {frontmatter.title} ]

{frontmatter.description}

diff --git a/src/pages/about.md b/src/pages/about.md new file mode 100644 index 0000000..07ccc04 --- /dev/null +++ b/src/pages/about.md @@ -0,0 +1,26 @@ +--- +title: 'About' +description: '' +layout: "../layouts/Layout.astro" +--- + +Hello! My name is Sindre, also known as ["Sid"](/avatar.webp). I'm a 20-something Software Engineer @ Capgemini, following their internal Ignite program. + +What do I like to do you ask? Well a lot, but as you read on the landing page I mostly like spending my free time bouldering/climbing, play some games on my Wii, watch the newest One Piece episode or build cairns. Below is some other information about me! + +👒 **Favorite Anime:** One Piece + +🎵 **Favorite Music:** Liquid DnB / Techno + +📽️ **Favorite Movie:** Ready Player One or The Summit of the Gods + +🎮 **Favorite Games:** Minecraft & Wii Sports + +📺 **Favorite Series:** Limitless + +📚 **Favorite Books/Mangas:** Permanent Record & Hi Score Girl + +## Want to contact me? 📫 + +You'll find all my contact information under [contact](/contact)! + diff --git a/src/pages/guestbook.astro b/src/pages/guestbook.astro index a415114..0de6089 100644 --- a/src/pages/guestbook.astro +++ b/src/pages/guestbook.astro @@ -1,9 +1,11 @@ --- import SectionContainer from '../components/SectionContainer.astro'; +import guestbook from '../data/guestbook.json'; +const visitors = guestbook["visitors"]; --- -
+
diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..959af1d --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,67 @@ +--- +import SectionContainer from '../components/SectionContainer.astro'; +import HeaderLink from '../components/HeaderLink.astro'; +--- + +
+
+ +
+ +
+

Sid

+
+

Software Engineer at Capgemini, following their Ignite program.

+

I like spending my free time bouldering/climbing, playing some games on my Wii, watching the newest One Piece episode or build cairns.

+

This website is just a fun side-project that I actively work on, and use as my creative outlet. It's also a way for me to actually own my data, allowing me to log data, post pictures and more!

+

Let me know you've been here by signing my guestbook!

+
+
+

pages

+
    +
  • ❓ whoami~ sid, i am
  • +
  • ✍️ blog~ i write my thoughts sometimes
  • +
  • 🗂️ logs~ a record of what I've watched, read & climbed
  • +
  • 📸 gallery~ moments and places of my life, in pictures
  • +
  • 🦕 more~ additional slash pages
  • +
+
+
+
+
+ + + + diff --git a/src/pages/index.md b/src/pages/index.md deleted file mode 100644 index 613442c..0000000 --- a/src/pages/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "whoami?" -description: "" -layout: "../layouts/Layout.astro" ---- - -Hallais! My name is **Sindre**, also known as ["Sid"](/avatar.webp). I'm a 20-something year old Software Engineer at Capgemini, following their internal Ignite program. - -Welcome to my website! It's a fun side-project that I actively work on, and use as my creative outlet. It's also a way for me to actually own my data, allowing me to log data, post pictures and more! - -I like to do a lot, but to sum it up I mostly like spending my free time bouldering/climbing, play some games on my Wii, watch the newest One Piece episode or build cairns - check out my [collection](/gallery/cairns). Below is some other information about me! - -👒 One Piece is my favorite anime. - -🎵 Liquid DnB / Techno is my go-to music. - -📢 I'm an Open Source advocate and enjoy talking about it. - -📽️ Ready Player One or The Summit of the Gods are my favorite movies, tough choice to only have one. - -📚 I love the book Permanent Record, can't recommend it enough! - -## Want to contact me? 📫 - -Want to say hi? You can find ways to reach me in [/contact](/contact) or let me know you've been here by signing my [guestbook](/guestbook)! diff --git a/src/styles/global.css b/src/styles/global.css index 5a826aa..92dde28 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -32,25 +32,6 @@ hr { margin: 10px 0; } -/* HEADER */ -.headerlink { - border: 2px solid var(--dark-link); - display: flex; - align-items: center; - padding: 0.5vh 1.5vh; - border-radius: 10px; - font-size: medium; -} - -.headerlink-active { - border: 2px solid var(--dark-link); - padding: 0.5vh 1vh; - border-radius: 10px; - font-weight: 600; - background-color: var(--dark-link); - color: var(--dark-bg); -} - /* FOOTER */ .footerbg { background-color: var(--dark-bg); @@ -199,6 +180,12 @@ iframe { padding-left: 10px; } +/* GUESTBOOK */ +.guestbook a:hover { + background-color: var(--dark-1); + color: var(--dark-bg); +} + /* QUOTES */ .author { color: var(--dark-2);