| 1 |
<!DOCTYPE html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8" /> |
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 6 |
<title>Rapid Navigation Page 1</title> |
| 7 |
<link rel="stylesheet" href="/assets/main.css" /> |
| 8 |
<style> |
| 9 |
html.is-changing .transition-default { |
| 10 |
transition-property: opacity, transform; |
| 11 |
transition-duration: 600ms; |
| 12 |
} |
| 13 |
html.is-animating .transition-default { |
| 14 |
opacity: 0; |
| 15 |
transform: translateY(-50px); |
| 16 |
} |
| 17 |
html.is-leaving .transition-default { |
| 18 |
transform: translateY(50px); |
| 19 |
} |
| 20 |
</style> |
| 21 |
<script src="/dist/Swup.umd.js"></script> |
| 22 |
</head> |
| 23 |
<body> |
| 24 |
<header class="header"> |
| 25 |
<ul> |
| 26 |
<li><a href="/rapid-navigation/page-1.html" data-testid="link-to-page-1">Page 1</a></li> |
| 27 |
<li><a href="/rapid-navigation/page-2.html" data-testid="link-to-page-2">Page 2</a></li> |
| 28 |
<li><a href="/rapid-navigation/page-3.html" data-testid="link-to-page-3">Page 3</a></li> |
| 29 |
</ul> |
| 30 |
</header> |
| 31 |
<main id="swup" class="wrapper transition-default" data-testid="container"> |
| 32 |
<div class="wrapper-inner"> |
| 33 |
<h1>Rapid Navigation Page 1</h1> |
| 34 |
<p> |
| 35 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias assumenda |
| 36 |
consectetur consequatur enim esse incidunt iusto, magnam maxime molestias nisi |
| 37 |
perferendis perspiciatis quibusdam quos repellat, vel veniam vero voluptate |
| 38 |
voluptatem. |
| 39 |
</p> |
| 40 |
</div> |
| 41 |
</main> |
| 42 |
<script> |
| 43 |
window.data = { received: [] }; |
| 44 |
|
| 45 |
window._swup = new Swup({ cache: false }); |
| 46 |
|
| 47 |
window.addEventListener('swup:any', (event) => { |
| 48 |
const { hook } = event.detail; |
| 49 |
|
| 50 |
if (hook === 'visit:start') { |
| 51 |
document.documentElement.setAttribute('aria-busy', 'true'); |
| 52 |
window.data.received = []; |
| 53 |
} |
| 54 |
|
| 55 |
window.data.received.push(hook); |
| 56 |
|
| 57 |
if (hook === 'visit:end') { |
| 58 |
document.documentElement.removeAttribute('aria-busy'); |
| 59 |
} |
| 60 |
}); |
| 61 |
</script> |
| 62 |
</body> |
| 63 |
</html> |