Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3651999a98 | ||
| 27df97522c | |||
| 8d1d47dc4f |
@@ -1,3 +1,10 @@
|
|||||||
|
## [3.12.1](https://gitea.alexlebens.dev/alexlebens/site-profile/compare/3.12.0...3.12.1) (2026-03-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* handle script with swup ([8d1d47d](https://gitea.alexlebens.dev/alexlebens/site-profile/commit/8d1d47dc4f09ecdd56d898e7d70b0c27f1b02e04))
|
||||||
|
|
||||||
# [3.12.0](https://gitea.alexlebens.dev/alexlebens/site-profile/compare/3.11.0...3.12.0) (2026-03-13)
|
# [3.12.0](https://gitea.alexlebens.dev/alexlebens/site-profile/compare/3.11.0...3.12.0) (2026-03-13)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "site-profile",
|
"name": "site-profile",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "3.12.0",
|
"version": "3.12.1",
|
||||||
"homepage": "https://www.alexlebens.dev",
|
"homepage": "https://www.alexlebens.dev",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
|
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const images = await Promise.all(imagesData.map(async (img) => ({
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('astro:page-load', () => {
|
function initHeroImage() {
|
||||||
const container = document.getElementById('hero-image-container');
|
const container = document.getElementById('hero-image-container');
|
||||||
if (container) {
|
if (container) {
|
||||||
const images = container.querySelectorAll('.hero-image');
|
const images = container.querySelectorAll('.hero-image');
|
||||||
@@ -96,5 +96,13 @@ const images = await Promise.all(imagesData.map(async (img) => ({
|
|||||||
images[randomIndex].classList.add('flex');
|
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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user