-
Notifications
You must be signed in to change notification settings - Fork 1
/
page3.html
72 lines (70 loc) · 2.47 KB
/
page3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
<title>Page 3</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="booster-config" content='{ "basePath" : "/scripts/boosts/" }'>
<link rel="stylesheet" href="/styles/styles.css" />
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/[email protected]/src/htmx.min.js"></script>
<script src="/main.js" type="module"></script>
</head>
<body hx-ext="booster">
<header id="header">
<nav
hx-boost="true"
hx-target="#main"
hx-select="#main"
hx-swap="outerHTML show:#header:top"
>
<a href="/">Home</a>
<a href="/page2.html">Page 2</a>
<a href="/page3.html">Page 3</a>
</nav>
</header>
<main id="main" hx-history-elt>
<h1>Page 3</h1>
<section>
<header>
<h2>Example htmx component: Video Player</h2>
<p>
Plyr npm package imported via <a href="https://www.skypack.dev/">Skypack CDN</a>.
<p>
Lazyloaded using the 'visible' strategy - will only be loaded when it enters the viewport.
</p>
<p>
Uses state to allow only one video on the page to play at a time.
</p>
</header>
<div id="video-1" class="c-video" data-booster="videoPlayer" data-load="visible">
<div class="c-video__poster">
<img
src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ElephantsDream.jpg"
alt="">
</div>
<button class="c-video__btn">
<span>Play</span>
</button>
<div class="c-video__player"
data-src-mp4="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
>
</div>
</div>
<div id="video-2" class="c-video" data-booster="videoPlayer" data-load="visible">
<div class="c-video__poster">
<img
src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg"
alt="">
</div>
<button class="c-video__btn">
<span>Play</span>
</button>
<div class="c-video__player"
data-src-mp4="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"
>
</div>
</div>
</section>
</main>
</body>
</html>