From c2223928f989284b16321e931af07666b8c1e42b Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Tue, 24 Jun 2025 20:24:27 +0200 Subject: [PATCH] nicer project showcase --- src/components/ProjectsFeature.astro | 142 +++++++++++++++++---------- src/pages/index.astro | 67 ++++++++----- src/styles/global.css | 81 +++++++++++++++ 3 files changed, 211 insertions(+), 79 deletions(-) diff --git a/src/components/ProjectsFeature.astro b/src/components/ProjectsFeature.astro index 9278e4b..858ae28 100644 --- a/src/components/ProjectsFeature.astro +++ b/src/components/ProjectsFeature.astro @@ -5,21 +5,12 @@ const projects = await getCollection('projects'); projects.sort((a, b) => a.data.name.localeCompare(b.data.name)); ---
-

Projects

-

- Here are some of the projects I'm working on. Most of them are open source, so feel free to check them out! -
- Projects presented here are what I consider in presentable and/or finished state. They might or might not get - updates. -
- Most logos generated using DALL-E mini. -

{ projects.map((project, index) => { return ( -
-
+ +
+ +
) }) } @@ -59,16 +67,37 @@ projects.sort((a, b) => a.data.name.localeCompare(b.data.name)); display: flex; flex-direction: column; gap: 1.5rem; + flex: 1; + } + + .popup { + position: fixed; + padding-top: 2.5rem; + flex-direction: column; + align-items: center; + gap: 1.5rem; + width: min(40rem, 100%); + &:popover-open { + display: flex; + } } .showcase { - display: flex; + display: grid; flex-direction: row; - overflow-x: scroll; + grid-template-columns: repeat(auto-fill, 10rem); max-width: 100%; gap: 0.75rem; scroll-snap-type: x mandatory; - padding-block: 0.25rem; + padding-block: 1.5rem; + justify-content: center; + padding-inline: 0.5rem; + grid-row-gap: 1.5rem; + + h3 { + font-size: 1rem; + font-weight: 300; + } } .project { @@ -77,45 +106,52 @@ projects.sort((a, b) => a.data.name.localeCompare(b.data.name)); justify-content: space-between; align-items: center; text-align: start; - padding-block: 0.5rem; - padding-inline: 1rem; border-radius: 0.25rem; - background-color: #313131; - min-width: min(20rem, calc(100% - 1.5rem)); - max-width: min(20rem, calc(100% - 1.5rem)); + width: 100%; scroll-snap-align: start; + color: #cccccc; + font-size: 1rem; + gap: 0.25rem; + padding: 0.25rem; + &:focus-within { + background-color: #548e9b; + } + &:focus-visible { + outline: none; + } + } - .icon { - width: 4rem; - height: 4rem; + .icon { + width: 4rem; + height: 4rem; + border-radius: 0.25rem; + + img { + width: 100%; + height: 100%; border-radius: 0.25rem; - img { - width: 100%; - height: 100%; - border-radius: 0.25rem; - } } + } - .description { - display: flex; - flex-direction: column; - gap: 0.5rem; - text-align: center; - flex: 1 1; - padding-block: 0.5rem; - } + .description { + display: flex; + flex-direction: column; + gap: 0.5rem; + text-align: center; + flex: 1 1; + } - .links { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - flex-wrap: wrap; - gap: 0.5rem; - line-height: 1; - a { - white-space: nowrap; - } + .links { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + flex-wrap: wrap; + gap: 0.5rem; + line-height: 1; + + a { + white-space: nowrap; } } diff --git a/src/pages/index.astro b/src/pages/index.astro index 43164e9..bb73ccd 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -12,56 +12,64 @@ const permalink = Astro?.site?.href ?? '/';
-
+

Welcome to my little corner of the interwebs

Feel free to check out what I got in store!

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

Projects

+

+ Here are some of the projects I'm working on. Most of them are open source, so feel free to check them out! +
+ Projects presented here are what I consider in presentable and/or finished state. They might or might not get + updates. +
+ Most logos generated using DALL-E mini. +

+
+ +
+
+ -