Compare commits

..

133 Commits

Author SHA1 Message Date
b222c70b34 fix(deps): update astro monorepo
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / guarddog (pull_request) Successful in 31s
test-build / build (pull_request) Successful in 1m47s
2026-03-16 05:03:44 +00:00
e3179b0480 feat: remove react
All checks were successful
renovate / renovate (push) Successful in 1m17s
test-build / guarddog (push) Successful in 1m8s
test-build / build (push) Successful in 2m3s
2026-03-16 00:00:26 -05:00
c4104a52d1 feat: revert shiki css changes 2026-03-16 00:00:13 -05:00
954112e30e feat: add fallback to run animations on switch
All checks were successful
test-build / guarddog (push) Successful in 21s
renovate / renovate (push) Successful in 58s
test-build / build (push) Successful in 1m51s
2026-03-15 23:50:04 -05:00
f35c73b028 feat: downgrade to astro 5
All checks were successful
test-build / guarddog (push) Successful in 17s
test-build / build (push) Successful in 1m49s
renovate / renovate (push) Successful in 2m20s
2026-03-15 23:40:08 -05:00
5cf1cd30d8 chore(deps): update deps
All checks were successful
renovate / renovate (push) Successful in 32s
test-build / guarddog (push) Successful in 40s
test-build / build (push) Successful in 2m19s
2026-03-15 23:11:38 -05:00
787479e077 feat: add fallback 2026-03-15 23:01:12 -05:00
91c9a4bb91 feat: add semantic-release/npm
All checks were successful
renovate / renovate (push) Successful in 40s
test-build / guarddog (push) Successful in 23s
test-build / build (push) Successful in 1m31s
2026-03-15 22:51:05 -05:00
220c29f4f7 feat: add fallback
All checks were successful
renovate / renovate (push) Successful in 49s
test-build / guarddog (push) Successful in 1m2s
test-build / build (push) Successful in 2m15s
2026-03-15 22:44:07 -05:00
dfeb181a1d feat: consolidate css into tailwind
Some checks failed
test-build / guarddog (push) Successful in 18s
renovate / renovate (push) Successful in 34s
test-build / build (push) Has been cancelled
2026-03-15 22:38:23 -05:00
641c7cb33f feat: move scripts to script folder
All checks were successful
renovate / renovate (push) Successful in 26s
test-build / guarddog (push) Successful in 3m51s
test-build / build (push) Successful in 4m40s
2026-03-15 21:53:59 -05:00
93a53cab3d feat: refactor static paths and photoswipe on blog page, move script to base layout
All checks were successful
test-build / guarddog (push) Successful in 31s
renovate / renovate (push) Successful in 39s
test-build / build (push) Successful in 1m39s
2026-03-15 21:44:40 -05:00
a6c889f76a fix: change execution mode 2026-03-15 21:10:08 -05:00
9319228ef6 feat: change paths 2026-03-15 20:02:27 -05:00
148fe8eeff feat: add and update pre-commit
All checks were successful
test-build / guarddog (push) Successful in 17s
test-build / build (push) Successful in 4m8s
renovate / renovate (push) Successful in 1m35s
2026-03-15 16:56:54 -05:00
8d1d47dc4f fix: handle script with swup
All checks were successful
test-build / guarddog (push) Successful in 33s
test-build / build (push) Successful in 1m41s
renovate / renovate (push) Successful in 1m26s
2026-03-14 13:17:33 -05:00
7b8fb380d4 feat: enable prerender pending resoltuion of server island fix
All checks were successful
test-build / guarddog (push) Successful in 30s
test-build / build (push) Successful in 1m55s
renovate / renovate (push) Successful in 1m15s
2026-03-13 11:39:59 -05:00
500d9e2ea0 feat: move script handling to use swup instead of astro transitions, move animations to baselayout
All checks were successful
renovate / renovate (push) Successful in 41s
test-build / build (push) Successful in 1m25s
test-build / guarddog (push) Successful in 1m43s
2026-03-13 10:59:25 -05:00
70a94990e2 feat: remove astro features that are replaced by swup 2026-03-13 10:35:15 -05:00
d0f10986cd feat: improve category cards spacing, overflow, and add fade effect to edges
All checks were successful
test-build / guarddog (push) Successful in 23s
renovate / renovate (push) Successful in 1m42s
test-build / build (push) Successful in 1m48s
2026-03-13 10:18:04 -05:00
629403fdde feat: adjustment to spacing 2026-03-13 10:17:39 -05:00
43f0f7b324 feat: test placing weather section below posts
All checks were successful
renovate / renovate (push) Successful in 2m8s
test-build / guarddog (push) Successful in 24s
test-build / build (push) Successful in 6m32s
2026-03-13 09:26:45 -05:00
eab6e0c31d feat: disable prerender pending resoltuion of server island fix 2026-03-13 09:25:52 -05:00
805cb28185 feat: add scripts to clear and run from scratch
All checks were successful
test-build / guarddog (push) Successful in 31s
renovate / renovate (push) Successful in 45s
test-build / build (push) Successful in 1m32s
2026-03-13 01:35:14 -05:00
54c82a7f79 fix: function needing paranthensis 2026-03-13 01:34:32 -05:00
9a62f867f1 ci: minor tweaks to args and env 2026-03-13 01:34:02 -05:00
0bef13c414 feat: copy package.json
All checks were successful
test-build / guarddog (push) Successful in 30s
renovate / renovate (push) Successful in 52s
test-build / build (push) Successful in 2m10s
2026-03-12 22:18:06 -05:00
0dfcc25984 feat: disable security feature
All checks were successful
test-build / guarddog (push) Successful in 28s
test-build / build (push) Successful in 1m34s
renovate / renovate (push) Successful in 31s
2026-03-12 18:05:46 -05:00
4c8665ebe2 feat: use alpine-dev for bun builder
All checks were successful
test-build / guarddog (push) Successful in 24s
renovate / renovate (push) Successful in 28s
test-build / build (push) Successful in 3m51s
2026-03-12 16:26:17 -05:00
d083660f1c ci: make registry an arg 2026-03-12 15:44:42 -05:00
e9a8b6de97 ci: reorder release workflow
All checks were successful
renovate / renovate (push) Successful in 36s
2026-03-12 15:14:34 -05:00
578e1661cd fix: use semantic release outputs
All checks were successful
renovate / renovate (push) Successful in 1m11s
2026-03-12 15:07:38 -05:00
7882c3ecc7 feat: remove old release workflows
All checks were successful
renovate / renovate (push) Successful in 1m8s
2026-03-12 14:41:45 -05:00
db79f912ee fix: incorrect name of step 2026-03-12 14:41:25 -05:00
36eaa0c132 feat: add outputs of semantic release
All checks were successful
test-build / guarddog (push) Successful in 20s
renovate / renovate (push) Successful in 1m25s
test-build / build (push) Successful in 3m17s
2026-03-12 14:30:23 -05:00
24c837cf84 feat: change release format 2026-03-12 14:25:28 -05:00
f32b75e31d feat: install deps
All checks were successful
renovate / renovate (push) Successful in 1m10s
2026-03-12 14:20:25 -05:00
ce75e7ca5e feat: add if to ignore harbor release result
All checks were successful
renovate / renovate (push) Successful in 58s
2026-03-12 14:13:19 -05:00
bf3a7ef261 feat: setup node for semantic release
All checks were successful
renovate / renovate (push) Successful in 1m41s
2026-03-12 14:08:57 -05:00
cae8cd3a39 chore(deps): update deps
All checks were successful
test-build / guarddog (push) Successful in 27s
renovate / renovate (push) Successful in 1m21s
test-build / build (push) Successful in 2m40s
2026-03-12 14:02:50 -05:00
620b496957 feat: add semantic release 2026-03-12 14:01:14 -05:00
4b58117454 feat: ignore on docs updates
All checks were successful
renovate / renovate (push) Successful in 28s
2026-03-12 13:55:39 -05:00
68f2080bda feat: add release branch, update and merge release workflow
All checks were successful
test-build / guarddog (push) Successful in 50s
renovate / renovate (push) Successful in 58s
test-build / build (push) Successful in 4m4s
2026-03-12 13:54:11 -05:00
07fa86b17c feat: remove release-please
All checks were successful
renovate / renovate (push) Successful in 58s
test-build / guarddog (push) Successful in 1m16s
test-build / build (push) Successful in 3m22s
2026-03-12 13:26:28 -05:00
1577ee4c27 feat: use different workflow for gitea
Some checks failed
test-build / guarddog (push) Successful in 21s
renovate / renovate (push) Successful in 39s
test-build / build (push) Successful in 3m2s
release-image-harbor / release-please (push) Failing after 2m39s
release-image-gitea / release-please (push) Failing after 2m41s
release-image-harbor / build (push) Has been skipped
release-image-harbor / guarddog (push) Has been skipped
release-image-gitea / build (push) Has been skipped
release-image-gitea / guarddog (push) Has been skipped
release-image-harbor / release (push) Has been skipped
release-image-gitea / release (push) Has been skipped
2026-03-12 13:05:12 -05:00
e0a3d391b3 feat: add token
Some checks failed
release-image-harbor / release-please (push) Failing after 6s
release-image-harbor / build (push) Has been skipped
release-image-harbor / guarddog (push) Has been skipped
release-image-harbor / release (push) Has been skipped
renovate / renovate (push) Successful in 30s
release-image-gitea / release-please (push) Failing after 38s
release-image-gitea / build (push) Has been skipped
release-image-gitea / guarddog (push) Has been skipped
release-image-gitea / release (push) Has been skipped
test-build / guarddog (push) Successful in 58s
test-build / build (push) Successful in 1m49s
2026-03-12 13:03:26 -05:00
99032f7a62 feat: add automation to release using release-please in workflows
Some checks failed
renovate / renovate (push) Successful in 38s
release-image-harbor / release-please (push) Failing after 42s
release-image-harbor / build (push) Has been skipped
release-image-harbor / guarddog (push) Has been skipped
release-image-harbor / release (push) Has been skipped
release-image-gitea / release-please (push) Failing after 1m44s
release-image-gitea / build (push) Has been skipped
release-image-gitea / guarddog (push) Has been skipped
release-image-gitea / release (push) Has been skipped
test-build / guarddog (push) Successful in 59s
test-build / build (push) Has been cancelled
2026-03-12 12:59:16 -05:00
03f74a8181 feat: release 3.6.0
Some checks failed
renovate / renovate (push) Successful in 30s
test-build / guarddog (push) Successful in 1m3s
test-build / build (push) Failing after 1m10s
release-image-harbor / build (push) Failing after 1m30s
release-image-harbor / release (push) Has been skipped
release-image-gitea / build (push) Failing after 2m10s
release-image-gitea / release (push) Has been skipped
2026-03-12 12:42:45 -05:00
405fdf297c feat: replace timeago with dayjs
All checks were successful
renovate / renovate (push) Successful in 49s
test-build / guarddog (push) Successful in 1m8s
test-build / build (push) Successful in 3m24s
2026-03-12 12:35:23 -05:00
5b6b6e479f feat: responsive for small screen 2026-03-11 22:44:11 -05:00
04344808bd feat: enable security feature
All checks were successful
test-build / guarddog (push) Successful in 20s
renovate / renovate (push) Successful in 35s
test-build / build (push) Successful in 2m13s
release-image-gitea / build (push) Successful in 2m27s
release-image-gitea / release (push) Successful in 5m2s
release-image-harbor / build (push) Successful in 1m17s
release-image-harbor / release (push) Successful in 2m35s
2026-03-11 21:50:38 -05:00
6ec27345c3 feat: release 3.5.0 2026-03-11 19:44:49 -05:00
5e02443409 feat: remove security feature 2026-03-11 19:44:30 -05:00
8184d42942 feat: release 3.3.0
All checks were successful
test-build / guarddog (push) Successful in 45s
renovate / renovate (push) Successful in 51s
test-build / build (push) Successful in 5m44s
release-image-gitea / build (push) Successful in 1m7s
release-image-harbor / build (push) Successful in 1m45s
release-image-gitea / release (push) Successful in 3m14s
release-image-harbor / release (push) Successful in 3m11s
2026-03-11 19:31:54 -05:00
04dfecc099 feat: disable security feature 2026-03-11 19:31:35 -05:00
ec10d45fd0 feat: release 3.2.0
All checks were successful
test-build / guarddog (push) Successful in 43s
test-build / build (push) Successful in 1m28s
release-image-gitea / build (push) Successful in 1m29s
release-image-harbor / build (push) Successful in 1m44s
release-image-gitea / release (push) Successful in 4m38s
renovate / renovate (push) Successful in 1m3s
release-image-harbor / release (push) Successful in 6m0s
2026-03-11 18:54:42 -05:00
ceb70c7049 feat: add client:load
Some checks failed
renovate / renovate (push) Successful in 29s
test-build / build (push) Has been cancelled
test-build / guarddog (push) Has been cancelled
2026-03-11 18:54:07 -05:00
4dbc5d12a3 feat: remove static robots 2026-03-11 18:53:56 -05:00
b55c3a0e31 feat: remove partytown int
All checks were successful
test-build / guarddog (push) Successful in 17s
renovate / renovate (push) Successful in 23s
test-build / build (push) Successful in 1m25s
2026-03-11 02:04:32 -05:00
e63abf03ef feat: remove partytown int
Some checks failed
renovate / renovate (push) Successful in 25s
test-build / build (push) Failing after 29s
test-build / guarddog (push) Successful in 42s
2026-03-11 02:01:40 -05:00
a7e7e5b0e8 feat: add security feature
Some checks failed
test-build / guarddog (push) Successful in 23s
renovate / renovate (push) Successful in 43s
test-build / build (push) Failing after 1m50s
2026-03-11 01:49:07 -05:00
96724d0016 chore(deps): update deps 2026-03-11 01:47:26 -05:00
30b2e980c0 feat: change cache path
All checks were successful
test-build / guarddog (push) Successful in 20s
renovate / renovate (push) Successful in 34s
test-build / build (push) Successful in 1m9s
2026-03-11 01:25:58 -05:00
113f42ca21 feat: setup node
All checks were successful
test-build / guarddog (push) Successful in 25s
renovate / renovate (push) Successful in 59s
test-build / build (push) Successful in 1m31s
release-image-gitea / build (push) Successful in 1m33s
release-image-harbor / build (push) Successful in 1m48s
release-image-gitea / release (push) Successful in 3m53s
release-image-harbor / release (push) Successful in 4m40s
2026-03-11 01:09:20 -05:00
1f2820e4b4 feat: convert to bun
Some checks failed
test-build / guarddog (push) Successful in 19s
renovate / renovate (push) Successful in 53s
test-build / build (push) Failing after 1m20s
2026-03-11 01:03:51 -05:00
dc088306ce feat: update workflow to major version
All checks were successful
test-build / guarddog (push) Successful in 13s
renovate / renovate (push) Successful in 40s
test-build / build (push) Successful in 1m57s
2026-03-11 00:15:25 -05:00
f6c1cf1bf5 chore(deps): update deps
All checks were successful
renovate / renovate (push) Successful in 30s
test-build / guarddog (push) Successful in 25s
test-build / build (push) Successful in 2m10s
2026-03-11 00:00:51 -05:00
962f354208 feat: release 3.0.0, major astro update to 6.0
Some checks failed
renovate / renovate (push) Successful in 44s
test-build / guarddog (push) Successful in 1m6s
test-build / build (push) Has been cancelled
2026-03-10 23:58:53 -05:00
bf43212afc Merge pull request 'fix(deps): update astro monorepo (major)' (#376) from renovate/major-astro-monorepo into main
Some checks failed
test-build / guarddog (push) Successful in 21s
renovate / renovate (push) Successful in 36s
test-build / build (push) Failing after 3m19s
Reviewed-on: #376
2026-03-11 04:55:31 +00:00
ef810efd24 fix(deps): update astro monorepo
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 19s
test-build / build (pull_request) Successful in 1m31s
2026-03-11 04:53:28 +00:00
b8379bbc38 feat: reduce scale effect
All checks were successful
test-build / guarddog (push) Successful in 24s
renovate / renovate (push) Successful in 41s
test-build / build (push) Successful in 3m2s
2026-03-10 23:40:28 -05:00
e2f5bbbe9c feat: hide cards on small screens
Some checks failed
test-build / guarddog (push) Successful in 19s
renovate / renovate (push) Successful in 50s
test-build / build (push) Failing after 1m38s
2026-03-10 23:30:23 -05:00
f030da549e feat: add gap to distinguish 2026-03-10 23:11:45 -05:00
2fbc9a764f feat: move all categories card to bottom of category section
All checks were successful
test-build / guarddog (push) Successful in 18s
renovate / renovate (push) Successful in 32s
test-build / build (push) Successful in 1m43s
2026-03-10 23:08:43 -05:00
940342cc3f feat: move all posts to bottom of recent section 2026-03-10 22:57:38 -05:00
05d7ad6557 feat: consistent gaps and margins 2026-03-10 22:54:41 -05:00
31621e4f7e feat: simplify layout of the features cards 2026-03-10 22:48:17 -05:00
6156012c00 feat: markdown support for rss 2026-03-10 22:37:55 -05:00
af6554985e chore(deps): update deps 2026-03-10 22:37:09 -05:00
e25a3d0189 feat: change responsive height of image 2026-03-10 22:27:15 -05:00
18c2b54f65 feat: use metadata snippet for blog cards 2026-03-10 22:27:15 -05:00
265fd4f2cb feat: refactor how blog cards layout, add metadata, better responsiveness 2026-03-10 22:27:15 -05:00
cc8bade886 feat: move post metadata to snippet component 2026-03-10 22:27:15 -05:00
c92fb72a73 Merge pull request 'chore(deps): update dependency @iconify-json/simple-icons to v1.2.73' (#375) from renovate/iconify-json-simple-icons-1.x-lockfile into main
All checks were successful
test-build / guarddog (push) Successful in 25s
test-build / build (push) Successful in 4m16s
renovate / renovate (push) Successful in 1m29s
2026-03-10 21:24:46 +00:00
5da828f5a7 chore(deps): update dependency @iconify-json/simple-icons to v1.2.73
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 31s
test-build / build (pull_request) Successful in 2m26s
2026-03-10 21:24:34 +00:00
f30f5cf933 Merge pull request 'chore(deps): update astro monorepo' (#374) from renovate/astro-monorepo into main
Some checks failed
test-build / guarddog (push) Successful in 20s
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
2026-03-10 21:24:12 +00:00
48231fc441 chore(deps): update astro monorepo
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 33s
test-build / build (pull_request) Successful in 6m24s
2026-03-10 21:23:54 +00:00
d42ba08041 feat: minor tweaks
All checks were successful
test-build / guarddog (push) Successful in 23s
renovate / renovate (push) Successful in 1m0s
test-build / build (push) Successful in 1m54s
2026-03-09 23:17:02 -05:00
fa618b0524 feat: add margin to bring in the content 2026-03-09 23:17:02 -05:00
0a17e3b8af feat: remove unused properties 2026-03-09 23:17:01 -05:00
341453510f feat: redo layout, smaller and with logo 2026-03-09 23:17:01 -05:00
c9cb15f201 feat: convert hero section to use randomly selected images stored in directus 2026-03-09 23:17:01 -05:00
74e9aff4cc Merge pull request 'chore(deps): update dependency typescript-eslint to v8.57.0' (#373) from renovate/typescript-eslint-monorepo into main
All checks were successful
test-build / guarddog (push) Successful in 35s
test-build / build (push) Successful in 3m0s
renovate / renovate (push) Successful in 1m24s
Reviewed-on: #373
2026-03-09 22:28:39 +00:00
d48d61ce91 chore(deps): update dependency typescript-eslint to v8.57.0
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 32s
test-build / build (pull_request) Successful in 1m31s
2026-03-09 22:00:16 +00:00
68f179456a feat: reword titles and descriptions
Some checks failed
renovate / renovate (push) Successful in 1m30s
test-build / guarddog (push) Successful in 19s
test-build / build (push) Has been cancelled
2026-03-09 16:58:34 -05:00
568220d39c feat: adjust layout of recent posts 2026-03-09 16:58:34 -05:00
9dfcf6f006 feat: make cards fixed height 2026-03-09 16:58:34 -05:00
62886ba2b3 Merge pull request 'chore(deps): update dependency shiki to v4.0.2' (#372) from renovate/shiki-monorepo into main
All checks were successful
renovate / renovate (push) Successful in 1m9s
test-build / guarddog (push) Successful in 48s
test-build / build (push) Successful in 2m2s
2026-03-09 21:18:05 +00:00
90bc982371 chore(deps): update dependency shiki to v4.0.2
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / guarddog (pull_request) Successful in 26s
test-build / build (pull_request) Successful in 2m4s
2026-03-09 21:17:55 +00:00
e91ffd8686 feat: release 2.25.0
All checks were successful
test-build / guarddog (push) Successful in 28s
renovate / renovate (push) Successful in 42s
release-image-harbor / build (push) Successful in 1m29s
test-build / build (push) Successful in 5m35s
release-image-harbor / release (push) Successful in 6m9s
release-image-gitea / build (push) Successful in 3m15s
release-image-gitea / release (push) Successful in 6m17s
2026-03-08 21:45:08 -05:00
00a86b1206 feat: remove unused files 2026-03-08 21:41:53 -05:00
7327795d39 feat: add an all page with cards to link to it
All checks were successful
test-build / guarddog (push) Successful in 27s
renovate / renovate (push) Successful in 41s
test-build / build (push) Successful in 3m17s
2026-03-08 21:40:02 -05:00
ae57c60935 feat: add photoswipe to view images embeded in posts 2026-03-08 21:40:02 -05:00
245e0f0624 Merge pull request 'chore(deps): update actions/cache action to v5' (#371) from renovate/actions-cache-5.x into main
All checks were successful
test-build / build (push) Successful in 2m26s
test-build / guarddog (push) Successful in 2m34s
renovate / renovate (push) Successful in 1m21s
Reviewed-on: #371
2026-03-07 18:25:26 +00:00
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
70 changed files with 5297 additions and 13934 deletions

View File

@@ -1,143 +0,0 @@
name: release-image-gitea
on:
push:
tags:
- 2.*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-js
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.x
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24.14.0
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Lint Code
run: pnpm lint
- name: Build Project
run: pnpm build
release:
runs-on: ubuntu-js
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Login to Registry
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@v4
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
password: ${{ secrets.DH_TOKEN }}
- name: Create Kubeconfig
run: |
mkdir $HOME/.kube
echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver: kubernetes
driver-opts: |
namespace=gitea
qemu.install=true
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["harbor.alexlebens.net/proxy-hub.docker/"]
- name: Available Platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,format=long
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
images: |
${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
- name: Get Version Info
id: version
run: |
echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
echo "commit=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
if git describe --tags --exact-match HEAD 2>/dev/null; then
echo "is_release=true" >> $GITHUB_OUTPUT
else
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.version.outputs.version }}
COMMIT_SHA=${{ steps.version.outputs.commit }}
IS_RELEASE=${{ steps.version.outputs.is_release }}
file: ./Dockerfile
- name: ntfy Success
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Success - Site Profile'
priority: 3
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,successfully,completed
details: 'Image for Site Profile has been released!'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Failure - Site Profile'
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'Image for Site Profile has failed to be released.'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=release-image.yml", "clear": true}]'
image: true

View File

@@ -1,143 +0,0 @@
name: release-image-harbor
on:
push:
tags:
- 2.*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-js
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.x
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24.14.0
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Lint Code
run: pnpm lint
- name: Build Project
run: pnpm build
release:
runs-on: ubuntu-js
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Login to Registry
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@v4
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
password: ${{ secrets.DH_TOKEN }}
- name: Create Kubeconfig
run: |
mkdir $HOME/.kube
echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver: kubernetes
driver-opts: |
namespace=gitea
qemu.install=true
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["harbor.alexlebens.net/proxy-hub.docker/"]
- name: Available Platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,format=long
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
images: |
${{ vars.REGISTRY_HOST }}/images/site-profile
- name: Get Version Info
id: version
run: |
echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
echo "commit=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
if git describe --tags --exact-match HEAD 2>/dev/null; then
echo "is_release=true" >> $GITHUB_OUTPUT
else
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.version.outputs.version }}
COMMIT_SHA=${{ steps.version.outputs.commit }}
IS_RELEASE=${{ steps.version.outputs.is_release }}
file: ./Dockerfile
- name: ntfy Success
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Success - Site Profile'
priority: 3
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,successfully,completed
details: 'Image for Site Profile has been released!'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Failure - Site Profile'
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'Image for Site Profile has failed to be released.'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=release-image.yml", "clear": true}]'
image: true

View File

@@ -0,0 +1,340 @@
name: release-image
on:
push:
branches:
- release
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-js
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: release
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24.14.0
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: Cache Astro Build Cache
uses: actions/cache@v5
with:
path: |
.astro
node_modules/.vite
key: ${{ runner.os }}-astro-${{ hashFiles('**/*.astro', 'astro.config.mjs') }}
restore-keys: |
${{ runner.os }}-astro-
- name: Lint Code
run: bun run lint
- name: Build Project
run: bun run build
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Test Failure - Site Profile'
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'During release tests failed for building Site Profile'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=release-image.yaml", "clear": true}]'
image: true
guarddog:
runs-on: ubuntu-js
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: release
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install GuardDog
run: |
python3 -m pip install --upgrade pip
python3 -m pip install guarddog
- name: Run GuardDog
run: |
guarddog npm scan ./
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Security Failure - Site Profile'
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'During release guarddog scan failed for Site Profile'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=release-image.yaml", "clear": true}]'
image: true
semantic-release:
needs: [ build, guarddog ]
runs-on: ubuntu-js
outputs:
new-release-published: ${{ steps.semantic.outputs.new-release-published }}
new-release-version: ${{ steps.semantic.outputs.new-release-version }}
new-release-git-tag: ${{ steps.semantic.outputs.new-release-git-tag }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.BOT_TOKEN }}
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24.14.0
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: Run Semantic Release
id: semantic
env:
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
NODE_PATH: ${{ github.workspace }}/node_modules
run: |
bun run semantic-release
release-harbor:
runs-on: ubuntu-js
needs: semantic-release
if: ${{ needs.semantic-release.outputs.new-release-published == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: release
- name: Login to Harbor Registry
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@v4
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
password: ${{ secrets.DH_TOKEN }}
- name: Create Kubeconfig
run: |
mkdir $HOME/.kube
echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v4
with:
driver: kubernetes
driver-opts: |
namespace=gitea
qemu.install=true
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["harbor.alexlebens.net/proxy-hub.docker/"]
- name: Available Platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v6
with:
images: |
${{ vars.REGISTRY_HOST }}/images/site-profile
tags: |
type=ref,event=branch
type=sha,format=long
type=raw,value=latest,enable=${{ needs.semantic-release.outputs.new-release-published == 'true' }}
type=semver,pattern={{version}},value=${{ needs.semantic-release.outputs.new-release-version }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.semantic-release.outputs.new-release-version }}
type=semver,pattern={{major}},value=${{ needs.semantic-release.outputs.new-release-version }}
- name: Build and Push Image
uses: docker/build-push-action@v7
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
APP_VERSION=${{ needs.semantic-release.outputs.new-release-version }}
COMMIT_SHA=${{ github.sha }}
IS_RELEASE=true
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
- name: ntfy Success
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Success - Site Profile'
priority: 3
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,successfully,completed
details: 'Harbor Image for Site Profile has been released!'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Failure - Site Profile'
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'Harbor Image for Site Profile has failed to be released.'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=release-image.yml", "clear": true}]'
image: true
release-gitea:
runs-on: ubuntu-js
needs: [ semantic-release, release-harbor ]
if: |
always() &&
needs.semantic-release.outputs.new-release-published == 'true'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: release
- name: Login to Gitea Registry
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@v4
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
password: ${{ secrets.DH_TOKEN }}
- name: Create Kubeconfig
run: |
mkdir $HOME/.kube
echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v4
with:
driver: kubernetes
driver-opts: |
namespace=gitea
qemu.install=true
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["harbor.alexlebens.net/proxy-hub.docker/"]
- name: Available Platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v6
with:
images: |
${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
tags: |
type=ref,event=branch
type=sha,format=long
type=raw,value=latest,enable=${{ needs.semantic-release.outputs.new-release-published == 'true' }}
type=semver,pattern={{version}},value=${{ needs.semantic-release.outputs.new-release-version }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.semantic-release.outputs.new-release-version }}
type=semver,pattern={{major}},value=${{ needs.semantic-release.outputs.new-release-version }}
- name: Build and Push Image
uses: docker/build-push-action@v7
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
APP_VERSION=${{ needs.semantic-release.outputs.new-release-version }}
COMMIT_SHA=${{ github.sha }}
IS_RELEASE=true
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
- name: ntfy Success
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Success - Site Profile'
priority: 3
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,successfully,completed
details: 'Gitea Image for Site Profile has been released!'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Failure - Site Profile'
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'Gitea Image for Site Profile has failed to be released.'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=release-image.yaml", "clear": true}]'
image: true

View File

@@ -4,6 +4,9 @@ on:
push:
branches:
- main
paths-ignore:
- '.gitea/workflows/**'
- '**.md'
pull_request:
branches:
@@ -16,25 +19,34 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.x
- name: Set up Node.js
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24.14.0
cache: pnpm
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Install Dependencies
run: pnpm install
run: bun install --frozen-lockfile
- name: Cache Astro Build Cache
uses: actions/cache@v5
with:
path: |
.astro
node_modules/.vite
key: ${{ runner.os }}-astro-${{ hashFiles('**/*.astro', 'astro.config.mjs') }}
restore-keys: |
${{ runner.os }}-astro-
- name: Lint Code
run: pnpm lint
run: bun run lint
- name: Build Project
run: pnpm build
run: bun run build
- name: ntfy Failed
uses: niniyas/ntfy-action@master

2
.gitignore vendored
View File

@@ -10,8 +10,6 @@ node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env

3
.npmrc
View File

@@ -1,3 +0,0 @@
registry=https://registry.npmjs.org/
engine-strict=true
save-exact=true

17
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-json
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.11
hooks:
- id: prettier
types_or: [javascript, typescript, css, scss, html, json, yaml, markdown]
additional_dependencies:
- prettier
- prettier-plugin-astro
- prettier-plugin-tailwindcss

18
.releaserc.json Normal file
View File

@@ -0,0 +1,18 @@
{
"branches": ["release"],
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"semantic-release-export-data",
["@semantic-release/npm", { "npmPublish": false }],
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
["@saithodev/semantic-release-gitea", {
"giteaUrl": "https://gitea.alexlebens.dev"
}]
]
}

0
CHANGELOG.md Normal file
View File

View File

@@ -1,32 +1,35 @@
FROM docker.io/node:24.14.0-alpine AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
ARG REGISTRY=dhi.io
FROM ${REGISTRY}/bun:1.3.10-alpine3.22-dev AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
COPY package.json bun.lock ./
FROM builder AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
bun install --production --frozen-lockfile
FROM prod-deps AS build-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
FROM builder AS build-deps
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
bun install --frozen-lockfile
FROM build-deps AS build
COPY . .
RUN pnpm run build
RUN bun run build
FROM dhi.io/node:24.14.0 AS runtime
FROM ${REGISTRY}/bun:1.3.10-alpine3.22 AS runtime
WORKDIR /app
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
LABEL version="2.19.0"
LABEL description="Astro based personal website"
ARG APP_VERSION=latest
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=4321
LABEL version=$APP_VERSION
LABEL description="Astro based personal website"
EXPOSE $PORT
CMD ["node", "./dist/server/entry.mjs"]
CMD ["bun", "run", "./dist/server/entry.mjs"]

View File

@@ -7,9 +7,8 @@ Personal site used for information about myself and blog.
With dependencies installed, you can utilize the following npm scripts to manage your project's development lifecycle:
- `pnpm build`: Bundles your site into static files for production.
- `pnpm dev`: Starts a local development server with hot reloading enabled.
- `pnpm preview`: Serves your build output locally for preview before deployment.
- `bun run build`: Bundles your site into static files for production.
- `bun run dev`: Starts a local development server with hot reloading enabled.
For detailed help with Astro CLI commands, visit [Astro's documentation](https://docs.astro.build/en/reference/cli-reference/).

View File

@@ -1,15 +1,13 @@
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';
import partytown from '@astrojs/partytown';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite';
import icon from 'astro-icon';
import swup from '@swup/astro';
import { getSiteURL } from './src/support/url';
import { getSiteURL } from './src/scripts/url';
export default defineConfig({
site: getSiteURL(),
@@ -25,11 +23,7 @@ export default defineConfig({
}
},
prefetch: true,
integrations: [
partytown(),
react(),
sitemap(),
icon({
include: {
@@ -47,17 +41,16 @@ export default defineConfig({
}),
(await import('@playform/compress')).default({
CSS: true,
JavaScript: true,
JavaScript: false,
HTML: {
'html-minifier-terser': {
collapseWhitespace: true,
minifyCSS: false,
minifyJS: true,
minifyJS: false,
},
},
Image: false,
SVG: true,
Logger: 2,
}),
],
@@ -78,13 +71,4 @@ export default defineConfig({
adapter: node({
mode: 'standalone',
}),
build: {
// Specifies the directory in the build output where Astro-generated assets (bundled JS and CSS for example) should live.
// see https://docs.astro.build/en/reference/configuration-reference/#buildassets
assets: 'assets',
// see https://docs.astro.build/en/reference/configuration-reference/#buildassetsprefix
assetsPrefix:
!!import.meta.env.S3_ENABLE || !!process.env.S3_ENABLE ? 'https://digitalocean.com' : '',
},
});

3723
bun.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "site-profile",
"type": "module",
"version": "2.19.0",
"version": "3.6.0",
"homepage": "https://www.alexlebens.dev",
"bugs": {
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
@@ -19,62 +19,66 @@
},
"scripts": {
"dev": "astro dev",
"full-dev": "rm -rf dist node_modules .astro && bun install && astro build && astro dev",
"build": "astro build",
"preview": "astro preview",
"full-preview": "rm -rf dist node_modules .astro && bun install && astro build && astro preview",
"astro": "astro",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx,astro}\"",
"lint": "eslint \"src/**/*.{js,ts,jsx,tsx,astro}\"",
"lint:fix": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\""
},
"dependencies": {
"@astrojs/check": "^0.9.6",
"@astrojs/node": "^9.5.4",
"@astrojs/partytown": "^2.1.4",
"@astrojs/react": "^4.4.2",
"@astrojs/rss": "^4.0.15",
"@astrojs/sitemap": "^3.7.0",
"@directus/sdk": "^21.1.0",
"@giscus/react": "^3.1.0",
"@astrojs/check": "^0.9.7",
"@astrojs/node": "^10.0.0",
"@astrojs/rss": "^4.0.17",
"@astrojs/sitemap": "^3.7.1",
"@directus/sdk": "^21.2.0",
"@iconify-json/mdi": "^1.2.3",
"@iconify-json/pajamas": "^1.2.15",
"@iconify-json/simple-icons": "^1.2.72",
"@playform/compress": "^0.2.1",
"@iconify-json/simple-icons": "^1.2.74",
"@playform/compress": "^0.2.2",
"@swup/astro": "^1.8.0",
"@tailwindcss/postcss": "^4.2.1",
"@tailwindcss/vite": "^4.2.1",
"@types/react": "^19.2.14",
"@types/unist": "^3.0.3",
"astro": "^5.18.0",
"astro": "^6.0.0",
"astro-compress": "^2.4.0",
"astro-icon": "^1.1.5",
"marked": "^17.0.3",
"dayjs": "^1.11.20",
"markdown-it": "^14.1.1",
"marked": "^17.0.4",
"marked-shiki": "^1.2.1",
"mdast-util-to-string": "^4.0.0",
"photoswipe": "^5.4.4",
"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.1",
"shiki": "^4.0.2",
"tailwindcss": "^4.2.1",
"ultrahtml": "^1.6.0"
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^2.13.0",
"@saithodev/semantic-release-gitea": "^2.1.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^13.1.5",
"@semantic-release/release-notes-generator": "^14.1.0",
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19",
"eslint": "^10.0.2",
"@types/markdown-it": "^14.1.2",
"eslint": "^10.0.3",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-format": "^2.0.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.2",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"timeago.js": "^4.0.2",
"semantic-release": "^25.0.3",
"semantic-release-export-data": "^1.2.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.1"
"typescript-eslint": "^8.57.0"
}
}

12588
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
onlyBuiltDependencies:
- swup

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

View File

@@ -1,4 +0,0 @@
User-agent: *
Allow: /
Sitemap: https://www.alexlebens.dev/sitemap-index.xml

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">
@@ -95,5 +95,3 @@ const currentPath = pathname.slice(1);
</div>
</nav>
</header>
<script is:inline src="/vendor/preline/collapse2.1.0.min.js"></script>

View File

@@ -0,0 +1,15 @@
---
import { Icon } from 'astro-icon/components';
---
<div class="button-base button-bg-teal inline-flex shrink-0 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>

View File

@@ -43,106 +43,93 @@
</button>
<script is:inline>
const applyTheme = () => {
(() => {
const isDark =
localStorage.theme === 'dark' ||
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches);
document.documentElement.classList.toggle('dark', isDark);
};
applyTheme();
document.addEventListener('astro:after-swap', applyTheme);
})();
</script>
<script>
function setupThemeToggle() {
const themeToggles = document.querySelectorAll('[data-theme-toggle]');
// Create theme switch overlay element
if (!document.querySelector('.theme-switch-overlay')) {
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.15s ease-out';
document.body.appendChild(overlay);
}
themeToggles.forEach((toggle) => {
['click', 'touchend'].forEach((eventType) => {
toggle.addEventListener(
eventType,
(e) => {
e.preventDefault();
e.stopPropagation();
// Get click/touch position for radial animation
let x, y;
if (e.type === 'touchend' && e.changedTouches && e.changedTouches[0]) {
const rect = toggle.getBoundingClientRect();
x = e.changedTouches[0].clientX - rect.left;
y = e.changedTouches[0].clientY - rect.top;
} else {
const rect = toggle.getBoundingClientRect();
x = e.clientX - rect.left;
y = e.clientY - rect.top;
}
document.documentElement.style.setProperty('--x', `${x}px`);
document.documentElement.style.setProperty('--y', `${y}px`);
const overlay = document.querySelector('.theme-switch-overlay');
const isDark = document.documentElement.classList.contains('dark');
const newTheme = isDark ? 'light' : 'dark';
// Show overlay during transition
if (overlay) {
overlay.style.backgroundColor =
newTheme === 'dark' ? 'rgba(24, 24, 27, 0.3)' : 'rgba(255, 255, 255, 0.3)';
overlay.style.opacity = '1';
}
document.documentElement.classList.add('theme-switching');
// Force a reflow to ensure all elements update
document.body.offsetHeight;
// Toggle dark mode with a slight delay to allow overlay to appear
setTimeout(() => {
if (isDark) {
document.documentElement.classList.remove('dark');
} else {
document.documentElement.classList.add('dark');
}
localStorage.setItem('theme', newTheme);
document.dispatchEvent(
new CustomEvent('themeChanged', {
detail: { isDark: newTheme === 'dark' },
})
);
// Force another reflow to ensure all elements update
document.body.offsetHeight;
setTimeout(() => {
if (overlay) {
overlay.style.opacity = '0';
}
document.documentElement.classList.remove('theme-switching');
}, 150);
}, 50);
},
{ passive: false }
);
});
});
if (!document.querySelector('.theme-switch-overlay')) {
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.15s ease-out';
document.body.appendChild(overlay);
}
['click', 'touchend'].forEach((eventType) => {
document.addEventListener(
eventType,
(e) => {
const target = e.target as HTMLElement;
const toggle = target.closest('[data-theme-toggle]');
if (!toggle) return;
// Run setup on load
document.addEventListener('astro:page-load', setupThemeToggle);
e.preventDefault();
let x, y;
const rect = toggle.getBoundingClientRect();
if (eventType === 'touchend') {
const touchEvent = e as TouchEvent;
if (touchEvent.changedTouches && touchEvent.changedTouches[0]) {
x = touchEvent.changedTouches[0].clientX - rect.left;
y = touchEvent.changedTouches[0].clientY - rect.top;
}
} else {
const mouseEvent = e as MouseEvent;
x = mouseEvent.clientX - rect.left;
y = mouseEvent.clientY - rect.top;
}
document.documentElement.style.setProperty('--x', `${x}px`);
document.documentElement.style.setProperty('--y', `${y}px`);
const overlay = document.querySelector('.theme-switch-overlay') as HTMLElement;
const isDark = document.documentElement.classList.contains('dark');
const newTheme = isDark ? 'light' : 'dark';
if (overlay) {
overlay.style.backgroundColor =
newTheme === 'dark' ? 'rgba(24, 24, 27, 0.3)' : 'rgba(255, 255, 255, 0.3)';
overlay.style.opacity = '1';
}
document.documentElement.classList.add('theme-switching');
document.body.offsetHeight;
setTimeout(() => {
if (isDark) {
document.documentElement.classList.remove('dark');
} else {
document.documentElement.classList.add('dark');
}
localStorage.setItem('theme', newTheme);
document.dispatchEvent(
new CustomEvent('themeChanged', {
detail: { isDark: newTheme === 'dark' },
})
);
document.body.offsetHeight;
setTimeout(() => {
if (overlay) {
overlay.style.opacity = '0';
}
document.documentElement.classList.remove('theme-switching');
}, 150);
}, 50);
},
{ passive: false }
);
});
// Also run on page visibility change to ensure theme is consistent
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible') {
const currentTheme = localStorage.getItem('theme');
@@ -154,7 +141,6 @@
}
});
// Listen for system preference changes
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', ({ matches }) => {
if (!localStorage.getItem('theme')) {
if (matches) {

View File

@@ -1,11 +1,10 @@
---
import { Icon } from 'astro-icon/components';
import { Image } from 'astro:assets';
import type { Post } from '@lib/directusTypes';
import { formatDate } from '@support/time';
import { getDirectusImageURL } from '@/support/url';
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
post: Post;
@@ -16,13 +15,13 @@ const { post } = Astro.props;
<div class="smooth-reveal-cards group flex flex-col">
<a
class="card-base border-none!"
class="card-base border-none! h-full flex flex-col"
href={`/blog/${post.slug}/`}
data-astro-prefetch
>
<div class="relative shrink-0 rounded-t-xl w-full overflow-hidden before:absolute before:inset-x-0 before:z-1 before:size-full">
<Image
class="rounded-t-xl h-auto w-full"
class="rounded-t-xl h-64 w-full object-cover"
src={getDirectusImageURL(post.image)}
alt={post.image_alt}
draggable="false"
@@ -31,25 +30,17 @@ const { post } = Astro.props;
inferSize={true}
/>
</div>
<div class="rounded-xl p-4 md:p-5">
<h3 class="card-text-title text-xl">
{post.title}
</h3>
<div class="ml-6 flex">
<div class="relative inline-block w-full">
<div class="card-text-title card-hover-text-title flex relative items-center mx-auto min-h-11 sm:mx-0 sm:mt-4">
<span class="relative inline-block overflow-hidden ml-2">
Read more
</span>
<Icon
name="mdi:keyboard-arrow-right"
class="translate-y-0.5 transition duration-300 group-hover:translate-x-1"
/>
<p class="card-text-description text-sm ml-auto">
{formatDate(post.published_date)}
</p>
</div>
</div>
<div class="flex flex-col flex-1 rounded-xl p-4 md:p-5 mx-1 mb-2">
<div class="flex flex-row items-center mb-8">
<h3 class="card-text-title card-hover-text-title text-2xl">
{post.title}
</h3>
</div>
<div class="mt-auto">
<PostMetadataSnippet
enableCategoryLink={false}
post={post}
/>
</div>
</div>
</a>

View File

@@ -1,6 +1,6 @@
---
import Logo from '@components/images/Logo.astro';
import { getDirectusImageURL } from '@/support/url';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
slug: string;
@@ -22,8 +22,8 @@ const { slug, title, description, logoLight, logoDark, count, publishDate } = As
data-astro-prefetch
>
<div class="relative grow overflow-hidden">
<div class="absolute inset-1 flex flex-col p-3 md:p-4 lg:p-5">
<div class="flex flex-row items-center mb-4">
<div class="mask-fade-edges absolute inset-1 flex flex-col p-3 md:p-4 lg:p-5">
<div class="flex flex-row items-center mb-4 shrink-0">
<div class="card-hover-icon-scale shrink-0 mr-3">
<Logo
srcLight={getDirectusImageURL(logoLight)}
@@ -35,12 +35,12 @@ const { slug, title, description, logoLight, logoDark, count, publishDate } = As
{title}
</h3>
</div>
<div>
<p class="card-text-description mb-4">
<div class="overflow-hidden">
<p class="card-text-description line-clamp-3">
{description}
</p>
</div>
<div class="card-text-description flex items-center justify-between text-xs mt-auto pt-1 md:pt-2">
<div class="card-text-description flex shrink-0 items-center justify-between text-xs mt-auto pt-1 md:pt-2">
<span class="inline-flex items-center">
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -55,7 +55,7 @@ const { slug, title, description, logoLight, logoDark, count, publishDate } = As
</svg>
{count}
</span>
<span class="inline-flex items-center">
<div class="inline-flex items-center">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
@@ -68,8 +68,10 @@ const { slug, title, description, logoLight, logoDark, count, publishDate } = As
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
{publishDate}
</span>
<span>
{publishDate}
</span>
</div>
</div>
</div>
</div>

View File

@@ -2,7 +2,7 @@
import { Icon } from 'astro-icon/components';
import Logo from '@components/images/Logo.astro';
import { getDirectusImageURL } from '@/support/url';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
topic: string;

View File

@@ -1,53 +1,50 @@
---
import { Icon } from 'astro-icon/components';
import { Image } from 'astro:assets';
import { getDirectusImageURL } from '@/support/url';
import type { Post } from '@lib/directusTypes';
import ReadMoreButton from '@components/buttons/ReadMoreButton.astro';
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
title: string;
subTitle: string;
url: string;
img: string;
imgAlt: string;
post: Post;
}
const { title, subTitle, url, img, imgAlt } = Astro.props;
const { post } = 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"
href={url}
class="md:card-base-hidden group 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={`/blog/${post.slug}`}
data-astro-prefetch
>
<div>
<div class="h-full">
<Image
class="rounded-2xl rounded-b-none md:rounded-2xl w-full h-full sm:max-h-80 md:max-h-90 object-cover"
src={getDirectusImageURL(img)}
alt={imgAlt}
class="rounded-2xl rounded-b-none md:rounded-2xl md:shadow-2xl w-full h-full object-cover"
src={getDirectusImageURL(post.image)}
alt={post.image_alt}
draggable="false"
loading="lazy"
width="850"
height="420"
inferSize={true}
/>
</div>
<div class="bg-background-card md:bg-transparent group-hover:bg-neutral-100 md:group-hover:bg-transparent dark:group-hover:bg-neutral-800/90 md:dark:group-hover:bg-transparent rounded-b-2xl transition-all duration-300 p-6">
<h2 class="card-text-header mb-2">
{title}
<div class="flex flex-col justify-center bg-background-card md:bg-transparent group-hover:bg-neutral-100 md:group-hover:bg-transparent dark:group-hover:bg-neutral-800/90 md:dark:group-hover:bg-transparent rounded-b-2xl transition-all duration-300 p-6 gap-4">
<h2 class="card-text-header">
{post.title}
</h2>
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose mb-8">
{subTitle}
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose">
{post.description}
</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 md:flex-col-reverse lg:flex-row items-center md:items-start lg:items-center justify-between w-full md:gap-4">
<div class="hidden md:block shrink-0 mt-4">
<ReadMoreButton/>
</div>
<div class="mt-2 lg:mt-4">
<PostMetadataSnippet
post={post}
enableCategoryLink={false}
/>
</div>
</div>

View File

@@ -1,85 +1,85 @@
---
import { Icon } from 'astro-icon/components';
import { Image } from 'astro:assets';
import { getDirectusImageURL } from '@/support/url';
import type { Post } from '@lib/directusTypes';
import ReadMoreButton from '@components/buttons/ReadMoreButton.astro';
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
title: string;
subTitle: string;
url: string;
single?: boolean;
imgOne: any;
imgOneAlt: any;
imgTwo?: any;
imgTwoAlt?: any;
post: Post;
}
const { title, subTitle, url, single, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = Astro.props;
const { post } = 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"
href={url}
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={`/blog/${post.slug}`}
data-astro-prefetch
>
<div class="bg-background-card md:bg-transparent group-hover:bg-neutral-100 md:group-hover:bg-transparent dark:group-hover:bg-neutral-800/90 md:dark:group-hover:bg-transparent rounded-b-2xl transition-all duration-300 p-6">
<h2 class="card-text-header mb-2">
{title}
<div class="flex flex-col bg-background-card md:bg-transparent group-hover:bg-neutral-100 md:group-hover:bg-transparent dark:group-hover:bg-neutral-800/90 md:dark:group-hover:bg-transparent rounded-b-2xl transition-all duration-300 p-6 gap-4">
<h2 class="card-text-header">
{post.title}
</h2>
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose mb-8">
{subTitle}
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose">
{post.description}
</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 md:flex-col-reverse lg:flex-row items-center md:items-start lg:items-center justify-between w-full md:gap-4">
<div class="hidden md:block shrink-0 mt-4">
<ReadMoreButton/>
</div>
<div class="mt-2 lg:mt-4">
<PostMetadataSnippet
post={post}
enableCategoryLink={false}
/>
</div>
</div>
</div>
{single ? (
<div>
{!post.image_second ? (
<div class="h-full">
<Image
class="rounded-2xl rounded-b-none md:rounded-2xl w-full"
src={getDirectusImageURL(imgOne)}
alt={imgOneAlt}
format="webp"
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(post.image)}
alt={post.image_alt}
draggable="false"
loading="lazy"
width="850"
height="420"
inferSize={true}
/>
</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 class="h-full">
<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(post.image)}
alt={post.image_alt}
draggable="false"
loading="lazy"
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(post.image)}
alt={post.image_alt}
draggable="false"
loading="lazy"
inferSize={true}
/>
<Image
class="rounded-xl shadow-2xl w-3/5 h-full -ml-16 mt-12 object-cover"
src={getDirectusImageURL(post.image_second)}
alt={post.image_second_alt}
draggable="false"
loading="lazy"
inferSize={true}
/>
</div>
</div>
)}
</a>

View File

@@ -0,0 +1,77 @@
---
import Logo from '@components/images/Logo.astro';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
url: string;
title: string;
description: string;
logoLight: string;
logoDark?: string;
count: number;
publishDate: string;
}
const { url, title, description, logoLight, logoDark, count, publishDate } = Astro.props;
---
<div class="smooth-reveal-cards flex flex-col mx-auto w-full">
<a
class="card-base flex flex-col h-full min-h-55"
href={url}
data-astro-prefetch
>
<div class="relative grow overflow-hidden">
<div class="absolute inset-1 flex flex-col p-3 md:p-4 lg:p-5">
<div class="flex flex-row items-center mb-4">
<div class="card-hover-icon-scale shrink-0 mr-3">
<Logo
srcLight={getDirectusImageURL(logoLight)}
srcDark={getDirectusImageURL(logoDark!)}
alt={`Logo of ${title}`}
/>
</div>
<h3 class="card-text-title-major card-hover-text-title whitespace-nowrap">
{title}
</h3>
</div>
<div>
<p class="card-text-description mb-4">
{description}
</p>
</div>
<div class="card-text-description flex items-center justify-between text-xs mt-auto pt-1 md:pt-2">
<span class="inline-flex items-center">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
class="mr-1"
>
<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"></path>
</svg>
{count}
</span>
<span class="inline-flex items-center">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
class="mr-1"
>
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
{publishDate}
</span>
</div>
</div>
</div>
</a>
</div>

View File

@@ -0,0 +1,59 @@
---
import { Icon } from 'astro-icon/components';
import { Image } from 'astro:assets';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
title: string;
subTitle: string;
url: string;
img?: string;
imgAlt?: string;
}
const { title, subTitle, url, img, imgAlt } = Astro.props;
---
<div class="smooth-reveal flex flex-col 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 w-full md:px-8 md:py-8"
href={url}
data-astro-prefetch
>
{img && (
<div>
<Image
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"
loading="lazy"
width="850"
height="420"
inferSize={true}
/>
</div>
)}
<div class="bg-background-card md:bg-transparent group-hover:bg-neutral-100 md:group-hover:bg-transparent dark:group-hover:bg-neutral-800/90 md:dark:group-hover:bg-transparent rounded-b-2xl transition-all duration-300 p-6">
<h2 class="card-text-header mb-2">
{title}
</h2>
<p class="card-text-title font-light text-pretty sm:text-lg max-w-prose mb-8">
{subTitle}
</p>
<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>
</div>
</a>
</div>

View File

@@ -0,0 +1,44 @@
---
import ReadMoreButton from '@components/buttons/ReadMoreButton.astro';
import Logo from '@components/images/Logo.astro';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
title: string;
subTitle: string;
url: string;
logoLight: string;
logoDark?: string;
}
const { title, subTitle, url, logoLight, logoDark} = Astro.props;
---
<div class="smooth-reveal w-full mx-auto">
<a
class="card-base group flex flex-row items-center justify-between w-full p-8 gap-6 md:gap-8"
href={url}
data-astro-prefetch
>
<div class="flex flex-row items-center ml-4">
<div class="card-hover-icon-scale shrink-0 mr-3">
<Logo
srcLight={getDirectusImageURL(logoLight)}
srcDark={getDirectusImageURL(logoDark!)}
alt={`Logo of ${title}`}
/>
</div>
<div class="flex flex-col gap-3 text-left ml-4">
<h2 class="card-text-header text-2xl md:text-3xl">
{title}
</h2>
<p class="card-text-title font-light text-pretty text-lg max-w-3xl">
{subTitle}
</p>
</div>
</div>
<div class="hidden md:block shrink-0 mr-4">
<ReadMoreButton/>
</div>
</a>
</div>

View File

@@ -10,7 +10,7 @@ const { dayName, label, icon, temp } = Astro.props;
---
<div class="smooth-reveal-2 group flex flex-col">
<div class="card-base w-32 md:w-40">
<div class="card-base w-32 sm:w-40">
<div class="p-5 text-center">
<span class="card-text-description block font-bold text-xs uppercase tracking-widest">
{dayName}

View File

@@ -1,16 +1,19 @@
---
import { readItems } from '@directus/sdk';
import { readItems, readSingleton } from '@directus/sdk';
import type { Post, Category } from '@lib/directusTypes';
import type { Post } from '@lib/directusTypes';
import CategoryCard from '@components/cards/CategoryCard.astro';
import LargeCategoryCard from '@components/cards/LargeCategoryCard.astro';
import directus from '@lib/directus';
import { timeago } from '@support/time';
import { formatFromNow } from '@/scripts/time';
const global = await directus.request(readSingleton('site_global'));
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*'],
fields: ['*', { category: ['*'] }],
sort: ['-published_date'],
})
);
@@ -31,13 +34,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[]>());
@@ -87,10 +93,21 @@ const categories = (await directus.request(readItems('categories')))
logoLight={category.logoLight}
logoDark={category.logoDark}
count={postMap.get(category.slug)?.length ?? 0}
publishDate={timeago(postMap.get(category.slug)?.[0]?.published_date)}
publishDate={formatFromNow(postMap.get(category.slug)?.[0]?.published_date)}
/>
</div>
);
})}
<div class="col-span-full mt-8">
<LargeCategoryCard
title="All Posts"
description="Here you can forgoe the organization and browse everything I've posted"
url="/all"
logoLight={global.all_logoLight}
logoDark={global.all_logoDark}
count={posts.length}
publishDate={formatFromNow(posts[0]?.published_date)}
/>
</div>
</div>
</section>

View File

@@ -7,10 +7,10 @@ import directus from '@lib/directus';
const global = await directus.request(readSingleton('site_global'));
---
<section class="max-w-340 2xl:max-w-full px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
<div class="flex flex-col sm:flex-row items-center justify-center gap-y-2 sm:gap-x-12 sm:gap-y-0 lg:gap-x-24">
<div class="max-w-5xl sm:px-6 lg:px-8">
<div class="flex flex-wrap gap-6 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3 justify-center">
<section class="max-w-340 2xl:max-w-full px-4 py-10 mx-auto mb-2 md:mb-8">
<div class="flex items-center justify-center">
<div class="max-w-5xl">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 lg:gap-6">
<FeaturesCard
title="Cloud Engineer"
description="Full stack and cloud engineer."

View File

@@ -1,7 +1,7 @@
---
import GoLinkPrimaryButton from '@components/buttons/GoLinkPrimaryButton.astro';
import Logo from '@components/images/Logo.astro';
import { getDirectusImageURL } from '@/support/url';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
title: string;

View File

@@ -1,8 +1,13 @@
---
import { Image } from 'astro:assets';
import { readItems } from '@directus/sdk';
import type { HeaderImage } from '@lib/directusTypes';
import GoLinkPrimaryButton from '@components/buttons/GoLinkPrimaryButton.astro';
import GoLinkSecondaryButton from '@components/buttons/GoLinkSecondaryButton.astro';
import directus from '@lib/directus';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
title: string;
@@ -11,18 +16,24 @@ interface Props {
primaryBtnURL?: string;
secondaryBtn?: string;
secondaryBtnURL?: string;
src?: any;
alt?: string;
rounded?: boolean;
}
const { title, subTitle, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL, src, alt } = Astro.props;
const { title, subTitle, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL } = Astro.props;
const roundedClasses = Astro.props.rounded ? "rounded-2xl" : null;
const imagesData = ((await directus.request(
readItems('header_images', {
fields: ['*'],
})
)) as unknown) as HeaderImage[];
const images = await Promise.all(imagesData.map(async (img) => ({
...img,
src: await getDirectusImageURL(img.image)
})));
---
<section 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>
<section class="grid md:grid-cols-2 md:items-center gap-4 md:gap-8 max-w-340 2xl:max-w-full px-4 py-14 sm:px-6 lg:px-8">
<div class="md:ml-12">
<h1 class="smooth-reveal card-text-header block lg:text-7xl">
<Fragment set:html={title} />
</h1>
@@ -36,22 +47,62 @@ const roundedClasses = Astro.props.rounded ? "rounded-2xl" : null;
{secondaryBtn && <GoLinkSecondaryButton title={secondaryBtn} url={secondaryBtnURL} />}
</div>
</div>
<div class="smooth-reveal-fade md:block w-full hidden">
<div class="flex justify-center w-full top-12 md:ml-4 overflow-hidden">
{src && alt && (
<Image
src={src}
alt={alt}
class={`h-full w-105 scale-100 object-cover object-center ${roundedClasses}`}
draggable="false"
loading="eager"
format="webp"
quality="low"
widths={[840]}
inferSize={true}
/>
)}
<div class="smooth-reveal-fade md:block w-full hidden md:mr-12">
<div
class="flex justify-center w-full top-12 md:ml-4 overflow-hidden no-js-fallback"
id="hero-image-container"
>
{images.map((img, index) => (
<div
class="hero-image hidden justify-center w-full h-full"
data-index={index}
>
<Image
class="h-full w-105 scale-100 object-cover object-center"
src={img.src}
alt={img.image_alt}
draggable="false"
loading="eager"
format="webp"
widths={[840]}
inferSize={true}
/>
</div>
))}
</div>
<style>
.no-js-fallback .hero-image:first-child {
display: flex !important;
}
</style>
<script is:inline>
document.getElementById('hero-image-container')?.classList.remove('no-js-fallback');
</script>
</div>
</section>
<script>
function initHeroImage() {
const container = document.getElementById('hero-image-container');
if (container) {
const images = container.querySelectorAll('.hero-image');
images.forEach(img => {
img.classList.remove('flex');
img.classList.add('hidden');
});
if (images.length > 0) {
const randomIndex = Math.floor(Math.random() * images.length);
images[randomIndex].classList.remove('hidden');
images[randomIndex].classList.add('flex');
}
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initHeroImage);
} else {
initHeroImage();
}
if ((window as any).swup) {
(window as any).swup.hooks.on('page:view', initHeroImage);
}
</script>

View File

@@ -1,7 +1,11 @@
---
import { readSingleton } from '@directus/sdk';
import type { Post } from '@lib/directusTypes';
import BlogCard from '@components/cards/BlogCard.astro';
import LargeLinkCard from '@components/cards/LargeLinkCard.astro';
import directus from '@lib/directus';
interface Props {
posts: Post[];
@@ -9,10 +13,12 @@ interface Props {
subTitle?: string;
}
const global = await directus.request(readSingleton('site_global'));
const { posts, title, subTitle } = Astro.props;
---
<section class="max-w-340 2xl:max-w-full px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
<section class="max-w-340 2xl:max-w-full px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-4">
<div class="text-center max-w-2xl mx-auto mb-10 lg:mb-14">
<h1 class="smooth-reveal card-text-header block">
{title}
@@ -23,7 +29,18 @@ 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>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
{posts.map((b) =>
<BlogCard post={b} />
)}
<div class="col-span-full">
<LargeLinkCard
title="All Posts"
subTitle="Catch up on everything I've written"
url="/all"
logoLight={global.all_logoLight}
logoDark={global.all_logoDark}
/>
</div>
</div>
</section>

View File

@@ -11,25 +11,10 @@ interface Props {
const { posts } = Astro.props;
---
<section class="smooth-reveal flex flex-col gap-4">
<section class="smooth-reveal-cards 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}`}
img={post.image}
imgAlt={post.image_alt}
/>
<LargeBlogLeftCard post={post}/>
) : (
<LargeBlogRightCard
title={post.title}
subTitle={post.description}
url={`/blog/${post.slug}`}
single={!post.image_second}
imgOne={post.image}
imgOneAlt={post.image_alt}
imgTwo={post?.image_second}
imgTwoAlt={post?.image_second_alt}
/>
<LargeBlogRightCard post={post}/>
))}
</section>

View File

@@ -1,13 +1,13 @@
---
import WeatherCard from '@components/cards/WeatherCard.astro';
import { getFiveDayForecast } from '@support/weather';
import { getFiveDayForecast } from '@/scripts/weather';
const { latitude = "44.95", longitude = "-93.09", cityName = "St. Paul, Minnesota", timezone = "America/Chicago" } = Astro.props;
const { forecastDays, error } = await getFiveDayForecast(latitude, longitude, timezone);
---
<section class="max-w-340 2xl:max-w-fullpx-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
<section class="max-w-340 2xl:max-w-full px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
<div class="text-center max-w-2xl mx-auto mb-10 lg:mb-14">
<h1 class="smooth-reveal card-text-header block">
Weather in my Area
@@ -19,18 +19,24 @@ const { forecastDays, error } = await getFiveDayForecast(latitude, longitude, ti
</div>
</div>
{error ? (
<div class="card-base p-10 text-accent text-center">
{error}
<div class="smooth-reveal flex flex-wrap justify-center gap-4 lg:gap-6">
<div class="card-base flex flex-col justify-center items-center p-10 w-48 h-56">
<h1 class="card-text-header block text-accent text-center">
Sorry, {error.toLowerCase()}
</h1>
</div>
</div>
) : (
<div class="flex flex-wrap justify-center gap-4 lg:gap-6">
{forecastDays.map((forecastDay) => (
<WeatherCard
dayName={forecastDay.dayName}
label={forecastDay.label}
icon={forecastDay.icon}
temp={forecastDay.temp}
/>
{forecastDays.map((forecastDay, index) => (
<div class={index === 3 ? "hidden min-[800px]:block" : index >= 4 ? "hidden min-[1100px]:block" : ""}>
<WeatherCard
dayName={forecastDay.dayName}
label={forecastDay.label}
icon={forecastDay.icon}
temp={forecastDay.temp}
/>
</div>
))}
</div>
)}

View File

@@ -0,0 +1,81 @@
---
import getReadingTime from 'reading-time';
import type { Post } from '@lib/directusTypes';
import Logo from '@components/images/Logo.astro';
import { formatShortDate, formatDate } from '@/scripts/time';
import { getDirectusImageURL } from '@/scripts/url';
interface Props {
post: Post;
enableCategoryLink?: boolean;
dateFormat?: 'short' | 'long';
}
const { post, enableCategoryLink = true, dateFormat = 'short' } = Astro.props;
const readingTime = getReadingTime(post.content || '');
---
<ol class="flex items-center justify-start card-text-description text-sm whitespace-nowrap gap-2 sm:gap-0 overflow-hidden">
{post.category && (
<li class="inline-flex items-center">
{enableCategoryLink ? (
<a
class="inline-flex items-center hover:card-hover-text-description overflow-hidden"
href={`/categories/${post.category.slug}`}
data-astro-prefetch
>
<div class="flex flex-row items-center shrink-0">
<div class="mr-2">
<Logo
srcLight={getDirectusImageURL(post.category.logoLight)}
srcDark={getDirectusImageURL(post.category.logoDark)}
alt={`Logo of ${post.category.title}`}
width={18}
height={18}
/>
</div>
{post.category.title}
</div>
</a>
) : (
<div class="inline-flex items-center overflow-hidden">
<div class="flex flex-row items-center shrink-0">
<div class="mr-2">
<Logo
srcLight={getDirectusImageURL(post.category.logoLight)}
srcDark={getDirectusImageURL(post.category.logoDark)}
alt={`Logo of ${post.category.title}`}
width={18}
height={18}
/>
</div>
{post.category.title}
</div>
</div>
)}
</li>
)}
<li class="inline-flex items-center">
<span class="shrink-0 mx-2">
/
</span>
</li>
<li class="inline-flex items-center">
<span class="shrink-0 overflow-hidden">
{dateFormat === 'short' ? formatShortDate(post.published_date) : formatDate(post.published_date)}
</span>
</li>
<li class="inline-flex items-center">
<span class="shrink-0 mx-2">
/
</span>
</li>
<li class="inline-flex items-center">
<span class="shrink-0 overflow-hidden">
{readingTime.minutes.toPrecision(1)} minutes
</span>
</li>
</ol>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -1,5 +1,4 @@
---
import { ClientRouter } from 'astro:transitions';
import { readSingleton } from '@directus/sdk';
import BaseHead from '@components/BaseHead.astro';
@@ -39,8 +38,7 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
structuredData={structuredData}
/>
<ClientRouter fallback="swap" />
<!-- Set Theme -->
<script is:inline>
const theme = (() => {
if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) {
@@ -60,6 +58,12 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
window.localStorage.setItem('theme', theme);
</script>
<!-- Preline -->
<script
src="/vendor/preline/collapse2.1.0.min.js"
is:inline
/>
<!-- Rybbit Tracking Snippet -->
<script
src="https://rybbit.alexlebens.dev/api/script.js"
@@ -68,72 +72,105 @@ 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>
<!-- 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 class="has-js scroll-fade-container min-h-screen">
<slot />
</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');
};
import { initPhotoSwipe } from '@/scripts/photoswipe';
import { animateContent } from '@/scripts/animations';
window.removeEventListener('scroll', onScroll);
window.addEventListener('scroll', onScroll, { passive: true });
const resetScroll = () => {
const scrollContainer = document.getElementById('reset-scroll');
if (scrollContainer) scrollContainer.scrollTop = 0;
};
onScroll();
resetScroll();
initPhotoSwipe();
animateContent();
const observer = new MutationObserver((mutations) => {
const hasNewNodes = mutations.some(
(mutation) => mutation.type === 'childList' && mutation.addedNodes.length > 0
);
if (hasNewNodes) {
animateContent();
if (typeof (window as any).HSStaticMethods !== 'undefined') {
(window as any).HSStaticMethods.autoInit();
}
}
});
const targetNode = document.getElementById('reset-scroll');
if (targetNode) {
observer.observe(targetNode, { childList: true, subtree: true });
}
document.addEventListener('swup:page:view', () => {
resetScroll();
initPhotoSwipe();
animateContent();
if (typeof (window as any).HSStaticMethods !== 'undefined') {
(window as any).HSStaticMethods.autoInit();
}
if (typeof (window as any).rybbit === 'function') {
(window as any).rybbit('trackPageview');
}
});
</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 */
.bg {
animation: slide 25s ease-in-out infinite alternate;
will-change: transform;
background-image: linear-gradient(-55deg, var(--bg-primary) 33.3%, var(--bg-secondary) 33.3%, var(--bg-secondary) 66.6%, var(--bg-tertiary) 66.6%);
filter: blur(40px);
top: 0;
@@ -149,9 +186,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

@@ -5,6 +5,7 @@ import type {
Weather,
Post,
Category,
HeaderImage,
Application,
Experience,
Education,
@@ -13,13 +14,14 @@ import type {
Skill,
} from '@lib/directusTypes';
import { getDirectusURL } from '@/support/url';
import { getDirectusURL } from '@/scripts/url';
type Schema = {
site_global: Global;
site_weather: Weather;
posts: Post[];
categories: Category[];
header_images: HeaderImage[];
site_applications: Application;
site_experience: Experience;
site_education: Education;

View File

@@ -10,16 +10,10 @@ export type Global = {
site_url: string;
rybbit_site_id: string;
logo: string;
all_logoLight: string;
all_logoDark: string;
portrait: string;
portrait_alt: string;
home_image: string;
home_image_alt: string;
blog_image: string;
blog_image_alt: string;
categories_image: string;
categories_image_alt: string;
applications_image: string;
applications_image_alt: string;
footer_image: string;
footer_image_alt: string;
};
@@ -37,7 +31,7 @@ export type Post = {
title: string;
description: string;
tags: string[];
category: string;
category: Category;
selected: boolean;
published: boolean;
content: string;
@@ -57,6 +51,12 @@ export type Category = {
logoDark: string;
};
export type HeaderImage = {
id: string;
image: string;
image_alt: string;
};
export type Application = {
id: string;
name: string;

View File

@@ -86,24 +86,6 @@ const global = await directus.request(readSingleton('site_global'));
const randomFact = funFacts[Math.floor(Math.random() * funFacts.length)];
funFactElement.textContent = randomFact;
}
// 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');
},
100 + index * 150
);
});
};
animateContent();
});
</script>
<style>

View File

@@ -9,8 +9,6 @@ import SkillsSliderSection from '@components/sections/SkillsSliderSection.astro'
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
import portraitImg from '@images/portrait.avif';
const global = await directus.request(readSingleton('site_global'));
---
@@ -37,9 +35,6 @@ const global = await directus.request(readSingleton('site_global'));
<HeroSection
title="About Me"
subTitle={global.about}
src={portraitImg}
alt={global.portrait_alt}
rounded={true}
/>
<section class="max-w-7xl px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto">
@@ -52,33 +47,3 @@ const global = await directus.request(readSingleton('site_global'));
</section>
</BaseLayout>
<script>
// Add smooth reveal animations for content after loading
document.addEventListener('astro:page-load', () => {
const animateContent = () => {
const smoothReveal = document.querySelectorAll('.smooth-reveal');
smoothReveal.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
50 + index * 100
);
});
// Animate with just fade in with staggered delay
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
smoothRevealFade.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal-fade');
},
100 + index * 250
);
});
};
animateContent();
});
</script>

54
src/pages/all.astro Normal file
View File

@@ -0,0 +1,54 @@
---
import { readItems, readSingleton } from '@directus/sdk';
import HeaderSection from '@components/sections/HeaderSection.astro';
import BlogCard from '@components/cards/BlogCard.astro';
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
const global = await directus.request(readSingleton('site_global'));
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*', { category: ['*'] }],
sort: ['-published_date'],
})
);
---
<BaseLayout
title="All Posts"
description="Browse all articles from every category."
structuredData={{
'@context': 'https://schema.org',
'@type': 'WebPage',
inLanguage: 'en-US',
'@id': Astro.url.href,
url: Astro.url.href,
name: `All Posts | ${global.name}`,
description: "Browse all articles from every category.",
isPartOf: {
url: `${global.site_url}`,
name: global.name,
description: global.about,
},
}}
>
<HeaderSection
title="All Posts"
subTitle="Browse all posts from every category."
btnExists
btnTitle="To Categories"
btnURL="/categories"
/>
<section class="max-w-340 2xl:max-w-full mb-10 px-4 sm:px-6 lg:px-8 py-8 mx-auto mt-10">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
{posts.map((b) =>
<BlogCard post={b} />
)}
</div>
</section>
</BaseLayout>

View File

@@ -6,8 +6,6 @@ import ApplicationSection from '@components/sections/ApplicationSection.astro';
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
import applicationImg from '@images/cedar_tree.png';
const global = await directus.request(readSingleton('site_global'));
---
@@ -34,30 +32,8 @@ const global = await directus.request(readSingleton('site_global'));
<HeroSection
title="Applications"
subTitle={global.about_applications}
src={applicationImg}
alt={global.applications_image_alt}
/>
<ApplicationSection className="smooth-reveal-2" />
</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

@@ -1,58 +1,64 @@
---
import { Image } from 'astro:assets';
import getReadingTime from 'reading-time';
import { marked } from 'marked';
import markedShiki from 'marked-shiki';
import { createHighlighter } from 'shiki';
import { readItems, readSingleton } from '@directus/sdk';
import "photoswipe/style.css";
import type { Post } from '@/lib/directusTypes'
import SocialShareButton from '@components/buttons/SocialShareButton.astro';
import Logo from '@components/images/Logo.astro';
import PostMetadataSnippet from '@/components/snippets/PostMetadataSnippet.astro';
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
import { formatDate } from '@support/time';
import { getDirectusImageURL } from '@/support/url';
const post = Astro.props;
import { getDirectusImageURL } from '@/scripts/url';
export async function getStaticPaths() {
const posts = await directus.request(readItems('posts'));
return posts.map((post) => ({
const posts = await directus.request(readItems('posts', {
fields: ['*', { category: ['*'] }],
}));
const globalData = await directus.request(readSingleton('site_global'));
const highlighter = await createHighlighter({
themes: ['github-light', 'github-dark'],
langs: ['typescript', 'python', 'css', 'html', 'yaml', 'bash', 'json'],
});
const renderer = {
image({ href, title, text }: { href: string; title: string | null; text: string }) {
return `
<a
href="${href}"
class="pswp-link"
data-pswp-src="${href}"
target="_blank"
>
<img src="${href}" alt="${text}" title="${title || ''}" loading="lazy" />
</a>
`;
},
};
marked.use({ renderer });
marked.use(markedShiki({
highlight(code, lang) {
return highlighter.codeToHtml(code, {
lang: lang || 'plaintext',
themes: { light: 'github-light', dark: 'github-dark' },
defaultColor: false,
});
}
}));
return posts.map((post: Post) => ({
params: { slug: post.slug },
props: post,
props: {
post,
global: globalData,
content: marked.parse(post.content || ''),
},
}));
}
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 readingTime = getReadingTime(post.content || '');
const highlighter = await createHighlighter({
themes: ['github-light', 'github-dark'],
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 || '');
const { post, global, content } = Astro.props;
---
<BaseLayout
@@ -72,7 +78,7 @@ const content = marked.parse(post.content || '');
name: global.name,
description: global.about,
},
image: [],
image: [getDirectusImageURL(post.image)],
headline: post.title,
datePublished: post.published_date,
dateModified: post.updated_date,
@@ -92,7 +98,7 @@ const content = marked.parse(post.content || '');
<Image
class="rounded-2xl sm:rounded-b-none w-full max-h-150 object-cover"
src={getDirectusImageURL(post.image)}
alt={post.image_alt}
alt={post.image_alt || post.title}
draggable="false"
format="webp"
loading="lazy"
@@ -103,46 +109,12 @@ const content = marked.parse(post.content || '');
<h2 class="card-text-header block">
{post.title}
</h2>
<ol class="flex items-center justify-center sm:justify-start whitespace-nowrap gap-2 sm:gap-0 mt-6 sm:mt-4">
{category && (
<li class="inline-flex items-center">
<a
class="inline-flex items-center text-secondary hover:text-secondary-hover text-sm transition-all duration-300"
href=`/categories/${category.slug}`
data-astro-prefetch
>
<div class="flex flex-row items-center shrink-0">
<div class="mr-2">
<Logo
srcLight={getDirectusImageURL(category.logoLight)}
srcDark={getDirectusImageURL(category.logoDark)}
alt={`Logo of ${category.title}`}
width = 18,
height = 18,
/>
</div>
{category.title}
</div>
</a>
<span class="shrink-0 text-secondary text-sm mx-2 sm:mx-4">
/
</span>
</li>
)}
<li class="inline-flex items-center">
<span class="shrink-0 text-secondary text-sm">
{formatDate(post.published_date)}
</span>
<span class="shrink-0 text-secondary text-sm mx-2 sm:mx-4">
/
</span>
</li>
<li class="inline-flex items-center">
<span class="shrink-0 text-secondary text-sm">
{readingTime.minutes.toPrecision(1)} minutes to read
</span>
</li>
</ol>
<div class="mt-4 sm:mt-6">
<PostMetadataSnippet
post={post}
dateFormat='long'
/>
</div>
</div>
<div class="border-t border-divider mt-10 mb-10"/>
@@ -151,13 +123,15 @@ const content = marked.parse(post.content || '');
</article>
<div class="grid sm:flex sm:items-center sm:justify-between gap-y-5 sm:gap-y-0 max-w-5xl mx-auto mt-10 md:mt-14">
<div class="flex flex-wrap sm:flex-nowrap sm:items-center gap-x-2 gap-y-1 sm:gap-y-0">
{post.tags.map((tag: string) => (
<span class="inline-flex items-center button-base bg-cobalt dark:bg-turquoise text-neutral-100 text-xs font-bold rounded-lg gap-x-1.5 px-3 py-1.5">
{tag}
</span>
))}
</div>
{post.tags && post.tags.length > 0 && (
<div class="flex flex-wrap sm:flex-nowrap sm:items-center gap-x-2 gap-y-1 sm:gap-y-0">
{post.tags.map((tag: string) => (
<span class="inline-flex items-center button-base bg-cobalt dark:bg-turquoise text-neutral-100 text-xs font-bold rounded-lg gap-x-1.5 px-3 py-1.5">
{tag}
</span>
))}
</div>
)}
<SocialShareButton pageTitle={post.title}/>
</div>
</div>
@@ -180,22 +154,3 @@ const content = marked.parse(post.content || '');
</style>
</BaseLayout>
<script>
// Add smooth reveal animations for content after loading
document.addEventListener('astro:page-load', () => {
const animateContent = () => {
const smoothReveal = document.querySelectorAll('.smooth-reveal');
smoothReveal.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
100 + index * 100
);
});
};
animateContent();
});
</script>

View File

@@ -9,18 +9,16 @@ import RecentPostsSection from '@components/sections/RecentPostsSection.astro';
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
import blogImg from '@images/autumn_tree.png';
const global = await directus.request(readSingleton('site_global'));
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*'],
fields: ['*', { category: ['*'] }],
sort: ['-published_date'],
})
);
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);
@@ -49,8 +47,6 @@ const recentPosts: Post[] = posts.filter(
<HeroSection
title="Blog"
subTitle={global.about_blog}
src={blogImg}
alt={global.blog_image_alt}
/>
<SelectedPostsSection posts={selectedPosts} />
@@ -61,56 +57,3 @@ const recentPosts: Post[] = posts.filter(
/>
</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');
},
200 + index * 300
);
});
// Animate group 2
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
smoothReveal2.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
500 + index * 100
);
});
// Animate topic cards with staggered delay
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
smoothRevealCards.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
1000 + index * 250
);
});
// Animate with just fade in with staggered delay
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
smoothRevealFade.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal-fade');
},
100 + index * 250
);
});
};
animateContent();
});
</script>

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: ['*'] }],
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;
});
---
@@ -65,9 +65,11 @@ const categoriesPosts = posts
/>
<section class="max-w-340 2xl:max-w-full mb-10 px-4 sm:px-6 lg:px-8 py-8 mx-auto mt-10">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="columns-1 sm:columns-2 lg:columns-3 gap-6">
{categoriesPosts.map((b) =>
<BlogCard post={b} />
<div class="break-inside-avoid mb-6">
<BlogCard post={b} />
</div>
)}
</div>
</section>

View File

@@ -6,8 +6,6 @@ import CategorySection from '@components/sections/CategorySection.astro';
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
import categoryImg from '@images/autumn_bench.png';
const global = await directus.request(readSingleton('site_global'));
---
@@ -34,63 +32,8 @@ const global = await directus.request(readSingleton('site_global'));
<HeroSection
title="Categories"
subTitle={global.about_categories}
src={categoryImg}
alt={global.categories_image_alt}
/>
<CategorySection />
</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
);
});
// Animate group 2
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
smoothReveal2.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
200 + index * 150
);
});
// Animate topic cards with staggered delay
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
smoothRevealCards.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
500 + index * 100
);
});
// Animate with just fade in with staggered delay
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
smoothRevealFade.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal-fade');
},
100 + index * 250
);
});
};
animateContent();
});
</script>

View File

@@ -11,14 +11,12 @@ import GiteaSection from '@components/sections/GiteaSection.astro';
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
import homeImg from '@images/autumn_mountain.png';
const global = await directus.request(readSingleton('site_global'));
const weather = await directus.request(readSingleton('site_weather'));
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*'],
fields: ['*', { category: ['*'] }],
sort: ['-published_date'],
})
);
@@ -53,25 +51,39 @@ const recentPosts = posts
subTitle={global.about_description}
primaryBtn="About Me"
primaryBtnURL="/about"
src={homeImg}
alt={global.home_image_alt}
/>
<FeatureSection />
<RecentPostsSection
posts={recentPosts}
title="Latest Posts"
subTitle="Checkout my most recent thoughts here"
/>
<WeatherSection
server:defer
latitude={weather.latitude}
longitude={weather.longitude}
cityName={weather.location}
timezone={weather.timezone}
/>
<RecentPostsSection
posts={recentPosts}
title="Latest Posts"
subTitle="Checkout my most recent thoughts here"
/>
>
<div slot="fallback" class="max-w-340 2xl:max-w-full px-4 sm:px-6 lg:px-8 py-10 lg:py-14 mx-auto mb-2 md:mb-8">
<div class="text-center max-w-2xl mx-auto mb-10 lg:mb-14">
<h1 class="smooth-reveal card-text-header block">
Loading weather...
</h1>
<div class="smooth-reveal mx-auto mt-5 max-w-3xl text-center flex justify-center">
<div class="h-6 w-64"></div>
</div>
</div>
<div class="flex flex-wrap justify-center gap-4 lg:gap-6">
{Array.from({ length: 5 }).map((_, index) => (
<div class={`card-base h-62.5 w-40 animate-pulse bg-neutral-200 dark:bg-neutral-800 ${index === 3 ? "hidden min-[800px]:block" : index >= 4 ? "hidden min-[1100px]:block" : ""}`}></div>
))}
</div>
</div>
</WeatherSection>
<GiteaSection
title="Follow me on Gitea"
@@ -80,62 +92,3 @@ const recentPosts = posts
/>
</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
);
});
// Animate group 2
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
smoothReveal2.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
200 + index * 250
);
});
// Animate topic cards with staggered delay
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
smoothRevealCards.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
400 + index * 250
);
});
// Animate with just fade in with staggered delay
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
smoothRevealFade.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal-fade');
},
100 + index * 250
);
});
};
animateContent();
const observer = new MutationObserver(() => {
animateContent();
});
observer.observe(document.body, { childList: true, subtree: true });
});
</script>

View File

@@ -4,6 +4,8 @@ import rss, { type RSSFeedItem } from '@astrojs/rss';
import type { APIContext } from 'astro';
import { transform, walk } from 'ultrahtml';
import sanitize from 'ultrahtml/transformers/sanitize';
import MarkdownIt from 'markdown-it';
import { readItems, readSingleton } from '@directus/sdk';
import directus from '@lib/directus';
@@ -12,6 +14,8 @@ const global = await directus.request(readSingleton('site_global'));
export async function GET(context: APIContext) {
let baseUrl = context.site?.href || global.site_url;
const parser = new MarkdownIt();
if (baseUrl.at(-1) === '/') {
baseUrl = baseUrl.slice(0, -1);
}
@@ -26,7 +30,7 @@ export async function GET(context: APIContext) {
const feedItems: RSSFeedItem[] = [];
for (const post of posts) {
const content = await transform(post.content.replace(/^<!DOCTYPE html>/, ''), [
const content = await transform(parser.render(post.content), [
async (node) => {
await walk(node, (node) => {
if (node.name === 'a' && node.attributes.href?.startsWith('/')) {

31
src/scripts/animations.ts Normal file
View File

@@ -0,0 +1,31 @@
const animateContent = () => {
const smoothReveal = document.querySelectorAll('.smooth-reveal');
smoothReveal.forEach((el, index) => {
setTimeout(() => {
el.classList.add('animate-reveal');
}, 50 + index * 100);
});
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
smoothReveal2.forEach((el, index) => {
setTimeout(() => {
el.classList.add('animate-reveal');
}, 200 + index * 250);
});
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
smoothRevealCards.forEach((el, index) => {
setTimeout(() => {
el.classList.add('animate-reveal');
}, 400 + index * 250);
});
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
smoothRevealFade.forEach((el, index) => {
setTimeout(() => {
el.classList.add('animate-reveal-fade');
}, 100 + index * 250);
});
};
export { animateContent };

38
src/scripts/photoswipe.ts Normal file
View File

@@ -0,0 +1,38 @@
import PhotoSwipeLightbox from 'photoswipe/lightbox';
import PhotoSwipe from "photoswipe";
let lightbox: PhotoSwipeLightbox | null = null;
function initPhotoSwipe() {
const links = document.querySelectorAll<HTMLAnchorElement>('a.pswp-link');
links.forEach((link) => {
const img = link.querySelector('img');
if (img) {
const applyDimensions = () => {
link.dataset.pswpWidth = (img.naturalWidth || 1920).toString();
link.dataset.pswpHeight = (img.naturalHeight || 1080).toString();
};
if (img.complete) {
applyDimensions();
} else {
img.addEventListener('load', applyDimensions);
}
}
});
if (lightbox) {
lightbox.destroy();
}
lightbox = new PhotoSwipeLightbox({
gallery: '.prose',
children: 'a.pswp-link',
pswpModule: PhotoSwipe,
allowPanToNext: true,
});
lightbox.init();
}
export { initPhotoSwipe };

28
src/scripts/time.ts Normal file
View File

@@ -0,0 +1,28 @@
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
dayjs.extend(relativeTime);
function formatFromNow(date: Date | null): string {
if (!date) {
return 'none';
}
return dayjs(date).fromNow()
}
function formatDate(date: Date): string {
return new Date(date).toLocaleDateString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric',
})
}
function formatShortDate(date: Date): string {
return new Date(date).toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
})
}
export { formatFromNow, formatDate, formatShortDate, };

View File

@@ -6,7 +6,7 @@ const getSiteURL = () => {
return 'https://www.alexlebens.dev';
};
async function getDirectusImageURL(image: string) {
function getDirectusImageURL(image: string) {
return `${getDirectusURL()}/assets/${image}`;
}

View File

@@ -1,5 +1,7 @@
@import 'tailwindcss';
@import './utilities.css';
@import './utilities-buttons.css';
@import './utilities-cards.css';
@import './utilities-misc.css';
@plugin '@tailwindcss/typography';
@plugin '@tailwindcss/forms';
@@ -43,6 +45,29 @@
--color-background-card: light-dark(color-mix(in srgb, var(--color-neutral-100) 80%, transparent), color-mix(in srgb, var(--color-neutral-800) 60%, transparent));
--color-divider: light-dark(color-mix(in srgb, var(--color-slate-400) 40%, transparent), color-mix(in srgb, var(--color-neutral-500) 50%, transparent));
/* Typography */
--color-prose-blog-body: var(--color-neutral-700);
--color-prose-blog-headings: var(--color-neutral-900);
--color-prose-blog-links: var(--color-orange-300);
--color-prose-blog-invert-body: var(--color-neutral-400);
--color-prose-blog-invert-headings: var(--color-neutral-200);
--radius-markdown-img: 0.5rem;
/* Reveal Animations */
--animate-reveal: reveal 0.8s ease forwards;
--animate-reveal-fade: reveal-fade 1.8s ease forwards;
@keyframes reveal {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-fade {
from { opacity: 0; }
to { opacity: 1; }
}
}
@layer base {
@@ -51,7 +76,6 @@
-moz-osx-font-smoothing: grayscale;
--theme-transition: 0.3s ease;
--scroll-offset: 0px;
}
:root:where(.dark, .dark *) {
@@ -90,7 +114,54 @@
border-color var(--theme-transition);
}
/* Shiki syntax highlighting */
/* Typography */
.prose blockquote {
font-style: normal;
quotes: none;
}
.prose img {
@apply rounded-lg;
}
.prose-blog {
--tw-prose-body: var(--color-neutral-700);
--tw-prose-headings: var(--color-neutral-900);
--tw-prose-lead: var(--color-neutral-700);
--tw-prose-links: var(--color-orange-300);
--tw-prose-bold: var(--color-neutral-900);
--tw-prose-counters: var(--color-neutral-600);
--tw-prose-bullets: var(--color-neutral-400);
--tw-prose-hr: var(--color-neutral-300);
--tw-prose-quotes: var(--color-neutral-500);
--tw-prose-quote-borders: var(--color-neutral-300);
--tw-prose-captions: var(--color-neutral-700);
--tw-prose-code: var(--color-neutral-700);
--tw-prose-pre-code: var(--color-neutral-900);
--tw-prose-pre-bg: var(--color-white);
--tw-prose-th-borders: var(--color-neutral-300);
--tw-prose-td-borders: var(--color-neutral-200);
&:where(.dark, .dark *) {
--tw-prose-body: var(--color-neutral-400);
--tw-prose-headings: var(--color-neutral-200);
--tw-prose-lead: var(--color-neutral-300);
--tw-prose-links: var(--color-orange-300);
--tw-prose-bold: var(--color-neutral-300);
--tw-prose-counters: var(--color-neutral-400);
--tw-prose-bullets: var(--color-neutral-600);
--tw-prose-hr: var(--color-neutral-700);
--tw-prose-quotes: var(--color-neutral-500);
--tw-prose-quote-borders: var(--color-neutral-500);
--tw-prose-captions: var(--color-neutral-400);
--tw-prose-code: var(--color-neutral-350);
--tw-prose-pre-code: var(--color-neutral-300);
--tw-prose-th-borders: var(--color-neutral-600);
--tw-prose-td-borders: var(--color-neutral-700);
}
}
/* Shiki */
:root {
--shiki-fg: var(--shiki-light);
--shiki-bg: var(--color-neutral-200);
@@ -114,32 +185,3 @@
color: var(--shiki-dark) !important;
}
}
/* Content reveal animations */
.smooth-reveal,
.smooth-reveal-2,
.smooth-reveal-cards {
opacity: 0;
transform: translateY(20px);
transition:
opacity 0.8s ease,
transform 0.8s ease;
}
.animate-reveal {
opacity: 1 !important;
transform: translateY(0) !important;
}
.smooth-reveal-fade {
opacity: 0;
transform: translateY(0px);
transition:
opacity 1.8s ease,
transform 0.8s ease;
}
.animate-reveal-fade {
opacity: 1 !important;
transform: translateY(0) !important;
}

View File

@@ -0,0 +1,51 @@
@utility button-base {
@apply transition-all duration-300
border border-transparent
shadow-sm hover:shadow-md dark:shadow-md dark:hover:shadow-lg
px-4 py-3
}
@utility button-base-hidden {
@apply transition-all duration-300
border border-transparent
hover:bg-neutral-200 dark:hover:bg-neutral-700
p-2
}
@utility button-hover-arrow {
@apply translate-y-px transition duration-300
group-hover:translate-x-1
h-3 w-3 md:h-5 md:w-5
}
@utility button-text-title {
@apply text-neutral-200 2xl:text-base
text-sm font-bold
}
@utility button-text-title-hidden {
@apply transition-all duration-300
text-neutral-600 group-hover:text-neutral-700 dark:text-neutral-400 dark:group-hover:text-neutral-300 2xl:text-base
text-sm font-medium
}
@utility button-bg-blue {
@apply transition-all duration-300
bg-cobalt hover:bg-steel dark:bg-steel dark:hover:bg-cobalt
}
@utility button-bg-teal {
@apply transition-all duration-300
bg-bermuda hover:bg-turquoise group-hover:bg-turquoise dark:bg-turquoise dark:hover:bg-bermuda dark:group-hover:bg-bermuda
}
@utility button-bg-neutral {
@apply transition-all duration-300
border border-neutral-100 dark:border-stone-500/20
bg-background-card hover:bg-neutral-100 dark:hover:bg-neutral-800/90
}
@utility button-bg-gitea {
@apply transition-all duration-300
bg-gitea-primary hover:bg-gitea-secondary dark:bg-gitea-secondary dark:hover:bg-gitea-primary
}

View File

@@ -1,57 +1,3 @@
/* Button classes */
@utility button-base {
@apply transition-all duration-300
border border-transparent
shadow-sm hover:shadow-md dark:shadow-md dark:hover:shadow-lg
px-4 py-3
}
@utility button-base-hidden {
@apply transition-all duration-300
border border-transparent
hover:bg-neutral-200 dark:hover:bg-neutral-700
p-2
}
@utility button-hover-arrow {
@apply translate-y-px transition duration-300
group-hover:translate-x-1
h-3 w-3 md:h-5 md:w-5
}
@utility button-text-title {
@apply text-neutral-200 2xl:text-base
text-sm font-bold
}
@utility button-text-title-hidden {
@apply transition-all duration-300
text-neutral-600 group-hover:text-neutral-700 dark:text-neutral-400 dark:group-hover:text-neutral-300 2xl:text-base
text-sm font-medium
}
@utility button-bg-blue {
@apply transition-all duration-300
bg-cobalt hover:bg-steel dark:bg-steel dark:hover:bg-cobalt
}
@utility button-bg-teal {
@apply transition-all duration-300
bg-bermuda hover:bg-turquoise group-hover:bg-turquoise dark:bg-turquoise dark:hover:bg-bermuda dark:group-hover:bg-bermuda
}
@utility button-bg-neutral {
@apply transition-all duration-300
border border-neutral-100 dark:border-stone-500/20
bg-background-card hover:bg-neutral-100 dark:hover:bg-neutral-800/90
}
@utility button-bg-gitea {
@apply transition-all duration-300
bg-gitea-primary hover:bg-gitea-secondary dark:bg-gitea-secondary dark:hover:bg-gitea-primary
}
/* Card classes */
@utility card-base {
@apply transition-all duration-300
rounded-xl
@@ -76,7 +22,7 @@
@utility card-hover-icon-scale {
@apply transition-transform duration-300 will-change-transform
drop-shadow-md dark:drop-shadow-xl dark:drop-shadow-neutral-500/60
group-hover:scale-3d group-hover:scale-110
group-hover:scale-3d group-hover:scale-105
}
@utility card-text-header {
@@ -127,9 +73,7 @@
@apply text-secondary
}
/* Misc */
@utility nav-base {
@apply border border-neutral-100 dark:border-stone-500/20
bg-neutral-100 dark:bg-neutral-800
shadow-xs dark:shadow-md
@utility card-hover-text-description {
@apply transition-all duration-300
text-secondary-hover
}

View File

@@ -0,0 +1,44 @@
/* Nav */
@utility nav-base {
@apply border border-neutral-100 dark:border-stone-500/20
bg-neutral-100 dark:bg-neutral-800
shadow-xs dark:shadow-md
}
/* Fade edges of a div */
@utility mask-fade-edges {
-webkit-mask-image:
linear-gradient(to right, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent),
linear-gradient(to bottom, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent);
mask-image:
linear-gradient(to right, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent),
linear-gradient(to bottom, transparent, black var(--fade-dist, 1rem), black calc(100% - var(--fade-dist, 1rem)), transparent);
-webkit-mask-composite: source-in;
mask-composite: intersect;
}
/* Animations */
@utility smooth-reveal {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.8s ease, transform 0.8s ease;
}
@utility smooth-reveal-2 {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.8s ease, transform 0.8s ease;
}
@utility smooth-reveal-cards {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.8s ease, transform 0.8s ease;
}
@utility smooth-reveal-fade {
opacity: 0;
transform: translateY(0px);
transition: opacity 1.8s ease, transform 0.8s ease;
}

View File

@@ -1,50 +0,0 @@
// 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
);
});
// Animate group 2
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
smoothReveal2.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
200 + index * 250
);
});
// Animate topic cards with staggered delay
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
smoothRevealCards.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
400 + index * 250
);
});
// Animate with just fade in with staggered delay
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
smoothRevealFade.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal-fade');
},
100 + index * 250
);
});
};
animateContent();
});

View File

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

View File

@@ -1,42 +0,0 @@
import { format, register } from 'timeago.js';
const TimeAgoConfiguration: string[][] = [
['today', 'today'],
['%s seconds ago', 'in %s seconds'],
['1 minute ago', 'in 1 minute'],
['%s minutes ago', 'in %s minutes'],
['1 hour ago', 'in 1 hour'],
['%s hours ago', 'in %s hours'],
['1 day ago', 'in 1 day'],
['%s days ago', 'in %s days'],
['1 week ago', 'in 1 week'],
['%s weeks ago', 'in %s weeks'],
['1 month ago', 'in 1 month'],
['%s months ago', 'in %s months'],
['1 year ago', 'in 1 year'],
['%s years ago', 'in %s years'],
];
function timeago(date?: Date): string {
if (!date) {
return 'today';
}
const localeFunc = (number: number, index: number, _?: number): [string, string] => {
return TimeAgoConfiguration[index] as [string, string];
};
register('timeago', localeFunc);
return format(date, 'timeago');
}
function formatDate(date: Date): string {
return new Date(date).toLocaleDateString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric',
})
}
export { formatDate, timeago };

View File

@@ -1,64 +1,6 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
'./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}',
'./node_modules/preline/preline.js',
],
darkMode: 'class',
theme: {
extend: {
typography: ({ theme }) => ({
blog: {
css: {
'--tw-prose-body': theme('colors.neutral[700]'),
'--tw-prose-headings': theme('colors.neutral[900]'),
'--tw-prose-lead': theme('colors.neutral[700]'),
'--tw-prose-links': theme('colors.orange[300]'),
'--tw-prose-bold': theme('colors.neutral[900]'),
'--tw-prose-counters': theme('colors.neutral[600]'),
'--tw-prose-bullets': theme('colors.neutral[400]'),
'--tw-prose-hr': theme('colors.neutral[300]'),
'--tw-prose-quotes': theme('colors.neutral[500]'),
'--tw-prose-quote-borders': theme('colors.neutral[300]'),
'--tw-prose-captions': theme('colors.neutral[700]'),
'--tw-prose-code': theme('colors.neutral[700]'),
'--tw-prose-pre-code': theme('colors.neutral[900]'),
'--tw-prose-pre-bg': theme('colors.white'),
'--tw-prose-th-borders': theme('colors.neutral[300]'),
'--tw-prose-td-borders': theme('colors.neutral[200]'),
'--tw-prose-invert-body': theme('colors.neutral[400]'),
'--tw-prose-invert-headings': theme('colors.neutral[200]'),
'--tw-prose-invert-lead': theme('colors.neutral[300]'),
'--tw-prose-invert-links': theme('colors.orange[300]'),
'--tw-prose-invert-bold': theme('colors.neutral[300]'),
'--tw-prose-invert-counters': theme('colors.neutral[400]'),
'--tw-prose-invert-bullets': theme('colors.neutral[600]'),
'--tw-prose-invert-hr': theme('colors.neutral[700]'),
'--tw-prose-invert-quotes': theme('colors.neutral[500]'),
'--tw-prose-invert-quote-borders': theme('colors.neutral[500]'),
'--tw-prose-invert-captions': theme('colors.neutral[400]'),
'--tw-prose-invert-code': theme('colors.neutral[350]'),
'--tw-prose-invert-pre-code': theme('colors.neutral[300]'),
'--tw-prose-invert-th-borders': theme('colors.neutral[600]'),
'--tw-prose-invert-td-borders': theme('colors.neutral[700]'),
},
},
DEFAULT: {
css: {
blockquote: {
fontStyle: 'normal',
quotes: 'none',
},
},
},
}),
},
},
plugins: [
require('tailwindcss/nesting'),
require('preline/plugin'),
require('@tailwindcss/typography'),
],
content: ['./node_modules/preline/preline.js'],
plugins: [require('preline/plugin')],
};

View File

@@ -4,20 +4,19 @@
"exclude": ["dist"],
"compilerOptions": {
"strictNullChecks": true,
"baseUrl": "src",
"jsx": "react-jsx",
"baseUrl": ".",
"types": ["astro/client"],
"paths": {
"@/*": ["*"],
"@/*": ["src/*"],
"@src/*": ["src/*"],
"@lib/*": ["lib/*"],
"@components/*": ["components/*"],
"@content/*": ["content/*"],
"@layouts/*": ["layouts/*"],
"@styles/*": ["styles/*"],
"@pages/*": ["pages/*"],
"@support/*": ["support/*"],
"@images/*": ["images/*"]
"@lib/*": ["src/lib/*"],
"@components/*": ["src/components/*"],
"@content/*": ["src/content/*"],
"@layouts/*": ["src/layouts/*"],
"@styles/*": ["src/styles/*"],
"@pages/*": ["src/pages/*"],
"@support/*": ["src/scripts/*"],
"@images/*": ["src/images/*"]
}
}
}