-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
106 lines (95 loc) · 3.71 KB
/
Copy pathindex.html
File metadata and controls
106 lines (95 loc) · 3.71 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#17120f">
<title>D&D Spell Card Maker</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="site-header">
<div>
<div class="eyebrow">D&D TOOL</div>
<h1>Spell Card Maker</h1>
<p>Turn a D&D Beyond character JSON export into a printable spell deck.</p>
</div>
<button id="printBtn" class="primary" disabled>Print / Save PDF</button>
</header>
<main>
<section class="panel no-print">
<h2>1. Load a character</h2>
<p class="muted">
Paste a D&D Beyond character-service URL, paste the JSON response, or drop a JSON file.
Everything is processed in your browser.
</p>
<div class="input-row">
<input id="urlInput" type="url"
placeholder="https://character-service.dndbeyond.com/character/v5/character/1234567890">
<button id="fetchBtn" class="secondary">Load URL</button>
</div>
<div class="dropzone" id="dropzone">
<input id="fileInput" type="file" accept=".json,application/json" hidden>
<strong>Drop character JSON here</strong>
<span>or <button id="browseBtn" class="link-button" type="button">browse for a file</button></span>
</div>
<details>
<summary>Paste JSON manually</summary>
<textarea id="jsonInput" rows="8" spellcheck="false"
placeholder='Paste the complete D&D Beyond character-service JSON here…'></textarea>
<button id="parseBtn" class="secondary">Parse JSON</button>
</details>
<div id="status" class="status" role="status"></div>
</section>
<section id="characterPanel" class="character-panel hidden no-print">
<div>
<div class="eyebrow">CHARACTER</div>
<h2 id="characterName">—</h2>
<p id="characterSummary" class="muted">—</p>
</div>
<div class="stats">
<div><span>Spells</span><strong id="spellCount">0</strong></div>
<div><span>Selected</span><strong id="selectedCount">0</strong></div>
</div>
</section>
<section class="toolbar no-print">
<div class="toolbar-title">
<h2>Your spells</h2>
<span id="deckCount">0 cards</span>
</div>
<div class="filters">
<input id="searchInput" type="search" placeholder="Search spells…">
<select id="levelFilter">
<option value="all">All levels</option>
<option value="0">Cantrips</option>
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
<option value="4">4th</option>
<option value="5">5th</option>
<option value="6">6th</option>
<option value="7">7th</option>
<option value="8">8th</option>
<option value="9">9th</option>
</select>
<button id="selectVisibleBtn" class="secondary">Select visible</button>
<button id="clearBtn" class="secondary">Clear</button>
</div>
</section>
<section id="cards" class="cards"></section>
<section id="empty" class="empty">
<div class="empty-icon">✦</div>
<h2>Load a character to begin</h2>
<p>Cards will appear here once spells are found.</p>
</section>
</main>
<footer class="no-print">
<p>
This is an unofficial fan-made utility. It does not authenticate to D&D Beyond and does not
store your character data. D&D Beyond does not provide a documented public character API;
this app reads the character-service JSON when your browser can access it.
</p>
</footer>
<script src="app.js"></script>
</body>
</html>