Compare commits

..

82 Commits

Author SHA1 Message Date
0b116a05df Merge pull request 'chore(deps): update dependency node to v24.13.1' (#330) from renovate/node-24.x into main
All checks were successful
renovate / renovate (push) Successful in 46s
test-build / build (push) Successful in 1m6s
release-image-harbor / build (push) Successful in 1m10s
release-image-harbor / release (push) Successful in 6m56s
release-image-gitea / build (push) Successful in 1m8s
release-image-gitea / release (push) Successful in 3m10s
Reviewed-on: #330
2026-02-11 03:56:27 +00:00
849ca78598 chore(deps): update dependency node to v24.13.1
All checks were successful
test-build / build (pull_request) Successful in 1m27s
2026-02-11 03:54:23 +00:00
8377aefaf7 chore(deps): update deps
All checks were successful
renovate / renovate (push) Successful in 49s
test-build / build (push) Successful in 1m54s
2026-02-10 21:53:32 -06:00
3f5682f80c feat: release 2.6.0 2026-02-10 21:52:57 -06:00
ae84560ddd Merge pull request 'chore(deps): update dependency @eslint-react/eslint-plugin to v2.12.4' (#331) from renovate/eslint-react-eslint-plugin-2.x-lockfile into main
All checks were successful
renovate / renovate (push) Successful in 1m9s
test-build / build (push) Successful in 1m48s
2026-02-11 03:47:31 +00:00
1f7253d954 chore(deps): update dependency @eslint-react/eslint-plugin to v2.12.4
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 1m53s
2026-02-11 03:47:23 +00:00
b6dfc738f1 feat: add weather widget
All checks were successful
renovate / renovate (push) Successful in 1m3s
test-build / build (push) Successful in 1m47s
2026-02-10 21:42:04 -06:00
63cbcdf39b feat: improve logos and clickability of cards on about and apps
All checks were successful
renovate / renovate (push) Successful in 46s
test-build / build (push) Successful in 1m8s
2026-02-10 18:02:12 -06:00
10c4f9c768 chore(deps): update deps
All checks were successful
test-build / build (push) Successful in 1m6s
release-image-harbor / build (push) Successful in 1m16s
release-image-harbor / release (push) Successful in 7m28s
release-image-gitea / build (push) Successful in 1m1s
release-image-gitea / release (push) Successful in 2m37s
renovate / renovate (push) Successful in 1m8s
2026-02-09 22:25:54 -06:00
880bafd41e feat: release 2.5.0 2026-02-09 22:24:36 -06:00
3ebc36174b Merge pull request 'chore(deps): update dependency typescript-eslint to v8.55.0' (#329) from renovate/typescript-eslint-monorepo into main
Some checks failed
renovate / renovate (push) Successful in 57s
test-build / build (push) Has been cancelled
Reviewed-on: #329
2026-02-10 04:24:19 +00:00
0abd1a2465 Merge pull request 'chore(deps): update dependency motion to v12.34.0' (#328) from renovate/motion-12.x-lockfile into main
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
Reviewed-on: #328
2026-02-10 04:24:06 +00:00
f2b27a01bf chore(deps): update dependency typescript-eslint to v8.55.0
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 1m22s
2026-02-10 04:21:50 +00:00
503cb401fc chore(deps): update dependency motion to v12.34.0
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 2m20s
2026-02-10 04:21:11 +00:00
a45a4d7dd7 feat: remove text-justify from content
All checks were successful
renovate / renovate (push) Successful in 55s
test-build / build (push) Successful in 1m32s
2026-02-09 22:12:28 -06:00
6d3f3a49ab fix: padding, margin, and width issues
All checks were successful
renovate / renovate (push) Successful in 1m3s
test-build / build (push) Successful in 1m31s
2026-02-09 22:08:35 -06:00
197ad63ada feat: move directus to local endpoint
All checks were successful
test-build / build (push) Successful in 1m26s
renovate / renovate (push) Successful in 1m40s
2026-02-09 17:07:11 -06:00
4c4421c8a8 fix: fix lint error
All checks were successful
test-build / build (push) Successful in 1m7s
renovate / renovate (push) Successful in 1m12s
release-image-harbor / build (push) Successful in 58s
release-image-gitea / build (push) Successful in 1m20s
release-image-gitea / release (push) Successful in 2m53s
release-image-harbor / release (push) Successful in 3m15s
2026-02-08 23:15:40 -06:00
d0ff16c8dc feat: release 2.4.0 2026-02-08 23:11:20 -06:00
9678b3c718 feat: add applications page
Some checks failed
test-build / build (push) Failing after 43s
renovate / renovate (push) Successful in 1m34s
2026-02-08 23:10:40 -06:00
7fafa5c4cf feat: update features 2026-02-08 17:15:43 -06:00
a909743feb Merge pull request 'chore(deps): update dependency eslint to v10' (#323) from renovate/major-eslint-monorepo into main
All checks were successful
test-build / build (push) Successful in 2m12s
renovate / renovate (push) Successful in 1m56s
Reviewed-on: #323
2026-02-08 22:12:30 +00:00
f116173cb8 chore(deps): update dependency eslint to v10
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 1m18s
2026-02-08 21:04:30 +00:00
ce62de8883 Merge pull request 'chore(deps): update dependency eslint-plugin-format to v1.4.0' (#326) from renovate/eslint-plugin-format-1.x-lockfile into main
All checks were successful
test-build / build (push) Successful in 1m22s
renovate / renovate (push) Successful in 1m39s
Reviewed-on: #326
2026-02-08 21:02:57 +00:00
94f2779463 chore(deps): update dependency eslint-plugin-format to v1.4.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 1m57s
2026-02-08 20:58:23 +00:00
ed3cf80921 Merge pull request 'chore(deps): update dependency @iconify-json/simple-icons to v1.2.70' (#327) from renovate/iconify-json-simple-icons-1.x-lockfile into main
All checks were successful
renovate / renovate (push) Successful in 1m49s
test-build / build (push) Successful in 2m5s
2026-02-08 20:57:00 +00:00
63aa6bfdbc chore(deps): update dependency @iconify-json/simple-icons to v1.2.70
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 1m25s
2026-02-08 20:56:47 +00:00
4343124c3f Merge pull request 'chore(deps): update dependency @eslint-react/eslint-plugin to v2.12.2' (#325) from renovate/eslint-react-eslint-plugin-2.x-lockfile into main
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
Reviewed-on: #325
2026-02-08 20:55:25 +00:00
a48063a694 chore(deps): update dependency @eslint-react/eslint-plugin to v2.12.2
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 1m31s
2026-02-08 20:39:47 +00:00
e476efb96b feat: use latest alpine
All checks were successful
test-build / build (push) Successful in 1m41s
renovate / renovate (push) Successful in 3m23s
2026-02-08 14:38:05 -06:00
a99201138e Merge pull request 'chore(deps): update dependency @eslint-react/eslint-plugin to v2.11.2' (#324) from renovate/eslint-react-eslint-plugin-2.x-lockfile into main
All checks were successful
renovate / renovate (push) Successful in 2m15s
test-build / build (push) Successful in 3m14s
2026-02-08 00:02:47 +00:00
9ef86e71dc chore(deps): update dependency @eslint-react/eslint-plugin to v2.11.2
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 1m40s
2026-02-08 00:02:23 +00:00
5cd59cd1ff Merge pull request 'chore(deps): update dependency @eslint-react/eslint-plugin to v2.11.0' (#321) from renovate/eslint-react-eslint-plugin-2.x-lockfile into main
All checks were successful
test-build / build (push) Successful in 1m6s
renovate / renovate (push) Successful in 3m28s
Reviewed-on: #321
2026-02-07 00:31:33 +00:00
d5cf6fe130 chore(deps): update dependency @eslint-react/eslint-plugin to v2.11.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 1m0s
2026-02-07 00:28:07 +00:00
91136e2e54 Merge pull request 'chore(deps): update dependency @directus/sdk to v21.1.0' (#320) from renovate/directus-sdk-21.x-lockfile into main
All checks were successful
renovate / renovate (push) Successful in 1m1s
test-build / build (push) Successful in 1m16s
Reviewed-on: #320
2026-02-07 00:27:00 +00:00
7b915cf021 chore(deps): update dependency @directus/sdk to v21.1.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 59s
2026-02-07 00:19:11 +00:00
807b8dd9b9 Merge pull request 'chore(deps): update dependency motion to v12.33.0' (#322) from renovate/motion-12.x-lockfile into main
All checks were successful
test-build / build (push) Successful in 2m20s
renovate / renovate (push) Successful in 2m39s
Reviewed-on: #322
2026-02-07 00:17:06 +00:00
76c6933682 chore(deps): update dependency motion to v12.33.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 3m6s
2026-02-07 00:10:24 +00:00
bd34eb6f75 Merge pull request 'chore(deps): update dependency @types/react to v19.2.13' (#319) from renovate/react-monorepo into main
All checks were successful
renovate / renovate (push) Successful in 2m4s
test-build / build (push) Successful in 3m5s
2026-02-07 00:02:58 +00:00
c8d9def6dc chore(deps): update dependency @types/react to v19.2.13
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 2m3s
2026-02-07 00:02:40 +00:00
5fb2ff16c6 Merge pull request 'chore(deps): update dependency @types/react to v19.2.11' (#318) from renovate/react-monorepo into main
All checks were successful
test-build / build (push) Successful in 1m44s
renovate / renovate (push) Successful in 4m59s
2026-02-05 00:06:50 +00:00
9a86ea4053 chore(deps): update dependency @types/react to v19.2.11
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 2m9s
2026-02-05 00:06:24 +00:00
49969e27b0 feat: release 2.3.2
All checks were successful
test-build / build (push) Successful in 1m47s
release-image-gitea / build (push) Successful in 1m37s
release-image-harbor / build (push) Successful in 1m42s
release-image-gitea / release (push) Successful in 2m31s
release-image-harbor / release (push) Successful in 2m39s
renovate / renovate (push) Successful in 1m12s
2026-02-03 21:26:32 -06:00
bf73905658 feat: release 2.3.0
All checks were successful
test-build / build (push) Successful in 1m20s
renovate / renovate (push) Successful in 1m23s
release-image-gitea / build (push) Successful in 1m59s
release-image-harbor / build (push) Successful in 1m58s
release-image-gitea / release (push) Successful in 2m49s
release-image-harbor / release (push) Successful in 2m54s
2026-02-03 17:34:10 -06:00
56d841a335 feat: better reactive layout for small screen sizes 2026-02-03 17:32:38 -06:00
95432d9059 feat: add rounded option to hero component and use it for about page 2026-02-03 16:56:03 -06:00
c2bf64c6cc fix: remove description 2026-02-03 16:55:38 -06:00
1f3fed93a1 feat: reorganize blog layout 2026-02-03 16:42:17 -06:00
754f6a22f0 feat: remove hardcoded descriptions 2026-02-03 16:18:33 -06:00
4203b63893 feat: remove mdx 2026-02-03 16:16:29 -06:00
4d7886b93c fix: clean up comments 2026-02-03 16:07:45 -06:00
c7d3ca7252 feat: remove hardcoded descriptions 2026-02-03 16:06:31 -06:00
a0f83c874c fix: add comments 2026-02-03 16:00:14 -06:00
22860c4714 feat: add docs link to footer 2026-02-03 15:58:45 -06:00
9b8a7077a7 chore(deps): update deps 2026-02-03 15:56:55 -06:00
8bfc744bdb chore: update README 2026-02-03 15:56:45 -06:00
d386afa15e Merge pull request 'chore(deps): update dependency motion to v12.30.0' (#317) from renovate/motion-12.x-lockfile into main
All checks were successful
renovate / renovate (push) Successful in 1m11s
test-build / build (push) Successful in 2m18s
Reviewed-on: #317
2026-02-03 00:17:38 +00:00
3fe324d4c2 Merge pull request 'chore(deps): update dependency @eslint-react/eslint-plugin to v2.9.3' (#316) from renovate/eslint-react-eslint-plugin-2.x-lockfile into main
Some checks failed
renovate / renovate (push) Successful in 1m58s
test-build / build (push) Has been cancelled
Reviewed-on: #316
2026-02-03 00:15:11 +00:00
a02d417c83 chore(deps): update dependency motion to v12.30.0
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 3m18s
2026-02-03 00:09:13 +00:00
0d53376c80 chore(deps): update dependency @eslint-react/eslint-plugin to v2.9.3
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 3m11s
2026-02-03 00:08:35 +00:00
a5abfe0d1c Merge pull request 'chore(deps): update dependency eslint-plugin-react-refresh to ^0.5.0' (#315) from renovate/eslint-plugin-react-refresh-0.x into main
All checks were successful
test-build / build (push) Successful in 1m46s
renovate / renovate (push) Successful in 2m34s
Reviewed-on: #315
2026-02-03 00:07:00 +00:00
3fcf9a0703 chore(deps): update dependency eslint-plugin-react-refresh to ^0.5.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 1m38s
2026-02-03 00:04:06 +00:00
00b63a5bea revert: release 2.2.5
All checks were successful
test-build / build (push) Successful in 2m29s
release-image-harbor / build (push) Successful in 1m23s
release-image-gitea / build (push) Successful in 2m39s
release-image-gitea / release (push) Successful in 5m45s
release-image-harbor / release (push) Successful in 7m49s
renovate / renovate (push) Successful in 4m11s
2026-02-01 21:50:36 -06:00
d9860106b1 chore(deps): update pnpm 2026-02-01 21:49:52 -06:00
83940a28ab Merge pull request 'chore(deps): update dependency shiki to v3.22.0' (#314) from renovate/shiki-monorepo into main
Some checks failed
renovate / renovate (push) Successful in 50s
test-build / build (push) Has been cancelled
Reviewed-on: #314
2026-02-02 03:48:48 +00:00
4baa2bed51 chore(deps): update dependency shiki to v3.22.0
Some checks failed
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Failing after 1m16s
2026-02-01 00:02:59 +00:00
19a9588919 Merge pull request 'chore(deps): update dependency preline to v4.0.1' (#313) from renovate/preline-4.x-lockfile into main
All checks were successful
test-build / build (push) Successful in 4m47s
renovate / renovate (push) Successful in 3m6s
2026-01-31 00:02:07 +00:00
3c8d3992cf chore(deps): update dependency preline to v4.0.1
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 1m51s
2026-01-31 00:01:39 +00:00
fb8f642c52 fix: update lock
All checks were successful
renovate / renovate (push) Successful in 2m14s
test-build / build (push) Successful in 2m16s
release-image-harbor / build (push) Successful in 1m36s
release-image-gitea / build (push) Successful in 3m47s
release-image-harbor / release (push) Successful in 3m25s
release-image-gitea / release (push) Successful in 3m15s
2026-01-30 17:59:51 -06:00
fde397386c revert: release 2.2.4
Some checks failed
test-build / build (push) Failing after 24s
renovate / renovate (push) Has been cancelled
2026-01-30 17:58:08 -06:00
b7f76c5847 feat: add shiki to markdown rendering for code highlighting 2026-01-30 17:56:57 -06:00
b3bb769c47 revert: release 2.2.3
All checks were successful
renovate / renovate (push) Successful in 1m12s
release-image-harbor / build (push) Successful in 1m50s
test-build / build (push) Successful in 2m19s
release-image-gitea / build (push) Successful in 2m15s
release-image-gitea / release (push) Successful in 3m1s
release-image-harbor / release (push) Successful in 7m1s
2026-01-29 19:09:10 -06:00
f34f4b2532 revert: release 2.2.2
All checks were successful
release-image-gitea / build (push) Successful in 1m38s
test-build / build (push) Successful in 2m6s
release-image-harbor / build (push) Successful in 3m43s
release-image-gitea / release (push) Successful in 2m53s
release-image-harbor / release (push) Successful in 3m22s
renovate / renovate (push) Successful in 2m43s
2026-01-29 17:40:07 -06:00
94f5082729 chore(deps): update dependencies, preline to v4 2026-01-29 17:38:23 -06:00
5e9765f4d7 Merge pull request 'chore(deps): update dependency astro to v5.16.16' (#311) from renovate/astro-monorepo into main
All checks were successful
test-build / build (push) Successful in 1m57s
renovate / renovate (push) Successful in 3m26s
2026-01-29 18:15:46 +00:00
ac4bc16913 chore(deps): update dependency astro to v5.16.16
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 2m2s
2026-01-29 18:15:23 +00:00
daaca66f42 ci: update renovate image
Some checks failed
test-build / build (push) Successful in 2m21s
renovate / renovate (push) Has been cancelled
2026-01-29 12:12:43 -06:00
6fb7846d23 Merge pull request 'chore(deps): update dependency @types/react to v19.2.10' (#310) from renovate/react-monorepo into main
All checks were successful
renovate / renovate (push) Successful in 50s
test-build / build (push) Successful in 1m50s
2026-01-29 00:03:43 +00:00
167491fe8d chore(deps): update dependency @types/react to v19.2.10
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 2m31s
2026-01-29 00:03:21 +00:00
1cda8fac20 Merge pull request 'chore(deps): update dependency typescript-eslint to v8.54.0' (#309) from renovate/typescript-eslint-monorepo into main
All checks were successful
test-build / build (push) Successful in 2m25s
renovate / renovate (push) Successful in 3m13s
Reviewed-on: #309
2026-01-28 01:24:02 +00:00
dbf7ae54a4 Merge pull request 'chore(deps): update react monorepo to v19.2.4' (#308) from renovate/react-monorepo into main
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
Reviewed-on: #308
2026-01-28 01:23:41 +00:00
a857b64029 chore(deps): update dependency typescript-eslint to v8.54.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 4m28s
2026-01-28 00:11:56 +00:00
44 changed files with 1839 additions and 2067 deletions

View File

@@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
node-version: 24.13.0 node-version: 24.13.1
cache: pnpm cache: pnpm
- name: Install Dependencies - name: Install Dependencies

View File

@@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
node-version: 24.13.0 node-version: 24.13.1
cache: pnpm cache: pnpm
- name: Install Dependencies - name: Install Dependencies

View File

@@ -13,7 +13,7 @@ on:
jobs: jobs:
renovate: renovate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/renovatebot/renovate:42 container: ghcr.io/renovatebot/renovate:43
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v6

View File

@@ -24,7 +24,7 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
node-version: 24.13.0 node-version: 24.13.1
cache: pnpm cache: pnpm
- name: Install Dependencies - name: Install Dependencies

View File

@@ -1,5 +1,5 @@
ARG REGISTRY=docker.io ARG REGISTRY=docker.io
FROM ${REGISTRY}/node:24.13.0-alpine3.22 AS base FROM ${REGISTRY}/node:24.13.0-alpine AS base
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
@@ -26,10 +26,10 @@ COPY --from=build /app/dist /app/dist
ENV HOST=0.0.0.0 ENV HOST=0.0.0.0
ENV SITE_URL=https://www.alexlebens.dev ENV SITE_URL=https://www.alexlebens.dev
ENV DIRECTUS_URL=https://directus.alexlebens.dev ENV DIRECTUS_URL=https://directus.alexlebens.net
ENV PORT=4321 ENV PORT=4321
LABEL version="2.2.1" LABEL version="2.6.0"
LABEL description="Astro based personal website" LABEL description="Astro based personal website"
EXPOSE $PORT EXPOSE $PORT

View File

@@ -2,29 +2,19 @@
Personal site used for information about myself and blog. Personal site used for information about myself and blog.
## Features ## Development
- 🐈 Simple And Beautiful
- 🖥️️ Responsive And Light/Dark mode
- 🐛 SiteMap & RSS Feed
- 🐝 Category Support
- 🐜 SEO and Responsiveness
- 🪲 Markdown And MDX
- 🏂🏾 Page Compression & Image Optimization
### Development Commands
With dependencies installed, you can utilize the following npm scripts to manage your project's development lifecycle: With dependencies installed, you can utilize the following npm scripts to manage your project's development lifecycle:
- `pnpm run dev`: Starts a local development server with hot reloading enabled. - `pnpm build`: Bundles your site into static files for production.
- `pnpm run preview`: Serves your build output locally for preview before deployment. - `pnpm dev`: Starts a local development server with hot reloading enabled.
- `pnpm run build`: Bundles your site into static files for production. - `pnpm preview`: Serves your build output locally for preview before deployment.
For detailed help with Astro CLI commands, visit [Astro's documentation](https://docs.astro.build/en/reference/cli-reference/). For detailed help with Astro CLI commands, visit [Astro's documentation](https://docs.astro.build/en/reference/cli-reference/).
## Thanks ## Thanks
Thanks https://github.com/mearashadowfax/ScrewFast, https://github.com/godruoyi/gblog/tree/gblog-template Thanks https://github.com/godruoyi/gblog/tree/gblog-template, https://github.com/mearashadowfax/ScrewFast,
## License ## License

View File

@@ -1,6 +1,5 @@
import { defineConfig, passthroughImageService, sharpImageService } from 'astro/config'; import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import node from '@astrojs/node'; import node from '@astrojs/node';
import partytown from '@astrojs/partytown'; import partytown from '@astrojs/partytown';
import react from '@astrojs/react'; import react from '@astrojs/react';
@@ -9,8 +8,6 @@ import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite'; import tailwindcss from '@tailwindcss/vite';
import icon from 'astro-icon'; import icon from 'astro-icon';
import swup from '@swup/astro'; import swup from '@swup/astro';
import rehypePrettyCode from 'rehype-pretty-code';
import { transformerCopyButton } from '@rehype-pretty/transformers';
const getSiteURL = () => { const getSiteURL = () => {
if (process.env.SITE_URL) { if (process.env.SITE_URL) {
@@ -31,7 +28,6 @@ export default defineConfig({
prefetch: true, prefetch: true,
integrations: [ integrations: [
mdx(),
partytown(), partytown(),
react(), react(),
sitemap(), sitemap(),
@@ -67,24 +63,6 @@ export default defineConfig({
markdown: { markdown: {
syntaxHighlight: false, syntaxHighlight: false,
rehypePlugins: [
[
rehypePrettyCode,
{
theme: {
light: 'github-light',
dark: 'github-dark-dimmed',
},
keepBackground: false,
transformers: [
transformerCopyButton({
visibility: 'always',
feedbackDuration: 2500,
}),
],
},
],
],
}, },
plugins: { plugins: {

View File

@@ -1,7 +1,7 @@
{ {
"name": "site-profile", "name": "site-profile",
"type": "module", "type": "module",
"version": "2.2.1", "version": "2.6.0",
"homepage": "https://www.alexlebens.dev", "homepage": "https://www.alexlebens.dev",
"bugs": { "bugs": {
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
@@ -28,57 +28,56 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.6", "@astrojs/check": "^0.9.6",
"@astrojs/mdx": "^4.3.13",
"@astrojs/node": "^9.5.2", "@astrojs/node": "^9.5.2",
"@astrojs/partytown": "^2.1.4", "@astrojs/partytown": "^2.1.4",
"@astrojs/react": "^4.4.2", "@astrojs/react": "^4.4.2",
"@astrojs/rss": "^4.0.15", "@astrojs/rss": "^4.0.15",
"@astrojs/sitemap": "^3.7.0", "@astrojs/sitemap": "^3.7.0",
"@directus/sdk": "^21.0.0", "@directus/sdk": "^21.1.0",
"@giscus/react": "^3.1.0", "@giscus/react": "^3.1.0",
"@iconify-json/mdi": "^1.2.3", "@iconify-json/mdi": "^1.2.3",
"@iconify-json/pajamas": "^1.2.15", "@iconify-json/pajamas": "^1.2.15",
"@iconify-json/simple-icons": "^1.2.67", "@iconify-json/simple-icons": "^1.2.70",
"@playform/compress": "^0.2.1", "@playform/compress": "^0.2.1",
"@rehype-pretty/transformers": "^0.13.2", "@swup/astro": "^1.7.0",
"@swup/astro": "1.7.0",
"@tailwindcss/postcss": "^4.1.18", "@tailwindcss/postcss": "^4.1.18",
"@tailwindcss/vite": "^4.1.18", "@tailwindcss/vite": "^4.1.18",
"@types/react": "^19.2.9", "@types/react": "^19.2.13",
"@types/unist": "^3.0.3", "@types/unist": "^3.0.3",
"astro": "^5.16.15", "astro": "^5.17.1",
"astro-compressor": "^1.2.0", "astro-compressor": "^1.2.0",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"marked": "^17.0.1",
"marked-shiki": "^1.2.1",
"mdast-util-to-string": "^4.0.0", "mdast-util-to-string": "^4.0.0",
"motion": "^12.29.0", "motion": "^12.34.0",
"preline": "^3.2.3", "preline": "^4.0.1",
"react": "^19.2.3", "react": "^19.2.4",
"react-dom": "^19.2.3", "react-dom": "^19.2.4",
"reading-time": "^1.5.0", "reading-time": "^1.5.0",
"rehype-pretty-code": "^0.14.1",
"sharp": "^0.34.5", "sharp": "^0.34.5",
"sharp-ico": "^0.1.5", "sharp-ico": "^0.1.5",
"shiki": "^3.21.0", "shiki": "^3.22.0",
"tailwindcss": "^4.1.18", "tailwindcss": "^4.1.18",
"ultrahtml": "^1.6.0" "ultrahtml": "^1.6.0"
}, },
"devDependencies": { "devDependencies": {
"@eslint-react/eslint-plugin": "^2.7.2", "@eslint-react/eslint-plugin": "^2.12.4",
"@tailwindcss/forms": "^0.5.11", "@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"eslint": "^9.39.2", "eslint": "^10.0.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-astro": "^1.5.0", "eslint-plugin-astro": "^1.5.0",
"eslint-plugin-format": "^1.3.1", "eslint-plugin-format": "^1.4.0",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.26", "eslint-plugin-react-refresh": "^0.5.0",
"prettier": "^3.8.1", "prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1", "prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.7.2", "prettier-plugin-tailwindcss": "^0.7.2",
"timeago.js": "^4.0.2", "timeago.js": "^4.0.2",
"typescript": "5.9.3", "typescript": "^5.9.3",
"typescript-eslint": "8.53.1" "typescript-eslint": "^8.55.0"
} }
} }

3076
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,14 +16,14 @@ const currentYear = new Date().getFullYear();
transition:animate="none" transition:animate="none"
> >
<div class="relative px-4 pt-16 pb-12 sm:px-6"> <div class="relative px-4 pt-16 pb-12 sm:px-6">
<div class="mx-auto max-w-[85rem]"> <div class="mx-auto max-w-340">
<div class="grid grid-cols-1 gap-10 md:grid-cols-12"> <div class="grid grid-cols-1 gap-10 md:grid-cols-12">
<!-- Brand section --> <!-- Brand section -->
<div class="col-span-1 md:col-span-3"> <div class="col-span-1 md:col-span-3">
<a href="/" class="group inline-block"> <a href="/" class="group inline-block">
<div class="flex items-center"> <div class="flex items-center">
<div class="mx-auto aspect-square overflow-hidden rounded-lg"> <div class="mx-auto aspect-square overflow-hidden rounded-lg">
<BrandLogo class="max-h-[40px] max-w-[40px] rounded-full" /> <BrandLogo class="max-h-10 max-w-10 rounded-full" />
</div> </div>
<span class="ml-3 text-xl font-bold text-neutral-800 dark:text-neutral-200"> <span class="ml-3 text-xl font-bold text-neutral-800 dark:text-neutral-200">

View File

@@ -33,7 +33,7 @@ const currentPath = pathname.slice(1);
aria-label="Toggle navigation" aria-label="Toggle navigation"
> >
<svg <svg
class="hs-collapse-open:hidden h-[1.25rem] w-[1.25rem] flex-shrink-0" class="hs-collapse-open:hidden h-5 w-5 shrink-0"
width="24" width="24"
height="24" height="24"
viewBox="0 0 24 24" viewBox="0 0 24 24"
@@ -48,7 +48,7 @@ const currentPath = pathname.slice(1);
<line x1="3" x2="21" y1="18" y2="18"></line> <line x1="3" x2="21" y1="18" y2="18"></line>
</svg> </svg>
<svg <svg
class="hs-collapse-open:block hidden h-[1.25rem] w-[1.25rem] flex-shrink-0" class="hs-collapse-open:block hidden h-5 w-5 shrink-0"
width="24" width="24"
height="24" height="24"
viewBox="0 0 24 24" viewBox="0 0 24 24"

View File

@@ -12,10 +12,10 @@ const { posts } = Astro.props;
<section class="mx-auto mb-10 max-w-[85rem] px-4 py-8 sm:px-6 lg:px-8 2xl:max-w-full"> <section class="mx-auto mb-10 max-w-[85rem] px-4 py-8 sm:px-6 lg:px-8 2xl:max-w-full">
<div class="text-left"> <div class="text-left">
<h2 <h2
id="selected-articel" id="recent-articles"
class="smooth-reveal-2 mb-4 text-5xl font-extrabold tracking-tight text-balance text-neutral-800 dark:text-neutral-200" class="smooth-reveal-2 mb-10 text-5xl font-extrabold tracking-tight text-balance text-neutral-800 dark:text-neutral-200"
> >
Older Articles Recent Posts
</h2> </h2>
</div> </div>

View File

@@ -10,12 +10,11 @@ interface Props {
} }
const { posts } = Astro.props; const { posts } = Astro.props;
const blogPosts = posts.slice(0, 5);
--- ---
<section class="smooth-reveal"> <section class="smooth-reveal">
{ {
blogPosts.map((b, index) => posts.map((b, index) =>
index % 2 === 0 ? ( index % 2 === 0 ? (
<BlogLeftSection <BlogLeftSection
title={b.title} title={b.title}

View File

@@ -15,11 +15,12 @@ const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses = const bgColorClasses =
'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg'; const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg';
const sizeClasses = 'h-30 w-100 md:w-[300px]';
--- ---
<div class={`${baseClasses}`}> <div class={`${baseClasses}`}>
<a <a
class={`rounded-xl duration-300 transition-all h-30 ${borderClasses} ${bgColorClasses} ${shadowClasses}`} class={`rounded-xl duration-300 transition-all ${sizeClasses} ${borderClasses} ${bgColorClasses} ${shadowClasses}`}
href={url} href={url}
data-astro-prefetch data-astro-prefetch
> >

View File

@@ -0,0 +1,52 @@
---
import { Image } from 'astro:assets';
import { blurStyle } from '@support/image';
const { srcLight, srcDark, alt, style, disableBlur, width, height } = Astro.props;
const showBlur = !disableBlur;
const blurLight = (srcLight?.fsPath && showBlur) ? await blurStyle(srcLight.fsPath) : {};
const blurDark = (srcDark?.fsPath && showBlur) ? await blurStyle(srcDark.fsPath) : {};
---
<div class="themed-image-container">
<Image
src={srcLight}
alt={alt}
class={`light-logo ${style}`}
style={blurLight}
inferSize={true}
width={width}
height={height}
/>
<Image
src={srcDark}
alt={alt}
class={`dark-logo ${style}`}
style={blurDark}
inferSize={true}
width={width}
height={height}
/>
</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

@@ -0,0 +1,16 @@
---
import ImageTheme from '@components/ui/images/ImageTheme.astro';
const { srcLight, srcDark, alt } = Astro.props;
---
<ImageTheme
srcLight={srcLight}
srcDark={srcDark}
alt={alt}
style='color: transparent; width: 48px; height: 48px; object-fit: contain; max-height: 100%; max-width: 100%;'
draggable="false"
loading="lazy"
width="48"
height="48"
/>

View File

@@ -0,0 +1,71 @@
---
import { Icon } from 'astro-icon/components';
import { readItems } from '@directus/sdk';
import Logo from '@components/ui/logos/Logo.astro';
import type { Application } from '@lib/directusTypes';
import directus from '@lib/directus';
const applications = await directus.request(
readItems('site_applications', {
fields: ['*'],
sort: ['-isActive'],
})
);
const baseClasses = 'smooth-reveal-cards rounded-xl flex flex-col group group-hover';
const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses =
'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg';
---
<section class:list={['flex flex-col gap-4', Astro.props.className]}>
<div class="grid grid-cols-1 gap-3 md:grid-cols-2 print:flex print:flex-col">
{
applications.map((application: Application) => {
return (
<div class={`${baseClasses}`}>
<a
class={`rounded-xl transition-all duration-300 ${borderClasses} ${bgColorClasses} ${shadowClasses}`}
href={application.url}
>
<div class="p-4 md:p-10">
<div class="flex items-center">
<Logo
srcLight={application.logoUrl}
srcDark={application.logoUrl}
alt={`Logo of ${application.name}`}
/>
<h3 class="text-lg font-bold text-gray-800 dark:text-white ml-4">
{application.name}
</h3>
</div>
<p class="mt-2 text-gray-500 dark:text-neutral-400">{application.description}</p>
<ul class="mt-1 flex list-disc flex-col gap-2 text-sm text-gray-500 dark:text-neutral-400 [&>li]:ml-4">
{application.highlights.map((highlight) => {
return <li class="marker:text-yellow-500">{highlight}</li>;
})}
</ul>
<div class="ml-6 flex">
<div
class="group-hover relative inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50"
>
<div class="group-hover:text-steel dark:group-hover:text-bermuda transition-text relative z-10 mx-auto flex min-h-11 items-center text-sm font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300">
<span class="relative inline-block overflow-hidden"> Visit Page </span>
<Icon
name="mdi:keyboard-arrow-right"
class="translate-y-0.5 transition duration-300 group-hover:translate-x-1"
/>
</div>
</div>
</div>
</div>
</a>
</div>
);
})
}
</div>
</section>

View File

@@ -1,10 +1,12 @@
--- ---
import { Icon } from 'astro-icon/components'; import { Icon } from 'astro-icon/components';
import { readItems } from '@directus/sdk'; import { readItems } from '@directus/sdk';
import Logo from '@components/ui/logos/Logo.astro';
import type { Education } from '@lib/directusTypes'; import type { Education } from '@lib/directusTypes';
import directus from '@lib/directus'; import directus from '@lib/directus';
import { getDirectusImageURL } from '@lib/directusFunctions';
const education = await directus.request( const education = await directus.request(
readItems('site_education', { readItems('site_education', {
@@ -20,7 +22,7 @@ const certificate = await directus.request(
}) })
); );
const baseClasses = ' rounded-xl flex flex-col'; const baseClasses = 'rounded-xl flex flex-col group group-hover';
const borderClasses = 'border border-neutral-100 dark:border-stone-500/20'; const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses = const bgColorClasses =
'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
@@ -35,47 +37,50 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
</h3> </h3>
<div class="ml-8"> <div class="ml-8">
<h4 class="smooth-reveal-1 pt-5 text-2xl font-semibold text-neutral-800 dark:text-neutral-200"> <h4 class="smooth-reveal-1 pt-5 text-2xl font-semibold text-neutral-800 dark:text-neutral-200">
University College
</h4> </h4>
<ul class="space-y-4 py-3"> <ul class="space-y-4 py-3">
<div class="grid md:grid-cols-2 sm:grid-cols-1 gap-4">
{ {
education.map(({ institution, area, url }) => { education.map(({ institution, area, url, graduationDate, logo, logoDark }) => {
return ( return (
<div class="smooth-reveal-cards mt-4 grid grid-cols-3 gap-4 rounded-xl"> <div class="smooth-reveal-cards mt-4 rounded-xl">
<div>
<div
class={`p-4 transition-all duration-300 md:p-5 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`}
>
<h3 class="flex flex-row text-lg font-bold text-neutral-800 dark:text-neutral-200">
<Icon
name="mdi:university-outline"
class="mr-2 h-3 w-3 translate-y-1 md:h-5 md:w-5"
/>
{institution}
</h3>
<p class="mt-2 ml-7 text-xs font-medium text-neutral-600 uppercase dark:text-neutral-400">
{area}
</p>
<div class="ml-6 flex">
<a <a
class="group group-hover relative inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50" class={`p-4 md:p-6 transition-all duration-300 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`}
href={url} href={url}
> >
<div class="group-hover:text-steel dark:group-hover:text-bermuda transition-text relative z-10 mx-auto flex min-h-[44px] items-center text-sm font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300"> <div class="flex items-center">
<Logo
srcLight={getDirectusImageURL(logo)}
srcDark={getDirectusImageURL(logoDark)}
alt={`Logo of ${institution}`}
/>
<h3 class="text-lg font-bold text-neutral-800 dark:text-neutral-200 ml-4">
{institution}
</h3>
</div>
<p class="ml-16 text-xs font-medium text-neutral-600 uppercase dark:text-neutral-400">
{area} - {new Date(graduationDate).getFullYear()}
</p>
<div class="ml-6 flex">
<div
class="group-hover relative inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50"
>
<div class="group-hover:text-steel dark:group-hover:text-bermuda transition-text relative z-10 mx-auto flex min-h-11 items-center text-sm font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300">
<span class="relative inline-block overflow-hidden"> Visit Page </span> <span class="relative inline-block overflow-hidden"> Visit Page </span>
<Icon <Icon
name="mdi:keyboard-arrow-right" name="mdi:keyboard-arrow-right"
class="translate-y-0.5 transition duration-300 group-hover:translate-x-1" class="translate-y-0.5 transition duration-300 group-hover:translate-x-1"
/> />
</div> </div>
</div>
</div>
</a> </a>
</div> </div>
</div>
</div>
</div>
); );
}) })
} }
</div>
</ul> </ul>
</div> </div>
@@ -86,42 +91,43 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
Certificates Certificates
</h4> </h4>
<ul class="space-y-4 py-3"> <ul class="space-y-4 py-3">
{certificate.map(({ name, issuer, url }) => { <div class="grid md:grid-cols-2 sm:grid-cols-1 gap-4">
{certificate.map(({ name, issuer, issuerDate, url, logoName }) => {
return ( return (
<div class="smooth-reveal-cards mt-4 grid grid-cols-3 gap-4 rounded-xl"> <div class="smooth-reveal-cards mt-4 rounded-xl">
<div>
<div
class={`p-4 transition-all duration-300 md:p-5 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`}
>
<h3 class="flex flex-row text-lg font-bold text-neutral-800 dark:text-neutral-200">
<Icon
name="mdi:script-text-outline"
class="mr-2 h-3 w-3 translate-y-1 md:h-5 md:w-5"
/>
{name}
</h3>
<p class="mt-2 ml-7 text-xs font-medium text-neutral-600 uppercase dark:text-neutral-400">
{issuer}
</p>
<div class="ml-6 flex">
<a <a
class="group group-hover relative inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50" class={`p-4 md:p-6 transition-all duration-300 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`}
href={url} href={url}
> >
<div class="group-hover:text-steel dark:group-hover:text-bermuda transition-text relative z-10 mx-auto flex min-h-[44px] items-center text-sm font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300"> <div class="flex items-center">
<div class="text-neutral-800 dark:text-neutral-200">
<Icon name={logoName} class="h-12 w-12" />
</div>
<h3 class="text-lg font-bold text-neutral-800 dark:text-neutral-200 ml-4">
{name}
</h3>
</div>
<p class="ml-16 text-xs font-medium text-neutral-600 uppercase dark:text-neutral-400">
{issuer} - {new Date(issuerDate).getFullYear()}
</p>
<div class="ml-6 flex">
<div
class="group-hover relative inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50"
>
<div class="group-hover:text-steel dark:group-hover:text-bermuda transition-text relative z-10 mx-auto flex min-h-11 items-center text-sm font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300">
<span class="relative inline-block overflow-hidden"> Visit Page </span> <span class="relative inline-block overflow-hidden"> Visit Page </span>
<Icon <Icon
name="mdi:keyboard-arrow-right" name="mdi:keyboard-arrow-right"
class="translate-y-0.5 transition duration-300 group-hover:translate-x-1" class="translate-y-0.5 transition duration-300 group-hover:translate-x-1"
/> />
</div> </div>
</div>
</div>
</a> </a>
</div> </div>
</div>
</div>
</div>
); );
})} })}
</div>
</ul> </ul>
</div> </div>
) )

View File

@@ -15,7 +15,7 @@ const experiences = await directus.request(
--- ---
<section <section
class:list={['flex flex-col gap-4', Astro.props.className]} class:list={['flex flex-col gap-8', Astro.props.className]}
> >
<h3 class="relative smooth-reveal-1 flex w-full items-center gap-3 pb-10 text-5xl text-neutral-800 dark:text-neutral-200">Experience</h3> <h3 class="relative smooth-reveal-1 flex w-full items-center gap-3 pb-10 text-5xl text-neutral-800 dark:text-neutral-200">Experience</h3>

View File

@@ -7,12 +7,12 @@ import FeaturesCard from '@components/ui/cards/FeaturesCard.astro';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
--- ---
<section class="mx-auto mb-20 max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 2xl:max-w-full"> <section class="mx-auto mb-20 max-w-340 px-4 py-10 sm:px-6 lg:px-8 lg:py-14 2xl:max-w-full">
<div <div
class="flex flex-col items-center justify-center gap-y-2 sm:flex-row sm:gap-x-12 sm:gap-y-0 lg:gap-x-24" class="flex flex-col items-center justify-center gap-y-2 sm:flex-row sm:gap-x-12 sm:gap-y-0 lg:gap-x-24"
> >
<div class="mx-auto max-w-5xl px-4 sm:px-6 lg:px-8"> <div class="max-w-5xl sm:px-6 lg:px-8">
<div class="grid gap-3 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3"> <div class="flex flex-wrap gap-6 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3 justify-center">
<FeaturesCard <FeaturesCard
title="Cloud Engineer" title="Cloud Engineer"
description="Full stack and cloud engineer." description="Full stack and cloud engineer."
@@ -25,6 +25,12 @@ const global = await directus.request(readSingleton('site_global'));
url="/categories/homelab/" url="/categories/homelab/"
icon="mdi:home-variant-outline" icon="mdi:home-variant-outline"
/> />
<FeaturesCard
title="Documentation"
description="Reference and guides for my homelab."
url="https://docs.alexlebens.dev"
icon="mdi:file-document-multiple"
/>
<FeaturesCard <FeaturesCard
title="Email" title="Email"
description={`Send me a message.`} description={`Send me a message.`}

View File

@@ -15,11 +15,14 @@ interface Props {
secondaryBtnURL?: string; secondaryBtnURL?: string;
src?: any; src?: any;
alt?: string; alt?: string;
rounded?: boolean;
} }
const roundedClasses = Astro.props.rounded ? "rounded-xl" : null;
--- ---
<section <section
class="mx-auto grid max-w-[85rem] gap-4 px-4 py-14 sm:px-6 md:grid-cols-2 md:items-center md:gap-8 lg:px-8 2xl:max-w-full" class="mx-auto grid max-w-340 gap-4 px-4 py-14 sm:px-6 md:grid-cols-2 md:items-center md:gap-8 lg:px-8 2xl:max-w-full"
> >
<div> <div>
<h1 <h1
@@ -48,7 +51,7 @@ interface Props {
<Image <Image
src={src} src={src}
alt={alt} alt={alt}
class="h-full w-[420px] scale-100 object-cover object-center" class={`h-full w-[420px] scale-100 object-cover object-center ${roundedClasses}`}
draggable="false" draggable="false"
loading="eager" loading="eager"
format="webp" format="webp"

View File

@@ -11,7 +11,7 @@ interface Props {
} }
--- ---
<section class="lg:px- relative mx-auto mb-20 max-w-[85rem] px-4 pt-30 pb-30 sm:px-6"> <section class="lg:px- relative mx-auto mb-20 max-w-340 px-4 pt-30 pb-30 sm:px-6">
<div <div
class="smooth-reveal absolute top-[55%] left-0 scale-90 md:top-[20%] xl:top-[25%] xl:left-[10%]" class="smooth-reveal absolute top-[55%] left-0 scale-90 md:top-[20%] xl:top-[25%] xl:left-[10%]"
> >

View File

@@ -18,16 +18,13 @@ const recentPosts = posts
.slice(0, 3); .slice(0, 3);
--- ---
<section class="mx-auto mb-20 max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 2xl:max-w-full"> <section class="mx-auto mb-20 max-w-340 px-4 py-10 sm:px-6 lg:px-8 lg:py-14 2xl:max-w-full">
<div class="mx-auto mb-10 max-w-2xl text-center lg:mb-14"> <div class="mx-auto mb-10 max-w-2xl text-center lg:mb-14">
<h1 <h1
class="smooth-reveal block text-4xl font-bold text-neutral-800 md:text-5xl md:leading-tight lg:text-5xl dark:text-neutral-200" class="smooth-reveal block text-4xl font-bold text-neutral-800 md:text-5xl md:leading-tight lg:text-5xl dark:text-neutral-200"
> >
Latest Posts Latest Posts
</h1> </h1>
<p class="smooth-reveal mt-1 text-pretty text-neutral-600 dark:text-neutral-300">
More recent posts.
</p>
</div> </div>
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3"> <div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
{recentPosts.map((b) => <BlogCard post={b} />)} {recentPosts.map((b) => <BlogCard post={b} />)}

View File

@@ -13,7 +13,7 @@ const projects = await directus.request(
}) })
); );
const baseClasses = 'smooth-reveal-cards rounded-xl flex flex-col'; const baseClasses = 'smooth-reveal-cards rounded-xl flex flex-col group group-hover';
const borderClasses = 'border border-neutral-100 dark:border-stone-500/20'; const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses = const bgColorClasses =
'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
@@ -31,8 +31,9 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
projects.map((project: Project) => { projects.map((project: Project) => {
return ( return (
<div class={`${baseClasses}`}> <div class={`${baseClasses}`}>
<div <a
class={`rounded-xl transition-all duration-300 ${borderClasses} ${bgColorClasses} ${shadowClasses}`} class={`rounded-xl transition-all duration-300 ${borderClasses} ${bgColorClasses} ${shadowClasses}`}
href={project.source}
> >
<div class="p-4 md:p-10"> <div class="p-4 md:p-10">
<h3 class="text-lg font-bold text-gray-800 dark:text-white">{project.name}</h3> <h3 class="text-lg font-bold text-gray-800 dark:text-white">{project.name}</h3>
@@ -43,31 +44,22 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
})} })}
</ul> </ul>
<div class="flex"> <div class="flex">
<a <div
class="group group-hover relative inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50" class="group group-hover relative inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50"
href={project.url}
> >
<div class="group-hover:text-steel dark:group-hover:text-bermuda transition-text text-md relative z-10 mx-auto flex min-h-[44px] items-center font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300"> <div class="group-hover:text-gitea-primary dark:group-hover:text-gitea-primary transition-text text-md relative z-10 mx-auto flex min-h-11 items-center font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300">
<span class="relative inline-block overflow-hidden"> Visit Page </span> <Icon name="pajamas:gitea" />
<span class="relative inline-block overflow-hidden ml-2"> Visit Source </span>
<Icon <Icon
name="mdi:keyboard-arrow-right" name="mdi:keyboard-arrow-right"
class="translate-y-0.5 transition duration-300 group-hover:translate-x-1" class="translate-y-0.5 transition duration-300 group-hover:translate-x-1"
/> />
</div> </div>
</a> </div>
<a </div>
class="group group-hover relative ml-auto inline-block gap-x-1 rounded-lg border border-transparent disabled:pointer-events-none disabled:opacity-50"
href={project.source}
>
<div class="group-hover:text-gitea-primary dark:group-hover:text-gitea-primary transition-text text-md relative z-10 mx-auto flex min-h-[44px] items-center font-semibold text-neutral-600 decoration-2 duration-300 sm:mx-0 sm:mt-4 dark:text-neutral-300">
<span class="relative inline-block overflow-hidden"> Source </span>
<Icon name="pajamas:gitea" class="ml-2 translate-y-0.5" />
</div> </div>
</a> </a>
</div> </div>
</div>
</div>
</div>
); );
}) })
} }

View File

@@ -54,7 +54,7 @@ const shadowClasses = 'shadow-xs hover:shadow-lg';
<div class="relative h-1.5 w-full overflow-hidden rounded-full bg-stone-500/20 sm:h-2 dark:bg-stone-500/20"> <div class="relative h-1.5 w-full overflow-hidden rounded-full bg-stone-500/20 sm:h-2 dark:bg-stone-500/20">
<div <div
class="progress-bar-animate from-steel via-bermuda to-steel absolute top-0 left-0 h-full rounded-full bg-gradient-to-r transition-all duration-1000" class="progress-bar-animate from-steel via-bermuda to-steel absolute top-0 left-0 h-full rounded-full bg-linear-to-r transition-all duration-1000"
style={`width: ${skill.level}%`} style={`width: ${skill.level}%`}
/> />
</div> </div>
@@ -70,13 +70,13 @@ const shadowClasses = 'shadow-xs hover:shadow-lg';
} }
</div> </div>
<!-- Gradient overlays for smooth fade effect --> <!-- Gradient overlays -->
<div <div
class="absolute top-0 bottom-0 left-0 z-10 w-12 bg-gradient-to-r from-neutral-200 to-transparent sm:w-24 dark:from-stone-700" class="absolute top-0 bottom-0 left-0 z-10 w-12 bg-linear-to-r from-neutral-200 to-transparent sm:w-24 dark:from-stone-700"
> >
</div> </div>
<div <div
class="absolute top-0 right-0 bottom-0 z-10 w-12 bg-gradient-to-l from-neutral-200 to-transparent sm:w-24 dark:from-stone-700" class="absolute top-0 right-0 bottom-0 z-10 w-12 bg-linear-to-l from-neutral-200 to-transparent sm:w-24 dark:from-stone-700"
> >
</div> </div>
</div> </div>
@@ -85,7 +85,7 @@ const shadowClasses = 'shadow-xs hover:shadow-lg';
<script> <script>
document.addEventListener('astro:page-load', () => { document.addEventListener('astro:page-load', () => {
// Create seamless infinite scrolling effect // Create infinite scrolling effect
function setupInfiniteScroll() { function setupInfiniteScroll() {
const cards = document.querySelectorAll('.skill-card'); const cards = document.querySelectorAll('.skill-card');
if (!cards.length) return; if (!cards.length) return;

View File

@@ -0,0 +1,58 @@
---
import { getFiveDayForecast } from '@support/weather';
const { latitude = "44.95", longitude = "-93.09", cityName = "St. Paul, Minnesota" } = Astro.props;
const { forecastDays, error } = await getFiveDayForecast(latitude, longitude);
const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses = 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg';
---
<section class="mx-auto mb-20 max-w-340 px-4 py-10 sm:px-6 lg:px-8 lg:py-14 2xl:max-w-full">
<div class="mx-auto mb-10 max-w-2xl text-center lg:mb-14">
<h1 class="smooth-reveal block text-4xl font-bold text-neutral-800 md:text-5xl md:leading-tight lg:text-5xl dark:text-neutral-200">
Weather in my Area
</h1>
<div class="smooth-reveal mx-auto mt-5 max-w-3xl text-center">
<p class="text-lg text-pretty text-neutral-600 dark:text-neutral-400">
5 day forecast for {cityName}
</p>
</div>
</div>
{error ? (
<div class={`rounded-xl p-10 text-center text-yellow-500 ${borderClasses} ${bgColorClasses}`}>
{error}
</div>
) : (
<div class="flex flex-wrap justify-center gap-4 lg:gap-6">
{forecastDays.map((day) => (
<div class="smooth-reveal-2 group flex flex-col">
<div class={`rounded-xl duration-300 transition-all w-32 md:w-44 ${borderClasses} ${bgColorClasses} ${shadowClasses}`}>
<div class="p-4 text-center">
<span class="block text-xs font-bold tracking-widest text-neutral-500 uppercase dark:text-neutral-400">
{day.dayName}
</span>
<div class="flex justify-center my-2">
<img
src={`https://openweathermap.org/img/wn/${day.icon}@2x.png`}
alt={day.label}
class="h-12 w-12 drop-shadow-sm group-hover:scale-110 transition-transform duration-300"
/>
</div>
<div class="mt-2">
<span class="group-hover:text-steel dark:group-hover:text-bermuda transition-all duration-300 block text-2xl font-bold text-neutral-600 dark:text-neutral-300">
{day.temp}°F
</span>
<span class="mt-1 block text-xs text-neutral-500 dark:text-neutral-400 capitalize">
{day.label}
</span>
</div>
</div>
</div>
</div>
))}
</div>
)}
</section>

View File

@@ -2,47 +2,25 @@ import { readSingleton } from '@directus/sdk';
import directus from '@lib/directus'; import directus from '@lib/directus';
const global = await directus.request(readSingleton('site_global'));
export interface NavigationLink { export interface NavigationLink {
name: string; name: string;
url: string; url: string;
} }
const global = await directus.request(readSingleton('site_global'));
export const WorkInformation = [
{
name: 'Tech Startup',
position: 'Junior Web Developer',
location_type: 'On site',
location: 'Auckland, New Zealand',
url: 'https://techstartup.com',
startDate: '2024-01-01',
endDate: null,
summary:
'Developing and maintaining web applications using JavaScript, HTML, and CSS. Collaborating with the team to implement new features and fix bugs.',
highlights: ['Improved website performance by optimizing code'],
responsibilities: [
'Collaborated with senior developers to design and implement web applications using modern JavaScript frameworks.',
'Assisted in debugging and optimizing front-end code to ensure smooth user experiences.',
'Participated in code reviews and contributed to improving coding standards within the team.',
],
achievements: [
'Developing and maintaining web applications using JavaScript, HTML, and CSS. Collaborating with the team to implement new features and fix bugs.',
],
skills: ['React', 'Tailwind', 'GitHub'],
},
];
export const NavigationLinks: NavigationLink[] = [ export const NavigationLinks: NavigationLink[] = [
{ name: 'Home', url: '/' }, { name: 'Home', url: '/' },
{ name: 'Blog', url: '/blog/' }, { name: 'Blog', url: '/blog/' },
{ name: 'Categories', url: '/categories/' }, { name: 'Categories', url: '/categories/' },
{ name: 'Apps', url: '/apps/' },
{ name: 'About Me', url: '/about/' }, { name: 'About Me', url: '/about/' },
]; ];
export const FooterLinks: NavigationLink[] = [ export const FooterLinks: NavigationLink[] = [
{ name: 'RSS', url: '/rss.xml' }, { name: 'RSS', url: '/rss.xml' },
{ name: 'Gitea', url: '/https://gitea.alexlebens.dev' }, { name: 'Gitea', url: 'https://gitea.alexlebens.dev' },
{ name: 'Docs', url: 'https://docs.alexlebens.dev' },
]; ];
export const SEO = { export const SEO = {

BIN
src/images/cedar_tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 MiB

View File

@@ -55,13 +55,7 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
</script> </script>
</head> </head>
<body class="bg-stone-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-stone-700"> <body class="bg-stone-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-stone-700">
<!-- <div class="fixed inset-0 -z-10"> <div class="mx-auto w-full max-w-(--breakpoint-2xl) grow px-4 sm:px-6 lg:px-8">
<div
class="bg-grid-pattern absolute inset-0 [mask-image:radial-gradient(white,transparent_85%)] bg-[center_top_-1px]"
>
</div>
</div> -->
<div class="mx-auto w-full max-w-(--breakpoint-2xl) flex-grow px-4 sm:px-6 lg:px-8">
<Header /> <Header />
<main class="min-h-screen"> <main class="min-h-screen">
<slot /> <slot />

View File

@@ -2,7 +2,9 @@ import { createDirectus, rest } from '@directus/sdk';
import type { import type {
Global, Global,
Weather,
Post, Post,
Application,
Experience, Experience,
Education, Education,
Certificate, Certificate,
@@ -14,7 +16,9 @@ import { getDirectusURL } from '@lib/directusFunctions';
type Schema = { type Schema = {
site_global: Global; site_global: Global;
site_weather: Weather;
posts: Post[]; posts: Post[];
site_applications: Application;
site_experience: Experience; site_experience: Experience;
site_education: Education; site_education: Education;
site_certificate: Certificate; site_certificate: Certificate;

View File

@@ -2,7 +2,7 @@ const getDirectusURL = () => {
if (process.env.DIRECTUS_URL) { if (process.env.DIRECTUS_URL) {
return `https://${process.env.DIRECTUS_URL}`; return `https://${process.env.DIRECTUS_URL}`;
} }
return 'https://directus.alexlebens.dev'; return 'https://directus.alexlebens.net';
}; };
async function getDirectusImageURL(image: string) { async function getDirectusImageURL(image: string) {

View File

@@ -2,6 +2,9 @@ export type Global = {
name: string; name: string;
about: string; about: string;
about_description: string; about_description: string;
about_blog: string;
about_applications: string;
about_categories: string;
initials: string; initials: string;
email: string; email: string;
site_url: string; site_url: string;
@@ -10,14 +13,23 @@ export type Global = {
portrait_alt: string; portrait_alt: string;
home_image: string; home_image: string;
home_image_alt: string; home_image_alt: string;
categories_image: string;
categories_image_alt: string;
blog_image: string; blog_image: string;
blog_image_alt: string; blog_image_alt: string;
categories_image: string;
categories_image_alt: string;
applications_image: string;
applications_image_alt: string;
footer_image: string; footer_image: string;
footer_image_alt: string; footer_image_alt: string;
}; };
export type Weather = {
id: string;
location: string;
latitude: string;
longitude: string;
}
export type Post = { export type Post = {
slug: string; slug: string;
title: string; title: string;
@@ -35,6 +47,16 @@ export type Post = {
updated_date: Date; updated_date: Date;
}; };
export type Application = {
id: string;
name: string;
isActive: boolean;
description: string;
highlights: string[];
url: string;
logoUrl: string;
};
export type Experience = { export type Experience = {
id: string; id: string;
name: string; name: string;
@@ -58,6 +80,8 @@ export type Education = {
area: string; area: string;
studyType: string; studyType: string;
graduationDate: string; graduationDate: string;
logo: string;
logoDark: string;
}; };
export type Certificate = { export type Certificate = {
@@ -66,6 +90,7 @@ export type Certificate = {
issuer: string; issuer: string;
issuerDate: string; issuerDate: string;
url: string; url: string;
logoName: string;
}; };
export type Project = { export type Project = {

View File

@@ -29,7 +29,7 @@ const global = await directus.request(readSingleton('site_global'));
}} }}
> >
<section class="mt-20 grid place-content-center"> <section class="mt-20 grid place-content-center">
<div class="mx-auto max-w-screen-xl px-4 py-8 lg:px-6 lg:py-16"> <div class="mx-auto max-w-7xl px-4 py-8 lg:px-6 lg:py-16">
<div class="mx-auto max-w-screen-sm text-center"> <div class="mx-auto max-w-screen-sm text-center">
<div class="glitch-wrapper smooth-reveal"> <div class="glitch-wrapper smooth-reveal">
<h1 <h1

View File

@@ -11,13 +11,11 @@ import Education from '@components/ui/sections/Education.astro';
import portraitImg from '@images/portrait.avif'; import portraitImg from '@images/portrait.avif';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
const description = 'About me.';
--- ---
<BaseLayout <BaseLayout
title="About Me" title="About Me"
description={description} description="About me."
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -25,7 +23,7 @@ const description = 'About me.';
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `About | ${global.name}`, name: `About | ${global.name}`,
description: description, description: 'About me.',
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -39,11 +37,12 @@ const description = 'About me.';
subTitle={global.about} subTitle={global.about}
src={portraitImg} src={portraitImg}
alt={global.portrait_alt} alt={global.portrait_alt}
rounded={true}
/> />
<section class="mx-auto max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14"> <section class="mx-auto max-w-340 px-4 py-10 sm:px-6 lg:px-8 lg:py-14">
<main class="relative grid max-w-7xl gap-12 p-8 max-sm:py-16 md:grid-cols-6 md:p-16 xl:gap-24"> <main class="relative grid grid-cols-1 md:grid-cols-6 gap-12 p-8 md:p-16 xl:gap-24 max-w-7xl mx-auto">
<div class="space-y-12 md:col-span-8"> <div class="space-y-12 col-span-1 md:col-span-6">
<Experience className="smooth-reveal-2" /> <Experience className="smooth-reveal-2" />
<Education className="smooth-reveal-2 mt-30" /> <Education className="smooth-reveal-2 mt-30" />
<Projects className="smooth-reveal-2 mt-30" /> <Projects className="smooth-reveal-2 mt-30" />

66
src/pages/apps.astro Normal file
View File

@@ -0,0 +1,66 @@
---
import { readSingleton } from '@directus/sdk';
import directus from '@lib/directus';
import BaseLayout from '@layouts/BaseLayout.astro';
import HeroSection from '@components/ui/sections/HeroSection.astro';
import Applications from '@components/ui/sections/Applications.astro';
import applicationImg from '@images/cedar_tree.png';
const global = await directus.request(readSingleton('site_global'));
---
<BaseLayout
title="Applications"
description={global.about_applications}
structuredData={{
'@context': 'https://schema.org',
'@type': 'WebPage',
inLanguage: 'en-US',
'@id': Astro.url.href,
url: Astro.url.href,
name: `Applications | ${global.name}`,
description: global.about_applications,
isPartOf: {
'@type': 'WebSite',
url: global.site_url,
name: global.name,
description: global.about,
},
}}
>
<HeroSection
title="Applications"
subTitle={global.about_applications}
src={applicationImg}
alt={global.applications_image_alt}
/>
<section class="mx-auto max-w-340 px-4 sm:px-6 lg:px-8 lg:py-14 pb-10">
<main class="relative grid grid-cols-1 md:grid-cols-6 gap-12 p-2 md:p-16 xl:gap-24 max-w-7xl mx-auto">
<div class="space-y-12 col-span-1 md:col-span-6">
<Applications className="smooth-reveal-2" />
</div>
</main>
</section>
</BaseLayout>
<script>
// Add smooth reveal animations for content after loading
document.addEventListener('astro:page-load', () => {
const animateContent = () => {
// Animate group 1
const smoothReveal = document.querySelectorAll('.smooth-reveal');
smoothReveal.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
50 + index * 100
);
});
};
animateContent();
});
</script>

View File

@@ -4,6 +4,9 @@ import getReadingTime from 'reading-time';
import { readItems, readSingleton } from '@directus/sdk'; import { readItems, readSingleton } from '@directus/sdk';
import directus from '@lib/directus'; import directus from '@lib/directus';
import { marked } from 'marked';
import markedShiki from 'marked-shiki';
import { createHighlighter } from 'shiki';
import { getDirectusImageURL } from '@lib/directusFunctions'; import { getDirectusImageURL } from '@lib/directusFunctions';
import BaseLayout from '@layouts/BaseLayout.astro'; import BaseLayout from '@layouts/BaseLayout.astro';
import Image from '@components/ui/images/Image.astro'; import Image from '@components/ui/images/Image.astro';
@@ -23,6 +26,24 @@ const category: CollectionEntry<'categories'> = (await getCollection('categories
.filter((c) => c.slug === post.category) .filter((c) => c.slug === post.category)
.pop() as CollectionEntry<'categories'>; .pop() as CollectionEntry<'categories'>;
const readingTime = getReadingTime(post.content); const readingTime = getReadingTime(post.content);
const highlighter = await createHighlighter({
themes: ['github-light', 'github-dark', 'monokai'],
langs: ['typescript', 'python', 'css', 'html', 'yaml', 'bash', 'json'],
});
marked.use(markedShiki({
highlight(code, lang) {
return highlighter.codeToHtml(code, {
lang: lang || 'plaintext',
themes: {
light: 'github-light',
dark: 'github-dark',
},
defaultColor: false,
});
}
}));
const content = marked.parse(post.content);
--- ---
<BaseLayout <BaseLayout
@@ -124,9 +145,9 @@ const readingTime = getReadingTime(post.content);
</div> </div>
<article <article
class="prose prose-blog sm:prose-lg dark:prose-invert max-w-none text-justify text-neutral-800 dark:text-neutral-200" class="prose prose-blog sm:prose-lg dark:prose-invert max-w-none text-neutral-800 dark:text-neutral-200"
> >
<div set:html={post.content} /> <div set:html={content} />
</article> </article>
<div <div

View File

@@ -5,8 +5,8 @@ import type { Post } from '@lib/directusTypes';
import directus from '@lib/directus'; import directus from '@lib/directus';
import BaseLayout from '@layouts/BaseLayout.astro'; import BaseLayout from '@layouts/BaseLayout.astro';
import BlogRecentCard from '@components/blog/BlogRecentCard.astro'; import BlogSelectedArticles from '@components/blog/BlogSelectedArticles.astro';
import BlogFeaturedArticle from '@components/blog/BlogFeaturedArticle.astro'; import BlogRecentArticles from '@components/blog/BlogRecentArticles.astro';
import HeroSection from '@components/ui/sections/HeroSection.astro'; import HeroSection from '@components/ui/sections/HeroSection.astro';
import blogImg from '@images/autumn_tree.png'; import blogImg from '@images/autumn_tree.png';
@@ -18,15 +18,15 @@ const posts = await directus.request(
sort: ['-published_date'], sort: ['-published_date'],
}) })
); );
const selectedPosts: Post[] = posts.filter((p) => p.selected); const selectedPosts: Post[] = posts.filter((p) => p.selected).slice(0, 4);
const recentPosts: Post[] = posts.filter(
const description = (p) => !selectedPosts.some((selected) => selected.slug === p.slug)
"Sharing what I've learned, one post at a time. I hope you find something useful."; ).slice(0, 6);
--- ---
<BaseLayout <BaseLayout
title="Blog" title="Blog"
description={description} description={global.about_blog}
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -34,7 +34,7 @@ const description =
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `Blog | ${global.name}`, name: `Blog | ${global.name}`,
description: description, description: global.about_blog,
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -43,10 +43,10 @@ const description =
}, },
}} }}
> >
<HeroSection title="Blog" subTitle={description} src={blogImg} alt={global.blog_image_alt} /> <HeroSection title="Blog" subTitle={global.about_blog} src={blogImg} alt={global.blog_image_alt} />
<BlogRecentCard posts={posts} /> <BlogSelectedArticles posts={selectedPosts} />
<BlogFeaturedArticle posts={selectedPosts} /> <BlogRecentArticles posts={recentPosts} />
</BaseLayout> </BaseLayout>
<script> <script>

View File

@@ -73,14 +73,11 @@ const categories = (await getCollection('categories'))
}, },
}; };
}); });
const description =
'Here are some of the general categories that I am interested in, including homelabs, technology, and Minnesota.';
--- ---
<BaseLayout <BaseLayout
title="All Categories" title="All Categories"
description={description} description={global.about_categories}
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -88,7 +85,7 @@ const description =
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `All Categories | ${global.name}`, name: `All Categories | ${global.name}`,
description: description, description: global.about_categories,
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -99,7 +96,7 @@ const description =
> >
<HeroSection <HeroSection
title="Categories" title="Categories"
subTitle={description} subTitle={global.about_categories}
src={categoryImg} src={categoryImg}
alt={global.categories_image_alt} alt={global.categories_image_alt}
/> />

View File

@@ -5,19 +5,18 @@ import directus from '@lib/directus';
import BaseLayout from '@layouts/BaseLayout.astro'; import BaseLayout from '@layouts/BaseLayout.astro';
import HeroSection from '@components/ui/sections/HeroSection.astro'; import HeroSection from '@components/ui/sections/HeroSection.astro';
import FeaturesSection from '@components/ui/sections/FeaturesSection.astro'; import FeaturesSection from '@components/ui/sections/FeaturesSection.astro';
import WeatherSection from '@components/ui/sections/WeatherSection.astro';
import LatestPosts from '@components/ui/sections/LatestPosts.astro'; import LatestPosts from '@components/ui/sections/LatestPosts.astro';
import HeroSectionAlt from '@components/ui/sections/HeroSectionAlt.astro'; import HeroSectionAlt from '@components/ui/sections/HeroSectionAlt.astro';
import homeImg from '@images/autumn_mountain.png'; import homeImg from '@images/autumn_mountain.png';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
const weather = await directus.request(readSingleton('site_weather'));
const description =
'Engineering the cloud by day, homelab by night, and exploring Minnesota in between.';
--- ---
<BaseLayout <BaseLayout
title="Home" title="Home"
description={description} description={global.about_description}
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -25,7 +24,7 @@ const description =
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `Home | ${global.name}`, name: `Home | ${global.name}`,
description: description, description: global.about_description,
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -36,7 +35,7 @@ const description =
> >
<HeroSection <HeroSection
title={`Hello, I'm <span class="text-steel dark:text-steel">Alex Lebens</span>`} title={`Hello, I'm <span class="text-steel dark:text-steel">Alex Lebens</span>`}
subTitle={description} subTitle={global.about_description}
primaryBtn="About Me" primaryBtn="About Me"
primaryBtnURL="/about" primaryBtnURL="/about"
src={homeImg} src={homeImg}
@@ -45,6 +44,12 @@ const description =
<FeaturesSection /> <FeaturesSection />
<WeatherSection
latitude={weather.latitude}
longitude={weather.longitude}
cityName={weather.location}
/>
<LatestPosts /> <LatestPosts />
<HeroSectionAlt <HeroSectionAlt

View File

@@ -1,8 +1,5 @@
// copy from https://github.com/delucis/astro-blog-full-text-rss // From https://github.com/delucis/astro-blog-full-text-rss
// see https://github.com/delucis/astro-blog-full-text-rss/blob/latest/src/pages/rss.xml.ts
// get more context
import { getContainerRenderer as getMDXRenderer } from '@astrojs/mdx';
import rss, { type RSSFeedItem } from '@astrojs/rss'; import rss, { type RSSFeedItem } from '@astrojs/rss';
import type { APIContext } from 'astro'; import type { APIContext } from 'astro';
import { transform, walk } from 'ultrahtml'; import { transform, walk } from 'ultrahtml';
@@ -14,13 +11,11 @@ import directus from '@lib/directus';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
export async function GET(context: APIContext) { export async function GET(context: APIContext) {
// Get the URL to prepend to relative site links. Based on `site` in `astro.config.mjs`.
let baseUrl = context.site?.href || global.site_url; let baseUrl = context.site?.href || global.site_url;
if (baseUrl.at(-1) === '/') { if (baseUrl.at(-1) === '/') {
baseUrl = baseUrl.slice(0, -1); baseUrl = baseUrl.slice(0, -1);
} }
// Load the content collection entries to add to our RSS feed.
const posts = await directus.request( const posts = await directus.request(
readItems('posts', { readItems('posts', {
filter: { published: { _eq: true } }, filter: { published: { _eq: true } },
@@ -48,7 +43,6 @@ export async function GET(context: APIContext) {
feedItems.push({ ...post, link: `/blog/${post.slug}/`, content }); feedItems.push({ ...post, link: `/blog/${post.slug}/`, content });
} }
// Return our RSS feed XML response.
return rss({ return rss({
title: global.name, title: global.name,
description: global.about, description: global.about,

View File

@@ -7,7 +7,7 @@
/* https://tailwindcss.com/docs/dark-mode */ /* https://tailwindcss.com/docs/dark-mode */
@custom-variant dark (&:where(.dark, .dark *)); @custom-variant dark (&:where(.dark, .dark *));
/* Add custom colors */ /* Custom colors */
@theme { @theme {
--color-midnight: #0c354d; --color-midnight: #0c354d;
--color-turquoise: #0da797; --color-turquoise: #0da797;
@@ -60,6 +60,30 @@
color var(--theme-transition), color var(--theme-transition),
border-color var(--theme-transition); border-color var(--theme-transition);
} }
/* Shiki syntax highlighting */
:root {
--shiki-fg: var(--shiki-light);
--shiki-bg: var(--color-neutral-200);
}
.dark {
--shiki-fg: var(--shiki-dark);
--shiki-bg: var(--color-neutral-800);
}
pre.shiki {
background-color: var(--shiki-bg) !important;
color: var(--shiki-fg) !important;
}
pre.shiki span {
color: var(--shiki-light);
}
.dark pre.shiki span {
color: var(--shiki-dark) !important;
}
} }
/* Content reveal animations */ /* Content reveal animations */

View File

@@ -1,6 +1,6 @@
import fs from 'node:fs/promises'; import fs from 'node:fs/promises';
export interface BlurImageMetadata { interface BlurImageMetadata {
/** /**
* The width of the origin image * The width of the origin image
*/ */
@@ -23,7 +23,7 @@ export interface BlurImageMetadata {
blurHeight: number; blurHeight: number;
} }
export async function blurStyle(filePath: string) { async function blurStyle(filePath: string) {
const image = await blurImageMetadata(filePath); const image = await blurImageMetadata(filePath);
const svg = blurImageSVG(image); const svg = blurImageSVG(image);
return { return {
@@ -64,3 +64,5 @@ async function blurImageMetadata(filepath: string): Promise<BlurImageMetadata> {
return { blurDataURL, blurHeight, blurWidth, width, height }; return { blurDataURL, blurHeight, blurWidth, width, height };
} }
export { blurStyle };

View File

@@ -1,6 +1,6 @@
import { join } from 'node:path'; import { join } from 'node:path';
export function resolveFilePath(path: string) { function resolveFilePath(path: string) {
if (path.startsWith('/')) { if (path.startsWith('/')) {
return resolveFilePathPublic(path); return resolveFilePathPublic(path);
} }
@@ -8,12 +8,14 @@ export function resolveFilePath(path: string) {
return resolveFilePathInternal(path); return resolveFilePathInternal(path);
} }
export function resolveFilePathPublic(path: string) { function resolveFilePathPublic(path: string) {
return join(process.cwd(), path); return join(process.cwd(), path);
} }
export function resolveFilePathInternal(path: string) { function resolveFilePathInternal(path: string) {
const normalizePath = path.startsWith('@') ? path.replace('@', '') : path; const normalizePath = path.startsWith('@') ? path.replace('@', '') : path;
return join(process.cwd(), 'src/', normalizePath); return join(process.cwd(), 'src/', normalizePath);
} }
export { resolveFilePath, resolveFilePathPublic, resolveFilePathInternal };

67
src/support/weather.ts Normal file
View File

@@ -0,0 +1,67 @@
interface DayForecast {
date: string;
temp: number;
code: number;
label: string;
icon: string;
dayName: string;
}
interface WeatherResult {
forecastDays: DayForecast[];
error: string | null;
}
const getWeatherInfo = (code: number) => {
if (code === 0) return { label: 'Clear', icon: '01d' };
if (code >= 1 && code <= 3) return { label: 'Partly Cloudy', icon: '02d' };
if (code === 45 || code === 48) return { label: 'Foggy', icon: '50d' };
if (code >= 51 && code <= 55) return { label: 'Drizzle', icon: '09d' };
if (code >= 61 && code <= 65) return { label: 'Rainy', icon: '10d' };
if (code === 66 || code === 67) return { label: 'Freezing Rain', icon: '13d' };
if (code >= 71 && code <= 75) return { label: 'Snowy', icon: '13d' };
if (code === 77) return { label: 'Snow Grains', icon: '13d' };
if (code >= 80 && code <= 82) return { label: 'Showers', icon: '09d' };
if (code === 85 || code === 86) return { label: 'Snow Showers', icon: '13d' };
if (code >= 95 && code <= 99) return { label: 'Stormy', icon: '11d' };
return { label: 'Unknown', icon: '03d' };
};
const getDayName = (dateStr: string) => {
return new Date(dateStr).toLocaleDateString('en-US', { weekday: 'short' });
};
async function getFiveDayForecast(latitude: string, longitude: string): Promise<WeatherResult> {
const url = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&daily=weather_code,temperature_2m_max&timezone=auto&temperature_unit=fahrenheit`;
try {
const response = await fetch(url);
if (!response.ok) throw new Error("Weather service unavailable");
const data = await response.json();
const forecastDays = data.daily.time.map((date: string, index: number): DayForecast => {
const code = data.daily.weather_code[index];
const info = getWeatherInfo(code);
return {
date,
temp: Math.round(data.daily.temperature_2m_max[index]),
code,
label: info.label,
icon: info.icon,
dayName: getDayName(date)
};
}).slice(0, 5);
return { forecastDays, error: null };
} catch (e: unknown) {
return {
forecastDays: [],
error: e instanceof Error ? e.message : "An unexpected error occurred"
};
}
}
export { getFiveDayForecast };