Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
361 lines (359 loc) · 12.9 KB
/
Copy pathindex.html
File metadata and controls
361 lines (359 loc) · 12.9 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>UCProjects</title>
<meta name="description" content="Community projects for Undercards: UnderScript, the UnderScript App, a leaderboard, a template editor and plugin tools.">
<meta property="og:title" content="UCProjects">
<meta property="og:description" content="Community projects for Undercards.">
<meta property="og:type" content="website">
<meta name="theme-color" content="#14161c">
<script type="module" src="./assets/js/auth.js"></script>
<style>
:root {
--bg: #14161c;
--surface: #1d2029;
--text: #e8e9ee;
--muted: #a3a7b5;
--accent: #7c9cff;
--border: #2b2f3b;
--warn: #f0b429;
--warn-bg: rgba(240, 180, 41, 0.12);
}
@media (prefers-color-scheme: light) {
:root {
--bg: #f6f7fb;
--surface: #ffffff;
--text: #1b1d26;
--muted: #5b6070;
--accent: #3f5fe0;
--border: #dde0ea;
--warn: #9a6700;
--warn-bg: #fff4d6;
}
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
header, main, footer {
width: 100%;
max-width: 960px;
margin: 0 auto;
padding: 0 16px;
}
header { padding-top: 24px; text-align: center; }
h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 12px; }
h2 { font-size: 1.25rem; margin: 0 0 8px; }
p { margin: 0 0 16px; }
a { color: var(--accent); }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0 auto; }
main { padding-top: 40px; }
.projects {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
padding: 0;
margin: 0;
list-style: none;
}
.project {
display: flex;
flex-direction: column;
padding: 20px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
}
.project h2 a { color: var(--text); text-decoration: none; }
.project h2 a:hover, .project h2 a:focus-visible { color: var(--accent); text-decoration: underline; }
.project p { color: var(--muted); flex: 1; }
.project .notice {
flex: none;
margin: 0 0 16px;
padding: 8px 12px;
background: var(--warn-bg);
border-left: 3px solid var(--warn);
border-radius: 4px;
color: var(--text);
font-size: 0.9rem;
}
.project .links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 0.9rem; }
.bar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 10;
border-bottom: 1px solid transparent;
pointer-events: none;
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.bar.show { background: var(--surface); border-bottom-color: var(--border); pointer-events: auto; }
.bar-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
max-width: 960px;
margin: 0 auto;
padding: 8px 16px;
}
.bar-title {
display: flex;
align-items: baseline;
flex-wrap: wrap;
gap: 0 12px;
min-width: 0;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.bar.show .bar-title { opacity: 1; visibility: visible; transition: opacity 0.2s ease; }
.bar-title strong { font-size: 1.05rem; white-space: nowrap; }
.bar-title span { color: var(--muted); font-size: 0.9rem; }
.bar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.auth-trigger {
padding: 6px 12px;
background: var(--surface);
color: var(--text);
border: 1px solid var(--border);
border-radius: 6px;
cursor: pointer;
font: inherit;
pointer-events: auto;
}
.auth-trigger:hover, .auth-trigger:focus-visible { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
.bar, .bar-title, .bar.show .bar-title { transition: none; }
}
body.authed .unauthed, body:not(.authed) .authed { display: none; }
.auth-error {
max-width: 960px;
margin: 60px auto 0;
padding: 8px 12px;
background: var(--warn-bg);
border-left: 3px solid var(--warn);
border-radius: 4px;
font-size: 0.9rem;
}
.auth-error[hidden] { display: none; }
.menu {
position: fixed;
inset: auto;
top: 52px;
right: 16px;
margin: 0;
min-width: 160px;
padding: 6px;
background: var(--surface);
color: var(--text);
border: 1px solid var(--border);
border-radius: 8px;
}
.menu button {
display: block;
width: 100%;
padding: 6px 8px;
background: none;
border: 0;
border-radius: 4px;
color: inherit;
cursor: pointer;
font: inherit;
text-align: left;
}
.menu button:hover, .menu button:focus-visible { background: var(--border); }
dialog {
width: min(360px, calc(100vw - 32px));
margin: auto;
padding: 0;
background: var(--surface);
color: var(--text);
border: 1px solid var(--border);
border-radius: 8px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.dialog-body { padding: 20px 24px; }
dialog h2 { margin-bottom: 6px; }
.dialog-note { margin-bottom: 14px; font-size: 0.9rem; color: var(--muted); }
.linked-row { display: flex; align-items: center; gap: 12px; min-height: 38px; }
.linked-row .provider-name { flex: 1; }
.linked-row .status { font-size: 0.9rem; color: var(--muted); }
dialog button {
padding: 4px 12px;
background: none;
border: 1px solid var(--border);
border-radius: 4px;
color: inherit;
cursor: pointer;
font: inherit;
}
dialog button:hover, dialog button:focus-visible { background: var(--border); }
dialog [hidden] { display: none; }
.link-error { padding-top: 8px; font-size: 0.9rem; color: var(--warn); }
.dialog-actions { margin-top: 16px; text-align: right; }
.dialog-actions button + button { margin-left: 8px; }
#nameInput {
width: 100%;
padding: 6px 8px;
background: var(--bg);
color: inherit;
border: 1px solid var(--border);
border-radius: 4px;
font: inherit;
}
#nameInput:focus-visible { border-color: var(--accent); outline: none; }
footer { padding-top: 56px; padding-bottom: 48px; color: var(--muted); font-size: 0.9rem; text-align: center; }
@media (max-width: 720px) {
.bar-title span { display: none; }
header { padding-top: 64px; }
}
.sponsor {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 4px 10px;
border: 1px solid rgba(255, 255, 255, 0.3);
border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
border-radius: 4px;
color: inherit;
font: inherit;
font-size: 0.875rem;
font-weight: 400;
line-height: 1.75;
text-decoration: none;
white-space: nowrap;
}
.bar .sponsor { background: var(--surface); color: var(--text); }
.bar .sponsor:hover, .bar .sponsor:focus-visible { background: var(--surface); border-color: var(--accent); }
.sponsor svg { width: 20px; height: 20px; fill: #bf3989; }
.sponsor:hover, .sponsor:focus-visible { background: rgba(128, 128, 128, 0.12); text-decoration: none; }
@media (max-width: 599px) {
.sponsor span { display: none; }
.sponsor { padding: 4px 8px; }
}
</style>
</head>
<body>
<div class="bar" id="bar">
<div class="bar-inner">
<div class="bar-title">
<strong>UCProjects</strong>
<span>Community projects for Undercards</span>
</div>
<div class="bar-actions">
<a class="sponsor" href="https://github.com/sponsors/feildmaster" target="_blank" rel="noopener noreferrer" title="Sponsor feildmaster"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"/></svg><span>Sponsor</span></a>
<button id="user" type="button" popovertarget="userMenu" class="auth-trigger authed username"></button>
<button id="login" type="button" popovertarget="loginMenu" class="auth-trigger unauthed">Log in</button>
</div>
</div>
</div>
<p id="authError" class="auth-error" role="alert" hidden></p>
<div id="userMenu" popover class="menu">
<button type="button" class="open-name">Display name</button>
<button type="button" class="open-linked">Linked accounts</button>
<button type="button" class="logout">Sign out</button>
</div>
<div id="loginMenu" popover class="menu">
<button type="button" data-provider="google">Google</button>
<button type="button" data-provider="github">GitHub</button>
<button type="button" data-provider="discord">Discord</button>
</div>
<dialog id="linkedDialog" aria-labelledby="linkedTitle">
<div class="dialog-body">
<h2 id="linkedTitle">Linked accounts</h2>
<p class="dialog-note">Link the accounts you sign in with, even if they use different email addresses, and they all open this same account.</p>
<div class="linked-row" data-provider="google">
<span class="provider-name">Google</span>
<span class="status" hidden>Linked</span>
<button type="button" class="link" hidden>Link</button>
</div>
<div class="linked-row" data-provider="github">
<span class="provider-name">GitHub</span>
<span class="status" hidden>Linked</span>
<button type="button" class="link" hidden>Link</button>
</div>
<div class="linked-row" data-provider="discord">
<span class="provider-name">Discord</span>
<span class="status" hidden>Linked</span>
<button type="button" class="link" hidden>Link</button>
</div>
<div class="link-error" role="alert" hidden></div>
<form method="dialog" class="dialog-actions">
<button type="submit">Close</button>
</form>
</div>
</dialog>
<dialog id="nameDialog" aria-labelledby="nameTitle">
<form class="dialog-body" id="nameForm">
<h2 id="nameTitle">Display name</h2>
<p class="dialog-note">The name these sites greet you with. Only you see it.</p>
<input id="nameInput" name="displayName" type="text" maxlength="50" required autocomplete="nickname" aria-labelledby="nameTitle">
<div class="link-error" role="alert" hidden></div>
<div class="dialog-actions">
<button type="button" class="cancel">Cancel</button>
<button type="submit">Save</button>
</div>
</form>
</dialog>
<header>
<h1>UCProjects</h1>
<p class="lead">Community projects for <a href="https://undercards.net/">Undercards</a>.</p>
</header>
<main>
<ul class="projects">
<li class="project">
<h2><a href="https://underscript.uc.feildmaster.com/">UnderScript</a></h2>
<p>A userscript that fixes bugs and adds features to Undercards, with a plugin system for the community.</p>
<p class="links"><a href="https://github.com/UCProjects/UnderScript">Source</a></p>
</li>
<li class="project">
<h2><a href="https://app.uc.feildmaster.com/">UnderScript App</a></h2>
<p>The Undercards desktop app with UnderScript built in. Sign in once and install plugins in a click.</p>
<p class="links"><a href="https://github.com/UCProjects/UnderScript-App">Source</a></p>
</li>
<li class="project">
<h2><a href="https://leaderboard.uc.feildmaster.com/">Leaderboard</a></h2>
<p>Leaderboards and player pages for Undercards.</p>
<p class="links"><a href="https://github.com/UCProjects/Leaderboard">Source</a></p>
</li>
<li class="project">
<h2><a href="https://undercard.feildmaster.com/">Template Editor</a></h2>
<p>Design your own Undercards-style cards and save them as images.</p>
<p class="links"><a href="https://github.com/UCProjects/CardEditor">Source</a></p>
</li>
<li class="project">
<h2><a href="https://underscript.uc.feildmaster.com/generator">Plugin Generator</a></h2>
<p>Make your own UnderScript plugin without writing code, start from the plugin template, or set up a full project with the command-line generator.</p>
<p class="links">
<a href="https://github.com/UCProjects/Plugin-Template">Plugin template</a>
<a href="https://github.com/UCProjects/Plugin-Generator">Command-line generator</a>
</p>
</li>
<li class="project">
<h2><a href="https://github.com/UCProjects/Chest">Chest</a></h2>
<p>A Discord bot for Undercards: look up cards and artifacts, make deck images, browse the deck hub and simulate opening packs.</p>
<p class="notice"><strong>Often full.</strong> Discord limits unverified bots to 100 servers, so adding it may fail.</p>
<p class="links">
<a href="https://discord.com/oauth2/authorize?client_id=797751402767319081">Add to your server</a>
<a href="https://github.com/UCProjects/Chest/blob/master/privacy.md">Privacy</a>
<a href="https://github.com/UCProjects/Chest/blob/master/tos.md">Terms</a>
</p>
</li>
<li class="project">
<h2><a href="https://github.com/UCProjects/Chat">Chat</a></h2>
<p>A bot that relays Undercards chat to a Discord server for chat records, with a reporting feature.</p>
<p class="links"><a href="https://discord.gg/3GkgMa3cfZ">Join the server</a></p>
</li>
</ul>
</main>
<footer>
<p>These are community projects, not affiliated with Undercards.</p>
</footer>
</body>
</html>