mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
astro4 page transitions
This commit is contained in:
parent
f9f4fe7337
commit
378b34642b
3 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
||||||
---
|
---
|
||||||
|
import { ViewTransitions } from 'astro:transitions';
|
||||||
|
|
||||||
import * as config from '../config.yaml';
|
import * as config from '../config.yaml';
|
||||||
import core from '../core.json';
|
import core from '../core.json';
|
||||||
import '../styles/base.css';
|
import '../styles/base.css';
|
||||||
|
@ -19,6 +21,8 @@ function genHeading(str) {
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<meta name="description" content={description} />
|
<meta name="description" content={description} />
|
||||||
<title>{title ? title + ' | ' + config.title : config.title}</title>
|
<title>{title ? title + ' | ' + config.title : config.title}</title>
|
||||||
|
|
||||||
|
<ViewTransitions />
|
||||||
<link
|
<link
|
||||||
rel="preload"
|
rel="preload"
|
||||||
href="/fonts/archivo-regular-latin-ext.woff2"
|
href="/fonts/archivo-regular-latin-ext.woff2"
|
||||||
|
|
|
@ -63,7 +63,7 @@ for (const year of pastYears.reverse()) {
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script is:inline>
|
||||||
document.querySelectorAll('.event-header .header-base').forEach((el) => {
|
document.querySelectorAll('.event-header .header-base').forEach((el) => {
|
||||||
el.addEventListener('click', (ev) => {
|
el.addEventListener('click', (ev) => {
|
||||||
if (ev.target.tagName === "BUTTON") {
|
if (ev.target.tagName === "BUTTON") {
|
||||||
|
|
|
@ -117,7 +117,7 @@ for (const ev of events) {
|
||||||
|
|
||||||
<AboutFooter />
|
<AboutFooter />
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script is:inline>
|
||||||
document.querySelectorAll('.w3pn-hp-grid > div').forEach(el => {
|
document.querySelectorAll('.w3pn-hp-grid > div').forEach(el => {
|
||||||
el.addEventListener('click', () => {
|
el.addEventListener('click', () => {
|
||||||
window.location = el.getAttribute('data-url');
|
window.location = el.getAttribute('data-url');
|
||||||
|
|
Loading…
Reference in a new issue