Compare commits

...

45 Commits

Author SHA1 Message Date
082afca9da chore(deps): update actions/cache action to v5
All checks were successful
test-build / guarddog (pull_request) Successful in 3m11s
test-build / build (pull_request) Successful in 8m56s
2026-03-07 05:27:59 +00:00
16e14f63ef feat: enable cache
All checks were successful
renovate / renovate (push) Successful in 6m46s
test-build / build (push) Successful in 7m51s
test-build / guarddog (push) Successful in 14m55s
2026-03-06 23:12:14 -06:00
ce9c9c3857 feat: release 2.24.0
All checks were successful
test-build / guarddog (push) Successful in 26s
renovate / renovate (push) Successful in 36s
test-build / build (push) Successful in 2m29s
release-image-gitea / build (push) Successful in 2m26s
release-image-harbor / build (push) Successful in 2m38s
release-image-gitea / release (push) Successful in 2m38s
release-image-harbor / release (push) Successful in 2m40s
2026-03-06 23:04:00 -06:00
345ab93e0c chore(deps): update deps
All checks were successful
renovate / renovate (push) Successful in 1m32s
test-build / guarddog (push) Successful in 1m40s
test-build / build (push) Successful in 3m30s
2026-03-06 23:02:00 -06:00
07c7edeb0f feat: add scroll reset on navigation 2026-03-06 23:01:10 -06:00
d3b2b40ccb feat: add gap to header above md 2026-03-06 23:01:10 -06:00
091af909d4 feat: add dates to selected 2026-03-06 23:01:10 -06:00
8a7b6b97b7 feat: use masonary style layout 2026-03-06 23:01:10 -06:00
fe3899242a fix: change selected count 2026-03-06 23:01:10 -06:00
e6d4e34a0a feat: improve layout for single and two images 2026-03-06 23:01:10 -06:00
5877086cc3 feat: remove extra spacing 2026-03-06 23:01:10 -06:00
6cfc1f62a7 Merge pull request 'chore(deps): update dependency eslint to v10.0.3' (#370) from renovate/eslint-monorepo into main
All checks were successful
renovate / renovate (push) Successful in 57s
test-build / guarddog (push) Successful in 1m27s
test-build / build (push) Successful in 2m54s
2026-03-07 01:09:34 +00:00
0b452b919a chore(deps): update dependency eslint to v10.0.3
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 1m13s
test-build / build (pull_request) Successful in 1m40s
2026-03-07 01:09:12 +00:00
50f050c0b6 feat: release 2.23.0
All checks were successful
test-build / guarddog (push) Successful in 30s
release-image-harbor / build (push) Successful in 1m8s
test-build / build (push) Successful in 2m11s
release-image-gitea / build (push) Successful in 2m55s
release-image-harbor / release (push) Successful in 2m20s
release-image-gitea / release (push) Successful in 2m21s
renovate / renovate (push) Successful in 1m39s
2026-03-06 17:30:52 -06:00
8b07837c0d feat: release 2.22.0
All checks were successful
test-build / guarddog (push) Successful in 34s
release-image-gitea / build (push) Successful in 1m12s
renovate / renovate (push) Successful in 1m43s
release-image-harbor / build (push) Successful in 2m45s
test-build / build (push) Successful in 3m5s
release-image-gitea / release (push) Successful in 2m41s
release-image-harbor / release (push) Successful in 2m36s
2026-03-06 16:22:34 -06:00
6fca640fd8 feat: update layout's width 2026-03-06 16:22:01 -06:00
89fd0eb7ce feat: release 2.21.0
All checks were successful
test-build / guarddog (push) Successful in 44s
release-image-harbor / build (push) Successful in 1m59s
renovate / renovate (push) Successful in 2m8s
test-build / build (push) Successful in 3m37s
release-image-gitea / build (push) Successful in 3m38s
release-image-harbor / release (push) Successful in 5m59s
release-image-gitea / release (push) Successful in 6m54s
2026-03-05 19:28:13 -06:00
95ea235f9f feat: release 2.20.1
All checks were successful
test-build / guarddog (push) Successful in 41s
renovate / renovate (push) Successful in 1m40s
test-build / build (push) Successful in 1m52s
release-image-harbor / build (push) Successful in 2m2s
release-image-gitea / build (push) Successful in 4m38s
release-image-harbor / release (push) Successful in 8m26s
release-image-gitea / release (push) Successful in 15m39s
2026-03-05 19:12:58 -06:00
fe6604a5d9 feat: slight optimization 2026-03-05 19:12:39 -06:00
2c2077053b feat: release 2.20.0
All checks were successful
test-build / guarddog (push) Successful in 39s
renovate / renovate (push) Successful in 1m56s
test-build / build (push) Successful in 2m59s
release-image-harbor / build (push) Successful in 1m34s
release-image-harbor / release (push) Successful in 6m3s
release-image-gitea / build (push) Successful in 3m47s
release-image-gitea / release (push) Successful in 9m40s
2026-03-05 18:57:07 -06:00
e7c660c142 feat: use many to one relationship for categories in directus 2026-03-05 18:56:44 -06:00
f4676d151f feat: release 2.19.1
All checks were successful
test-build / guarddog (push) Successful in 1m7s
test-build / build (push) Successful in 1m35s
release-image-harbor / build (push) Successful in 1m50s
release-image-harbor / release (push) Successful in 8m29s
release-image-gitea / build (push) Successful in 1m24s
release-image-gitea / release (push) Successful in 10m38s
renovate / renovate (push) Successful in 2m44s
2026-03-05 17:21:53 -06:00
ed0a691442 Merge pull request 'chore(deps): update docker/setup-buildx-action action to v4' (#369) from renovate/docker-setup-buildx-action-4.x into main
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
test-build / guarddog (push) Has been cancelled
Reviewed-on: #369
2026-03-05 23:21:43 +00:00
2aa17cd9c7 Merge pull request 'chore(deps): update docker/metadata-action action to v6' (#368) from renovate/docker-metadata-action-6.x into main
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
test-build / guarddog (push) Has been cancelled
Reviewed-on: #368
2026-03-05 23:20:43 +00:00
48991d411d chore(deps): update docker/setup-buildx-action action to v4
All checks were successful
test-build / guarddog (pull_request) Successful in 30s
test-build / build (pull_request) Successful in 3m0s
2026-03-05 23:19:35 +00:00
724c85332f chore(deps): update docker/metadata-action action to v6
All checks were successful
test-build / guarddog (pull_request) Successful in 37s
test-build / build (pull_request) Successful in 1m56s
2026-03-05 23:19:29 +00:00
bb4b9600e8 Merge pull request 'chore(deps): update docker/build-push-action action to v7' (#367) from renovate/docker-build-push-action-7.x into main
Some checks failed
renovate / renovate (push) Successful in 1m20s
test-build / guarddog (push) Successful in 1m17s
test-build / build (push) Has been cancelled
Reviewed-on: #367
2026-03-05 23:18:08 +00:00
42c24882ff Merge pull request 'chore(deps): update dependency @directus/sdk to v21.2.0' (#366) from renovate/directus-sdk-21.x-lockfile into main
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
test-build / guarddog (push) Has been cancelled
Reviewed-on: #366
2026-03-05 23:16:21 +00:00
daef38d80d chore(deps): update docker/build-push-action action to v7
All checks were successful
test-build / guarddog (pull_request) Successful in 42s
test-build / build (pull_request) Successful in 1m49s
2026-03-05 23:15:44 +00:00
e4de55fab3 chore(deps): update dependency @directus/sdk to v21.2.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / guarddog (pull_request) Successful in 1m1s
test-build / build (pull_request) Successful in 2m51s
2026-03-05 23:15:28 +00:00
afa1f36285 Merge pull request 'chore(deps): update docker/login-action action to v4' (#364) from renovate/docker-login-action-4.x into main
All checks were successful
test-build / guarddog (push) Successful in 45s
test-build / build (push) Successful in 1m59s
renovate / renovate (push) Successful in 2m28s
Reviewed-on: #364
2026-03-05 23:13:36 +00:00
93df739ea1 Merge pull request 'chore(deps): update dependency marked to v17.0.4' (#365) from renovate/marked-17.x-lockfile into main
All checks were successful
renovate / renovate (push) Successful in 1m27s
test-build / guarddog (push) Successful in 26s
test-build / build (push) Successful in 2m32s
2026-03-05 23:00:38 +00:00
667950f053 chore(deps): update dependency marked to v17.0.4
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / guarddog (pull_request) Successful in 51s
test-build / build (pull_request) Successful in 5m43s
2026-03-05 23:00:14 +00:00
14402954f5 chore(deps): update docker/login-action action to v4
All checks were successful
test-build / guarddog (pull_request) Successful in 50s
test-build / build (pull_request) Successful in 2m11s
2026-03-05 00:03:11 +00:00
6ddc382dac feat: release 2.19.0
All checks were successful
test-build / build (push) Successful in 4m49s
test-build / guarddog (push) Successful in 13m7s
release-image-gitea / build (push) Successful in 6m0s
release-image-harbor / build (push) Successful in 6m25s
release-image-gitea / release (push) Successful in 8m10s
release-image-harbor / release (push) Successful in 14m46s
renovate / renovate (push) Successful in 1m52s
2026-03-03 14:43:48 -06:00
3eae720221 feat: shorten transition time 2026-03-03 14:00:40 -06:00
f984a1f759 feat: add dark mode logo 2026-03-03 13:55:25 -06:00
62066c6f3b feat: release 2.18.1
Some checks failed
test-build / guarddog (push) Successful in 2m20s
test-build / build (push) Successful in 3m20s
renovate / renovate (push) Successful in 9m38s
release-image-gitea / build (push) Successful in 15m42s
release-image-gitea / release (push) Failing after 29s
release-image-harbor / build (push) Successful in 11m25s
release-image-harbor / release (push) Failing after 13m15s
2026-03-02 22:21:18 -06:00
97b1fa0316 feat: add dark mode swap to logo 2026-03-02 22:20:36 -06:00
7f31880b51 chore(deps): update deps
Some checks failed
test-build / guarddog (push) Successful in 43s
renovate / renovate (push) Successful in 1m5s
test-build / build (push) Successful in 2m40s
release-image-harbor / build (push) Successful in 5m34s
release-image-harbor / release (push) Failing after 4m11s
release-image-gitea / build (push) Successful in 2m50s
release-image-gitea / release (push) Failing after 24m58s
2026-03-02 21:40:10 -06:00
ddbcb33812 feat: release 2.18.0
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / guarddog (push) Has been cancelled
test-build / build (push) Has been cancelled
2026-03-02 21:39:40 -06:00
4e9ca2759a Merge pull request 'chore(deps): update dependency shiki to v4.0.1' (#363) from renovate/shiki-monorepo into main
All checks were successful
test-build / guarddog (push) Successful in 34s
test-build / build (push) Successful in 1m39s
renovate / renovate (push) Successful in 1m59s
2026-03-02 22:09:53 +00:00
eae55da29d chore(deps): update dependency shiki to v4.0.1
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 34s
test-build / build (pull_request) Successful in 1m47s
2026-03-02 22:09:43 +00:00
b40a58a4e0 Merge pull request 'chore(deps): update dependency @iconify-json/simple-icons to v1.2.72' (#362) from renovate/iconify-json-simple-icons-1.x-lockfile into main
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
test-build / guarddog (push) Has been cancelled
2026-03-02 22:09:31 +00:00
157a7bcdc5 chore(deps): update dependency @iconify-json/simple-icons to v1.2.72
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 1m14s
test-build / build (pull_request) Successful in 2m48s
2026-03-02 22:09:23 +00:00
20 changed files with 724 additions and 667 deletions

View File

@@ -26,7 +26,18 @@ jobs:
cache: pnpm
- name: Install Dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Cache Astro Build Cache
uses: actions/cache@v5
with:
path: |
node_modules/.cache
.astro/cache
key: ${{ runner.os }}-astro-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-astro-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-astro-cache-
- name: Lint Code
run: pnpm lint
@@ -42,14 +53,14 @@ jobs:
uses: actions/checkout@v6
- name: Login to Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ vars.REPOSITORY_HOST }}
username: ${{ gitea.actor }}
password: ${{ secrets.REPOSITORY_TOKEN }}
- name: Login to Docker
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
@@ -62,7 +73,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
with:
driver: kubernetes
driver-opts: |
@@ -77,7 +88,7 @@ jobs:
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
tags: |
type=ref,event=branch
@@ -101,7 +112,7 @@ jobs:
fi
- name: Build and Push Image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: true
@@ -113,6 +124,8 @@ jobs:
COMMIT_SHA=${{ steps.version.outputs.commit }}
IS_RELEASE=${{ steps.version.outputs.is_release }}
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
- name: ntfy Success
uses: niniyas/ntfy-action@master

View File

@@ -26,7 +26,18 @@ jobs:
cache: pnpm
- name: Install Dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Cache Astro Build Cache
uses: actions/cache@v5
with:
path: |
node_modules/.cache
.astro/cache
key: ${{ runner.os }}-astro-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-astro-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-astro-cache-
- name: Lint Code
run: pnpm lint
@@ -42,14 +53,14 @@ jobs:
uses: actions/checkout@v6
- name: Login to Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ vars.REGISTRY_HOST }}
username: ${{ vars.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_SECRET }}
- name: Login to Docker
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
@@ -62,7 +73,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
with:
driver: kubernetes
driver-opts: |
@@ -77,7 +88,7 @@ jobs:
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
tags: |
type=ref,event=branch
@@ -101,7 +112,7 @@ jobs:
fi
- name: Build and Push Image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: true
@@ -113,6 +124,8 @@ jobs:
COMMIT_SHA=${{ steps.version.outputs.commit }}
IS_RELEASE=${{ steps.version.outputs.is_release }}
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
- name: ntfy Success
uses: niniyas/ntfy-action@master

View File

@@ -28,7 +28,18 @@ jobs:
cache: pnpm
- name: Install Dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Cache Astro Build Cache
uses: actions/cache@v5
with:
path: |
node_modules/.cache
.astro/cache
key: ${{ runner.os }}-astro-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-astro-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-astro-cache-
- name: Lint Code
run: pnpm lint

View File

@@ -22,7 +22,7 @@ WORKDIR /app
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
LABEL version="2.17.2"
LABEL version="2.24.0"
LABEL description="Astro based personal website"
ENV HOST=0.0.0.0

View File

@@ -1,7 +1,7 @@
{
"name": "site-profile",
"type": "module",
"version": "2.17.2",
"version": "2.24.0",
"homepage": "https://www.alexlebens.dev",
"bugs": {
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
@@ -33,11 +33,11 @@
"@astrojs/react": "^4.4.2",
"@astrojs/rss": "^4.0.15",
"@astrojs/sitemap": "^3.7.0",
"@directus/sdk": "^21.1.0",
"@directus/sdk": "^21.2.0",
"@giscus/react": "^3.1.0",
"@iconify-json/mdi": "^1.2.3",
"@iconify-json/pajamas": "^1.2.15",
"@iconify-json/simple-icons": "^1.2.71",
"@iconify-json/simple-icons": "^1.2.72",
"@playform/compress": "^0.2.1",
"@swup/astro": "^1.8.0",
"@tailwindcss/postcss": "^4.2.1",
@@ -46,16 +46,16 @@
"@types/unist": "^3.0.3",
"astro": "^5.18.0",
"astro-icon": "^1.1.5",
"marked": "^17.0.3",
"marked": "^17.0.4",
"marked-shiki": "^1.2.1",
"mdast-util-to-string": "^4.0.0",
"preline": "^4.1.1",
"preline": "^4.1.2",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"reading-time": "^1.5.0",
"sharp": "^0.34.5",
"sharp-ico": "^0.1.5",
"shiki": "^4.0.0",
"shiki": "^4.0.1",
"tailwindcss": "^4.2.1",
"ultrahtml": "^1.6.0"
},
@@ -63,7 +63,7 @@
"@eslint-react/eslint-plugin": "^2.13.0",
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19",
"eslint": "^10.0.2",
"eslint": "^10.0.3",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-format": "^2.0.1",

1025
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@ const currentPath = pathname.slice(1);
class="fixed flex flex-wrap md:flex-nowrap md:justify-start inset-x-0 top-0 w-full z-50"
>
<nav
class="nav-base relative md:flex md:items-center md:justify-between rounded-[36px] w-full px-4 mx-2 py-3 mt-4"
class="nav-base relative md:flex md:items-center md:justify-between rounded-[36px] transition-all duration-300 w-full px-4 py-3 mx-2 md:mx-8 mt-4"
aria-label="Global"
>
<div class="flex items-center justify-between ml-0">

View File

@@ -64,7 +64,7 @@
const overlay = document.createElement('div');
overlay.className = 'theme-switch-overlay fixed inset-0 pointer-events-none z-50';
overlay.style.opacity = '0';
overlay.style.transition = 'opacity 0.3s ease-out';
overlay.style.transition = 'opacity 0.15s ease-out';
document.body.appendChild(overlay);
}
@@ -130,7 +130,7 @@
overlay.style.opacity = '0';
}
document.documentElement.classList.remove('theme-switching');
}, 300);
}, 150);
}, 50);
},
{ passive: false }

View File

@@ -2,28 +2,30 @@
import { Icon } from 'astro-icon/components';
import { Image } from 'astro:assets';
import { formatDate } from '@support/time';
import { getDirectusImageURL } from '@/support/url';
interface Props {
title: string;
subTitle: string;
url: string;
pubDate: Date,
img: string;
imgAlt: string;
}
const { title, subTitle, url, img, imgAlt } = Astro.props;
const { title, subTitle, url, pubDate, img, imgAlt } = Astro.props;
---
<div class="smooth-reveal flex flex-col px-4 py-10 mx-auto">
<div class="smooth-reveal flex flex-col px-4 py-10 mx-auto w-full">
<a
class="md:card-base-hidden group items-center md:grid md:grid-cols-2 lg:grid lg:grid-cols-2 gap-8 xl:gap-16 max-w-340 2xl:max-w-full md:px-8 md:py-8"
class="md:card-base-hidden group items-center md:grid md:grid-cols-2 lg:grid lg:grid-cols-2 gap-8 xl:gap-16 w-full md:px-8 md:py-8"
href={url}
data-astro-prefetch
>
<div>
<Image
class="rounded-2xl rounded-b-none md:rounded-2xl w-full h-full sm:max-h-80 md:max-h-90 object-cover"
class="rounded-2xl rounded-b-none md:rounded-2xl md:shadow-2xl w-full h-full sm:max-h-80 md:max-h-90 object-cover"
src={getDirectusImageURL(img)}
alt={imgAlt}
draggable="false"
@@ -40,17 +42,21 @@ const { title, subTitle, url, img, imgAlt } = Astro.props;
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose mb-8">
{subTitle}
</p>
<div class="button-base button-bg-teal inline-flex rounded-lg gap-x-2">
<div class="button-text-title flex relative items-center text-center">
<span class="mr-2">
Read More
</span>
<Icon
name="mdi:keyboard-arrow-right"
class="button-hover-arrow"
/>
<div class="flex items-center justify-between w-full">
<div class="button-base button-bg-teal inline-flex rounded-lg gap-x-2">
<div class="button-text-title flex relative items-center text-center">
<span class="mr-2">
Read More
</span>
<Icon
name="mdi:keyboard-arrow-right"
class="button-hover-arrow"
/>
</div>
</div>
<span class="card-text-description text-sm ml-auto">
{formatDate(pubDate)}
</span>
</div>
</div>
</a>
</div>

View File

@@ -2,25 +2,26 @@
import { Icon } from 'astro-icon/components';
import { Image } from 'astro:assets';
import { formatDate } from '@support/time';
import { getDirectusImageURL } from '@/support/url';
interface Props {
title: string;
subTitle: string;
url: string;
single?: boolean;
imgOne: any;
imgOneAlt: any;
imgTwo?: any;
imgTwoAlt?: any;
pubDate: Date;
imgOne: string;
imgOneAlt: string;
imgTwo?: string;
imgTwoAlt?: string;
}
const { title, subTitle, url, single, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = Astro.props;
const { title, subTitle, url, pubDate, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = Astro.props;
---
<div class="smooth-reveal flex flex-col px-5 py-10 mx-auto">
<div class="smooth-reveal flex flex-col px-4 py-10 mx-auto w-full">
<a
class="md:card-base-hidden group flex flex-col-reverse md:items-center md:grid md:grid-cols-2 lg:grid lg:grid-cols-2 md:gap-8 xl:gap-16 max-w-340 2xl:max-w-full md:px-8 md:py-8"
class="md:card-base-hidden group flex flex-col-reverse md:grid md:items-center md:grid-cols-2 lg:grid lg:grid-cols-2 md:gap-8 xl:gap-16 w-full md:px-8 md:py-8"
href={url}
data-astro-prefetch
>
@@ -31,25 +32,30 @@ const { title, subTitle, url, single, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = A
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose mb-8">
{subTitle}
</p>
<div class="button-base button-bg-teal inline-flex rounded-lg gap-x-2">
<div class="button-text-title flex relative items-center text-center">
<span class="mr-2">
Read More
</span>
<Icon
name="mdi:keyboard-arrow-right"
class="button-hover-arrow"
/>
<div class="flex items-center justify-between w-full">
<div class="button-base button-bg-teal inline-flex rounded-lg gap-x-2">
<div class="button-text-title flex relative items-center text-center">
<span class="mr-2">
Read More
</span>
<Icon
name="mdi:keyboard-arrow-right"
class="button-hover-arrow"
/>
</div>
</div>
<span class="card-text-description text-sm ml-auto">
{formatDate(pubDate)}
</span>
</div>
</div>
{single ? (
{!imgTwo ? (
<div>
<Image
class="rounded-2xl rounded-b-none md:rounded-2xl w-full"
class="rounded-2xl rounded-b-none md:rounded-2xl md:shadow-2xl w-full h-full sm:max-h-80 md:max-h-90 object-cover"
src={getDirectusImageURL(imgOne)}
alt={imgOneAlt}
format="webp"
draggable="false"
loading="lazy"
width="850"
height="420"
@@ -57,30 +63,42 @@ const { title, subTitle, url, single, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = A
/>
</div>
) : (
<div class="grid grid-cols-2 gap-4">
<Image
class="rounded-xl w-full"
src={getDirectusImageURL(imgOne)}
alt={imgOneAlt}
draggable="false"
format="webp"
loading="lazy"
width="400"
height="230"
inferSize={true}
/>
<Image
class="rounded-xl w-full mt-4 lg:mt-10"
src={getDirectusImageURL(imgTwo)}
alt={imgTwoAlt}
draggable="false"
format="webp"
loading="lazy"
width="400"
height="230"
inferSize={true}
/>
</div>
<>
<div class="md:hidden">
<Image
class="rounded-2xl rounded-b-none shadow-2xl w-full h-full sm:max-h-80 object-cover"
src={getDirectusImageURL(imgOne)}
alt={imgOneAlt}
draggable="false"
loading="lazy"
width="850"
height="420"
inferSize={true}
/>
</div>
<div class="hidden md:flex md:items-start">
<Image
class="rounded-xl z-10 shadow-2xl w-3/5 h-full object-cover"
src={getDirectusImageURL(imgOne)}
alt={imgOneAlt}
draggable="false"
loading="lazy"
width="600"
height="310"
inferSize={true}
/>
<Image
class="rounded-xl shadow-2xl w-3/5 h-full -ml-16 mt-12 object-cover"
src={getDirectusImageURL(imgTwo)}
alt={imgTwoAlt}
draggable="false"
loading="lazy"
width="600"
height="310"
inferSize={true}
/>
</div>
</>
)}
</a>
</div>

View File

@@ -4,12 +4,11 @@ import { Image } from 'astro:assets';
const { srcLight, srcDark, alt, style, width, height } = Astro.props;
---
<div class="themed-image-container">
<div class="grid grid-cols-1 grid-rows-1">
<Image
src={srcLight}
alt={alt}
class={`light-logo ${style}`}
inferSize={true}
class:list={['col-start-1 row-start-1 transition-all duration-300 ease-in-out opacity-100 scale-100 dark:opacity-0 dark:scale-65', style]}
width={width}
height={height}
inferSize={true}
@@ -18,29 +17,9 @@ const { srcLight, srcDark, alt, style, width, height } = Astro.props;
<Image
src={srcDark}
alt={alt}
class={`dark-logo ${style}`}
inferSize={true}
class:list={['col-start-1 row-start-1 transition-all duration-300 ease-in-out opacity-0 scale-65 dark:opacity-100 dark:scale-100', style]}
width={width}
height={height}
inferSize={true}
/>
</div>
<style>
.themed-image-container {
display: grid;
grid-template-areas: "stack";
}
.themed-image-container :global(img) {
grid-area: stack;
}
:global(.dark) .light-logo {
display: none !important;
}
:global(.dark) .dark-logo {
display: block !important;
}
</style>

View File

@@ -10,7 +10,7 @@ import { timeago } from '@support/time';
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*'],
fields: ['*', 'category.slug'],
sort: ['-published_date'],
})
);
@@ -31,13 +31,16 @@ const layoutPattern = [
const postMap: Map<string, Post[]> = posts
.sort((a: Post, b: Post) => b.published_date.valueOf() - a.published_date.valueOf())
.reduce((acc, obj) => {
let posts = acc.get(obj.category);
const categorySlug = obj.category?.slug;
if (!categorySlug) return acc;
let posts = acc.get(categorySlug);
if (!posts) {
posts = [];
}
posts.push(obj);
acc.set(obj.category, posts);
acc.set(categorySlug, posts);
return acc;
}, new Map<string, Post[]>());

View File

@@ -15,25 +15,29 @@ const global = await directus.request(readSingleton('site_global'));
title="Cloud Engineer"
description="Full stack and cloud engineer."
url="/about"
logoUrlLight="https://img.icons8.com/cotton/64/cloud-development--v2.png"
logoUrlLight="https://directus.alexlebens.net/assets/8e674299-2dfc-4ea3-8193-a1c4050bf06f?key=system-large-contain&v=2026-02-26T21%3A23%3A22.457Z"
logoUrlDark="https://directus.alexlebens.net/assets/cdd6efce-3231-4213-8b1e-cae9c1b3a18f?key=system-large-contain&v=2026-03-03T19%3A30%3A01.263Z"
/>
<FeaturesCard
title="Homelab"
description="Tinkering, testing, deploying, etc, etc ..."
url="/categories/homelab/"
logoUrlLight="https://img.icons8.com/cotton/64/smart-home-connection.png"
logoUrlLight="https://directus.alexlebens.net/assets/4ccb3d9f-e203-4c2b-bfad-600f1aa5b7a4?key=system-large-contain&v=2026-02-26T21%3A25%3A30.853Z"
logoUrlDark="https://directus.alexlebens.net/assets/33fb6b45-1834-44a0-bc04-692be4f6d4ce?key=system-large-contain&v=2026-03-03T19%3A30%3A37.961Z"
/>
<FeaturesCard
title="Documentation"
description="Reference and guides for my homelab."
url="https://docs.alexlebens.dev"
logoUrlLight="https://img.icons8.com/cotton/64/bookmarked-document--v1.png"
logoUrlLight="https://directus.alexlebens.net/assets/5f5faad9-2c36-40a5-a519-f631d39ab388?key=system-large-contain&v=2026-03-03T19%3A49%3A43.620Z"
logoUrlDark="https://directus.alexlebens.net/assets/c49b40a9-ddf2-4fa2-ba35-6039682b93de?key=system-large-contain&v=2026-03-03T19%3A50%3A14.893Z"
/>
<FeaturesCard
title="Email"
description={`Send me a message.`}
url=`mailto:${global.email}`
logoUrlLight="https://img.icons8.com/cotton/64/secured-letter--v3.png"
logoUrlLight="https://directus.alexlebens.net/assets/4b1c771e-c709-4094-b018-0197b4747829?key=system-large-contain&v=2026-03-03T19%3A48%3A36.432Z"
logoUrlDark="https://directus.alexlebens.net/assets/cdf2ea11-fcfc-41f1-a701-43084fb06efa?key=system-large-contain&v=2026-03-03T19%3A47%3A28.109Z"
/>
</div>
</div>

View File

@@ -23,7 +23,11 @@ const { posts, title, subTitle } = Astro.props;
</span>
</div>
</div>
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
{posts.map((b) => <BlogCard post={b} />)}
<div class="columns-1 sm:columns-2 lg:columns-3 gap-6">
{posts.map((b) => (
<div class="break-inside-avoid mb-6">
<BlogCard post={b} />
</div>
))}
</div>
</section>

View File

@@ -11,12 +11,13 @@ interface Props {
const { posts } = Astro.props;
---
<section class="smooth-reveal flex flex-col gap-4">
<section class="smooth-reveal flex flex-col gap-4 md:mb-20">
{posts.map((post, index) => index % 2 === 0 ? (
<LargeBlogLeftCard
title={post.title}
subTitle={post.description}
url={`/blog/${post.slug}`}
pubDate={post.published_date}
img={post.image}
imgAlt={post.image_alt}
/>
@@ -25,7 +26,7 @@ const { posts } = Astro.props;
title={post.title}
subTitle={post.description}
url={`/blog/${post.slug}`}
single={!post.image_second}
pubDate={post.published_date}
imgOne={post.image}
imgOneAlt={post.image_alt}
imgTwo={post?.image_second}

View File

@@ -68,67 +68,66 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
/>
</head>
<body class="bg-background selection:bg-yellow-400 m-0 p-0 overflow-x-hidden">
<body class="bg-background selection:bg-yellow-400 m-0 p-0 overflow-hidden">
<!-- Sliding backgrounds -->
<div class="bg"/>
<div class="bg bg2"/>
<div class="bg bg3"/>
<!-- Layout -->
<div class="grow w-full max-w-(--breakpoint-2xl) px-4 sm:px-6 lg:px-8 py-20 mx-auto">
<!-- Fixed header -->
<Header />
<Header />
<!-- Main body -->
<div id="reset-scroll" class="mask-container w-screen h-screen overflow-y-auto overflow-x-hidden">
<main>
<main class="has-js scroll-fade-container min-h-screen">
<slot />
<!-- Content -->
<div class="grow w-full max-w-(--breakpoint-2xl) px-4 sm:px-6 lg:px-8 py-20 mx-auto">
<slot />
</div>
<!-- Footer -->
<Footer />
</main>
</div>
<Footer />
</body>
</html>
<script>
document.addEventListener('astro:page-load', () => {
const onScroll = () => {
document.documentElement.style.setProperty('--scroll-offset', `${window.scrollY}px`);
document.documentElement.classList.add('has-js');
};
window.removeEventListener('scroll', onScroll);
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
});
const resetScroll = () => {
const scrollContainer = document.getElementById('reset-scroll');
if (scrollContainer) {
scrollContainer.scrollTop = 0;
}
};
resetScroll();
document.addEventListener('astro:after-swap', resetScroll);
</script>
<style>
/* Fade away content below header when scrolling */
.has-js .scroll-fade-container {
.mask-container {
-webkit-mask-image: linear-gradient(
to bottom,
transparent 0px,
transparent 16px,
black 80px,
transparent 90px,
black 140px,
black 100%
);
mask-image: linear-gradient(
to bottom,
transparent 0px,
transparent 16px,
black 60px,
transparent 90px,
black 140px,
black 100%
);
-webkit-mask-size: 100vw 100vh;
-webkit-mask-repeat: no-repeat;
-webkit-mask-position-y: var(--scroll-offset);
mask-position-y: var(--scroll-offset);
}
/* Background that creates the "glimmer" effect */
@@ -149,9 +148,9 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
}
:global(.dark) .bg {
--bg-primary: #332f2e;
--bg-secondary: #44403c;
--bg-tertiary: #57534e;
--bg-primary: #3b3836;
--bg-secondary: #332f2e;
--bg-tertiary: #44403c;
}
.bg2 {

View File

@@ -37,7 +37,7 @@ export type Post = {
title: string;
description: string;
tags: string[];
category: string;
category: Category;
selected: boolean;
published: boolean;
content: string;

View File

@@ -17,7 +17,9 @@ import { getDirectusImageURL } from '@/support/url';
const post = Astro.props;
export async function getStaticPaths() {
const posts = await directus.request(readItems('posts'));
const posts = await directus.request(readItems('posts', {
fields: ['*', 'category.*'],
}));
return posts.map((post) => ({
params: { slug: post.slug },
props: post,
@@ -25,12 +27,7 @@ export async function getStaticPaths() {
}
const global = await directus.request(readSingleton('site_global'));
const [category] = post.category ? await directus.request(
readItems('categories', {
filter: { slug: { _eq: post.category },},
limit: 1,
}))
: [];
const category = post.category;
const readingTime = getReadingTime(post.content || '');

View File

@@ -20,7 +20,7 @@ const posts = await directus.request(
})
);
const selectedPosts: Post[] = posts.filter((p) => p.selected).slice(0, 3);
const selectedPosts: Post[] = posts.filter((p) => p.selected).slice(0, 4);
const recentPosts: Post[] = posts.filter(
(p) => !selectedPosts.some((selected) => selected.slug === p.slug)
).slice(0, 9);

View File

@@ -22,7 +22,7 @@ const global = await directus.request(readSingleton('site_global'));
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*'],
fields: ['*', 'category.slug'],
sort: ['-published_date'],
})
);
@@ -30,7 +30,7 @@ const posts = await directus.request(
const categoriesPosts = posts
.sort((a: Post, b: Post) => b.published_date.valueOf() - a.published_date.valueOf())
.filter((b) => {
return b.category === category.slug;
return b.category?.slug === category.slug;
});
---