-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
179 lines (157 loc) · 7.28 KB
/
Copy pathindex.html
File metadata and controls
179 lines (157 loc) · 7.28 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Episode system — admin and front end side by side</title>
<link rel="icon" href="favicon.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&family=Karla:wght@400;500;600;700&display=swap">
<link rel="stylesheet" href="player.css">
<link rel="stylesheet" href="admin.css">
</head>
<body>
<div class="split">
<!-- ================= LEFT: admin ================= -->
<section id="left" class="pane pane-admin" aria-labelledby="admin-h">
<div class="pane-inner">
<header class="pane-head">
<p class="pane-kicker">Our side · stored in WordPress</p>
<h1 id="admin-h">Add an episode</h1>
</header>
<details class="howto">
<summary>Where to get a test episode</summary>
<div class="howto-body">
<ol>
<li>Open the test show:
<a href="https://rss.com/podcasts/podcasting101/" target="_blank" rel="noopener">rss.com/podcasts/podcasting101</a>
</li>
<li>Click any episode and copy its address.
<br><code class="ex">rss.com/podcasts/<b>podcasting101</b>/<b>1048583</b></code>
<br>The URL carries both the show and the episode, so that is all we need.</li>
<li>Paste it below and press <b>Fetch</b> to prefill the fields — or use one
of the sample links under the field to fill the box for you.</li>
</ol>
</div>
</details>
<form id="form" novalidate>
<div class="field">
<label for="ref">RSS.com episode URL <span class="hint">optional</span></label>
<div class="row">
<input id="ref" name="ref" type="text" placeholder="https://rss.com/podcasts/podcasting101/1048583" autocomplete="off" spellcheck="false">
<button id="fetch" type="button" class="btn-solid">Fetch</button>
</div>
<div class="shortcuts">
<span class="shortcuts-label">Samples:</span>
<ul class="chips">
<li><button type="button" class="chip" data-url="https://rss.com/podcasts/podcasting101/1048583">Discord</button></li>
<li><button type="button" class="chip" data-url="https://rss.com/podcasts/podcasting101/1023575">Podfans</button></li>
<li><button type="button" class="chip" data-url="https://rss.com/podcasts/podcasting101/929407">Podcast legally</button></li>
<li><button type="button" class="chip" data-url="https://rss.com/podcasts/haztupodcast/612153">Another show</button></li>
</ul>
</div>
<p id="fetch-note" class="note"></p>
</div>
<div id="fields">
<hr class="rule">
<p class="override-lede">
<b>Every field is yours to type.</b> Fetching above is only a shortcut that
fills them in — skip it and enter an episode by hand. Once published,
nothing here syncs with RSS.com.
</p>
<div class="field">
<label for="title">Title</label>
<input id="title" name="title" type="text">
</div>
<div class="field">
<label for="summary">Description</label>
<textarea id="summary" name="summary" rows="3"></textarea>
</div>
<div class="grid3">
<div class="field">
<label for="season">Season</label>
<input id="season" name="season" type="number" min="1" placeholder="—">
</div>
<div class="field">
<label for="number">Episode</label>
<input id="number" name="number" type="number" min="1" placeholder="—">
</div>
<div class="field">
<label for="duration">Duration</label>
<input id="duration" name="duration" type="text" placeholder="32:39">
</div>
</div>
<div class="field">
<label for="published">Publish date</label>
<input id="published" name="published" type="date">
</div>
<div class="field">
<label for="audio_url">Audio URL</label>
<input id="audio_url" name="audio_url" type="url" spellcheck="false"
placeholder="https://content.rss.com/episodes/…mp3">
<p class="hint">Fetching fills this from the feed. Without it the episode still
publishes, but has nothing to play.</p>
</div>
<div class="field">
<label for="artwork">Image URL</label>
<input id="artwork" name="artwork" type="url" spellcheck="false"
placeholder="https://media.rss.com/…jpg">
<p class="hint">Fetching fills this from the feed. Leave it empty for a
placeholder cover.</p>
</div>
<div class="actions-row">
<button id="publish" type="submit" class="btn-solid big" disabled>Publish episode</button>
<button id="cancel-edit" type="button" class="btn-quiet" hidden>Cancel edit</button>
</div>
</div>
</form>
<section class="stored" aria-labelledby="stored-h">
<div class="stored-head">
<h2 id="stored-h">Episodes in our database</h2>
<button id="reset" type="button" class="link-btn">Reset to seed</button>
</div>
<p class="stored-lede">
These rows are ours. Fetching only prefilled them — editing one never touches RSS.com,
and nothing here re-syncs.
</p>
<ul id="records" class="records"></ul>
</section>
</div>
</section>
<!-- ================= RIGHT: front end ================= -->
<section id="right" class="pane pane-front" aria-labelledby="front-h">
<div class="pane-inner">
<header class="pane-head">
<p class="pane-kicker">What visitors see · rendered from our records</p>
<h1 id="front-h">Featured Episodes <span id="front-count" class="count"></span></h1>
</header>
<p class="front-note">
Every card here is drawn from our own records — titles, dates, durations and
artwork all come from the database on the left, so the grid renders with no
network calls at all. <b>The audio is the only thing fetched from RSS.com,</b>
and only when someone presses play. The whole page shares one audio player,
so starting an episode stops whichever one was already going.
</p>
<div class="site">
<h2 class="section-label"><span class="marker" aria-hidden="true"></span>Featured Episodes</h2>
<div id="grid" class="grid"></div>
</div>
</div>
</section>
</div>
<script src="player.js"></script>
<script src="admin.js"></script>
<script>
// sample links only fill the URL box -- fetching stays a deliberate click
document.addEventListener("click", (e) => {
const chip = e.target.closest(".chip");
if (!chip) return;
const ref = document.getElementById("ref");
ref.value = chip.dataset.url;
ref.focus();
ref.setSelectionRange(ref.value.length, ref.value.length);
});
</script>
</body>
</html>