/
index.html
167 lines (153 loc) · 7.33 KB
/
index.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<link rel="icon" type="image/png" href="static/favicon-16x16.png" sizes="16x16" />
<title>Gray Area Festival Archive</title>
<link rel="stylesheet" href="dist/output.css" />
<script defer src="lib/alpine.min.js"></script>
<script src="js/main.js"></script>
</head>
<body class="sm:m-8 m-2 bg-zinc-800 text-slate-200">
<div x-data="videoData">
<div x-data="filters">
<header class="mb-5 max-w-[30em] text-sm">
<a href="index.html">
<img src="static/gray-area-logo-text-small.svg" alt="Gray Area" class="max-w-xs mb-4 float" />
</a>
<h2 class="text-2xl mb-4">Festival Archive</h2>
<p>
Talks, presentations, and panels from the <a href="https://grayareafestival.io/">Gray Area Festival</a>.
</p>
</header>
<a name="viewer"></a>
<template x-if="showViewer" x-data="selVideo">
<div class="bg-zinc-900 p-5 my-5">
<button class="bg-zinc-600 mb-5 hover:bg-slate-700 p-1 px-4 rounded-full" x-on:click="showViewer = false; selVideo = null; setURLState()">Close</button>
<div class="videoPlayer mb-5">
<iframe class="ytvideo" :src="('https://www.youtube.com/embed/' + selVideo.display_id)" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture;" allowfullscreen></iframe>
</div>
<h1 x-text="selVideo.title" class="text-2xl mb-5"></h1>
<p class="mb-5" x-html="String(selVideo.description).replace(/\n/g, '<br />')"></p>
<div x-data="{ open: false }" class="mb-5">
<h3 class="mb-2">
<a href="#;" x-on:click="open = !open" x-text="'Captions ' + (open ? '▾' : '▸')"></a>
</h3>
<template x-if="open">
<pre class="font-mono text-xs p-2 bg-zinc-950 overflow-auto w-full h-64" x-text="selVideo.parsedSubs"></pre>
</template>
</div>
<div x-data="{ open: false }">
<h3 class="mb-2">
<a href="#;" x-on:click="open = !open" x-text="'Metadata ' + (open ? '▾' : '▸')"></a>
</h3>
<template x-if="open">
<ul class="m-2">
<template x-for="v, i in selVideo">
<template x-if="i != 'parsedSubs'">
<li class="text-sm">
<span x-text="i" class="text-slate-500 mr-2"></span>
<template x-if="String(v).startsWith('http')">
<a :href="v" target="_blank" x-text="v"></a>
</template>
<template x-if="!String(v).startsWith('http')">
<span x-html="String(v).replace(/\n/g, '<br />')"></span>
</template>
</li>
</template>
</template>
</ul>
</template>
</div>
</div>
</template>
<!-- filters -->
<div id="filters" class="bg-zinc-900 p-5 inline-block">
<h4 class="">FILTERS</h4>
<div class="flex mt-4">
<div id="filterSortBy" class="mr-5">
<h5 class="text-xs border-b mb-2">SORT BY</h5>
<ul x-data="filtersSortBy" x-on:change="filterSortBy(filtersSortBy);">
<template x-for="f in filterSortByStrings">
<li class="mr-4">
<label>
<input class="hidden" type="radio" x-model="filtersSortBy" :value="f" />
<span x-text="f"></span>
</label>
</li>
</template>
</ul>
</div>
<div id="filterYear" class="mr-5">
<h5 class="text-xs border-b mb-2">YEAR</h5>
<ul x-data="filtersYear" x-on:change="filterYear(filtersYear)">
<template x-for="f in filterYearStrings">
<li class="flex-1 mr-4">
<label>
<input class="hidden" type="checkbox" x-model="filtersYear" :value="f" />
<span x-text="f"></span>
</label>
</li>
</template>
</ul>
</div>
<div id="filterTopic" class="mr-2">
<h5 class="text-xs border-b mb-2">TOPIC</h5>
<ul x-data="filtersTopic" x-on:change="filterTopic(filtersTopic);">
<template x-for="f in filtersTopicStrings">
<li class="mr-4">
<label>
<input class="hidden" type="checkbox" x-model="filtersTopic" :value="f.topic" />
<span x-text="f.topic"></span>
</label>
</li>
</template>
</ul>
</div>
</div>
<div class="mt-4" id="filterSearch">
<h5 class="text-xs border-b mb-2">TITLE & DESC</h5>
<input @input.debounce="filterTitleDesc" type="text" class="w-full" x-@ placeholder="Filter String">
</div>
</div>
<!-- results -->
<a name="results"></a>
<div class="flex-auto max-w-full my-4">
<template x-if="!videos">
<span>Loading...</span>
</template>
<template x-for="video in pagedVideos">
<a href="#viewer" class="inline-block mr-4 mb-4" x-on:click="selVideo = video; fetchSubs(selVideo); showViewer = true; setURLState();">
<div class="hover:underline hover:opacity-70 bg-zinc-900 p-5 inline-block w-[354px] h-[328px] align-top">
<img :src="video.thumbnail_small" class="w-full mb-4" />
<h3 x-text="video.title" class="w-60"></h3>
</div>
</a>
</template>
</div>
<!-- footer -->
<footer>
<div class="inline-block m-4 ml-0">
<span x-text="curPage * pageSize - (pageSize-1)"></span>—<span x-text="Math.min(curPage * pageSize, videos.length)"></span> of <span x-text="videos.length + ' Results'"></span>
</div>
<div class="inline-block">
<button class="bg-zinc-600 hover:bg-slate-700 p-1 px-4 rounded-full" @click="previousPage; document.location.href='#results'">‹</button>
<button class="ml-1 bg-zinc-600 hover:bg-slate-700 p-1 px-4 rounded-full" @click="nextPage; document.location.href='#results'">›</button>
</div>
<div class="text-sm">
<p class="mt-4">
Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">CC Attribution-NonCommercial-NoDerivatives 4.0 International License</a>
</p>
<p class="mt-4">
v<span x-text="version"></span> <a href="https://github.com/GrayAreaorg/festival-video-archive">Source Code</a>
</p>
<p class="mt-4">
<span>© <span x-text="new Date().getFullYear()"></span> <a href="https://grayarea.org">Gray Area</a></span>
</p>
</div>
</footer>
</div>
</div>
</body>
</html>