astro4 page transitions

This commit is contained in:
tree🌴 2024-02-09 21:27:36 +01:00
parent f9f4fe7337
commit 378b34642b
3 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,6 @@
---
import { ViewTransitions } from 'astro:transitions';
import * as config from '../config.yaml';
import core from '../core.json';
import '../styles/base.css';
@ -19,6 +21,8 @@ function genHeading(str) {
<meta name="generator" content={Astro.generator} />
<meta name="description" content={description} />
<title>{title ? title + ' | ' + config.title : config.title}</title>
<ViewTransitions />
<link
rel="preload"
href="/fonts/archivo-regular-latin-ext.woff2"

View file

@ -63,7 +63,7 @@ for (const year of pastYears.reverse()) {
</p>
</div>
<script>
<script is:inline>
document.querySelectorAll('.event-header .header-base').forEach((el) => {
el.addEventListener('click', (ev) => {
if (ev.target.tagName === "BUTTON") {

View file

@ -117,7 +117,7 @@ for (const ev of events) {
<AboutFooter />
</div>
<script>
<script is:inline>
document.querySelectorAll('.w3pn-hp-grid > div').forEach(el => {
el.addEventListener('click', () => {
window.location = el.getAttribute('data-url');