-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
301 lines (282 loc) · 17.5 KB
/
Copy pathindex.html
File metadata and controls
301 lines (282 loc) · 17.5 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
<!DOCTYPE html>
<html lang="en" data-mood="sepia">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Community Diary — State of Decay 2</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Special+Elite&family=Patrick+Hand&family=Caveat:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Old+Standard+TT:wght@400;700&family=Caveat+Brush&display=swap" rel="stylesheet">
<link rel="stylesheet" href="v4/styles.css">
</head>
<body>
<div class="desk">
<main class="diary" id="diary">
<!-- Sync receive banner: shown when #sync= hash detected on load -->
<div class="sync-banner" id="syncBanner" hidden role="alert">
<span id="syncBannerMsg">Import diary state from shared link?</span>
<button type="button" id="syncBannerYes" class="ink-btn">Resume</button>
<button type="button" id="syncBannerNo" class="ink-btn ink-btn--ghost">Dismiss</button>
</div>
<!-- ── Header ─────────────────────────────────────────── -->
<header class="diary__head">
<div class="diary__mark">
<svg class="diary__compass" viewBox="0 0 64 64" aria-hidden="true">
<!-- Compass rose: ring + cardinal diamonds + N letter -->
<circle cx="32" cy="32" r="28" fill="none" stroke="currentColor" stroke-width="1.6"/>
<circle cx="32" cy="32" r="22" fill="none" stroke="currentColor" stroke-width="0.7" stroke-dasharray="2 3" opacity="0.55"/>
<path d="M32 4 L36 30 L32 34 L28 30 Z" fill="currentColor"/>
<path d="M32 60 L36 34 L32 30 L28 34 Z" fill="none" stroke="currentColor" stroke-width="1.4"/>
<path d="M4 32 L30 28 L34 32 L30 36 Z" fill="none" stroke="currentColor" stroke-width="1.4"/>
<path d="M60 32 L34 28 L30 32 L34 36 Z" fill="none" stroke="currentColor" stroke-width="1.4"/>
<circle cx="32" cy="32" r="2.2" fill="currentColor"/>
<text x="32" y="14" text-anchor="middle" font-family="Special Elite, monospace" font-size="6" fill="currentColor" letter-spacing="1">N</text>
</svg>
<h1 class="diary__title" id="diaryTitle">
<span class="diary__title-main" id="diaryTitleMain">Community Diary</span>
<span class="diary__title-sub" id="diaryTitleSub">STATE OF DECAY 2 · NARRATIVE LOGBOOK</span>
</h1>
</div>
<div class="diary__date">
<div class="field-label">Day</div>
<div class="daybox">
<button type="button" data-step="day" data-delta="-1" aria-label="Previous day">−</button>
<input type="number" id="dayNumber" value="1" min="1" inputmode="numeric" aria-label="Day number">
<button type="button" data-step="day" data-delta="1" aria-label="Next day">+</button>
</div>
</div>
</header>
<!-- ── Status strip: name / map / base / difficulty ───── -->
<section class="status" aria-label="Community status">
<label class="field">
<span class="field-label">Community Name</span>
<input type="text" id="communityName" placeholder="" autocomplete="off" aria-label="Community name" maxlength="32">
</label>
<label class="field">
<span class="field-label">Map</span>
<select id="mapSelect" aria-label="Map selection">
<option value="">—</option>
<option value="cascade">Cascade Hills</option>
<option value="drucker">Drucker County</option>
<option value="meagher">Meagher Valley</option>
<option value="providence">Providence Ridge</option>
<option value="trumbull">Trumbull Valley</option>
</select>
</label>
<label class="field">
<span class="field-label">Base</span>
<select id="baseSelect" disabled aria-label="Base selection">
<option value="">Pick map first…</option>
</select>
</label>
</section>
<!-- 1. Where We Stand ─────────────────────────────────── -->
<section class="entry" id="sec-stand" aria-labelledby="t-stand">
<h2 class="entry__title" id="t-stand"><span class="entry__num">1.</span> Where We Stand</h2>
<p class="entry__sub">Headcount, difficulty, plague heart progress.</p>
<div class="row">
<div class="field">
<label for="difficultySelect" class="field-label">Difficulty</label>
<select id="difficultySelect" aria-label="Difficulty level">
<option value="">—</option>
<option>Green Zone</option>
<option>Standard</option>
<option>Dread</option>
<option>Nightmare</option>
<option>Lethal</option>
</select>
</div>
<div class="field">
<span class="field-label field-label--red">Plague Hearts</span>
<div class="stepper stepper--red">
<button type="button" data-step="plagueHearts" data-delta="-1" aria-label="Decrease plague hearts">−</button>
<input type="number" id="plagueHearts" value="0" min="0" inputmode="numeric" aria-label="Plague hearts remaining">
<button type="button" data-step="plagueHearts" data-delta="1" aria-label="Increase plague hearts">+</button>
</div>
</div>
<div class="field">
<span class="field-label">Survivors</span>
<div class="stepper">
<button type="button" data-step="survivors" data-delta="-1" aria-label="Decrease survivors">−</button>
<input type="number" id="survivors" value="0" min="0" inputmode="numeric" aria-label="Survivor count">
<button type="button" data-step="survivors" data-delta="1" aria-label="Increase survivors">+</button>
</div>
</div>
</div>
</section>
<!-- 2. Resources ──────────────────────────────────────── -->
<section class="entry" id="sec-resources" aria-labelledby="t-res">
<h2 class="entry__title" id="t-res"><span class="entry__num">2.</span> Resources <small>start → end of day</small></h2>
<ul class="resources" id="resourceList">
<!-- Built by JS so we keep markup tidy -->
</ul>
</section>
<!-- 3. Morale ─────────────────────────────────────────── -->
<section class="entry" id="sec-morale" aria-labelledby="t-mood">
<h2 class="entry__title" id="t-mood"><span class="entry__num">3.</span> Community Mood</h2>
<div class="morale">
<div class="morale__faces" aria-hidden="true">
<svg class="face face--neg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="13" fill="none" stroke="currentColor" stroke-width="1.4"/><circle cx="11" cy="13" r="1.3" fill="currentColor"/><circle cx="21" cy="13" r="1.3" fill="currentColor"/><path d="M10 22 Q16 17 22 22" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
<svg class="face face--mid" viewBox="0 0 32 32"><circle cx="16" cy="16" r="13" fill="none" stroke="currentColor" stroke-width="1.4"/><circle cx="11" cy="13" r="1.3" fill="currentColor"/><circle cx="21" cy="13" r="1.3" fill="currentColor"/><path d="M10 21 H22" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
<svg class="face face--pos" viewBox="0 0 32 32"><circle cx="16" cy="16" r="13" fill="none" stroke="currentColor" stroke-width="1.4"/><circle cx="11" cy="13" r="1.3" fill="currentColor"/><circle cx="21" cy="13" r="1.3" fill="currentColor"/><path d="M10 19 Q16 25 22 19" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
</div>
<input type="range" class="morale__slider" id="morale" min="-100" max="100" value="0" aria-label="Morale">
<input type="number" class="morale__value" id="moraleValue" min="-100" max="100" value="0" aria-label="Morale value" inputmode="numeric">
</div>
</section>
<!-- 4. What Happened ──────────────────────────────────── -->
<section class="entry" id="sec-events" aria-labelledby="t-evt">
<h2 class="entry__title" id="t-evt"><span class="entry__num">4.</span> What Happened Today</h2>
<p class="entry__sub">Missions, fights, contacts, finds, losses — anything you'd tell another survivor over the fire.</p>
<label for="events" class="sr-only">Today's events</label>
<textarea id="events" placeholder="" aria-label="Today's events"></textarea>
</section>
<!-- 5. Losses & Arrivals ──────────────────────────────── -->
<section class="entry" id="sec-people-flux">
<h2 class="entry__title"><span class="entry__num">5.</span> Losses & Arrivals</h2>
<div class="row row--2">
<div class="field">
<label for="deaths" class="field-label field-label--red">
<svg viewBox="0 0 16 16" width="14" height="14" style="display:inline-block;vertical-align:-2px;margin-right:4px;color:var(--ink-red);" aria-hidden="true">
<circle cx="8" cy="6.5" r="4.2" fill="none" stroke="currentColor" stroke-width="1.1"/>
<circle cx="6.2" cy="6.3" r="0.9" fill="currentColor"/>
<circle cx="9.8" cy="6.3" r="0.9" fill="currentColor"/>
<path d="M6.5 9.2 L7 10 M8 9.2 V10 M9.5 9.2 L9 10" stroke="currentColor" stroke-width="0.7" fill="none"/>
<path d="M5.5 10.4 L4 12 M6.8 10.6 V12.4 M9.2 10.6 V12.4 M10.5 10.4 L12 12" stroke="currentColor" stroke-width="1" fill="none" stroke-linecap="round"/>
</svg>
We Lost
</label>
<textarea id="deaths" placeholder="" aria-label="Losses and deaths"></textarea>
</div>
<div class="field">
<label for="newSurvivors" class="field-label">New Faces</label>
<textarea id="newSurvivors" placeholder="" aria-label="New survivors"></textarea>
</div>
</div>
</section>
<!-- 6. Anything Else ──────────────────────────────────── -->
<section class="entry" id="sec-notes">
<h2 class="entry__title"><span class="entry__num">6.</span> Anything Else <small>plans, worries, ideas</small></h2>
<label for="notes" class="sr-only">Additional notes</label>
<textarea id="notes" placeholder="" aria-label="Additional notes"></textarea>
</section>
<!-- ── The People (Roster) ────────────────────────────── -->
<section class="entry" id="sec-people" aria-labelledby="t-ppl">
<h2 class="entry__title" id="t-ppl">
<span class="entry__num">★</span> The People
<small><span id="rosterCount">0</span> in community · <span id="legacyCount">0</span> legacy · <span id="kiaCount">0</span> fallen</small>
</h2>
<p class="entry__sub">Tracked individuals. Legacy Pool preserves heroes for future playthroughs (excluded from reports).</p>
<div class="roster__list" id="rosterList"></div>
<details class="roster__add">
<summary>Add survivor</summary>
<form id="rosterForm">
<label>Name<input type="text" name="name" required autocomplete="off" placeholder=""></label>
<label>Age<input type="number" name="age" min="0" max="120" autocomplete="off"></label>
<label>Bio<input type="text" name="bio" placeholder="" autocomplete="off"></label>
<label>Traits<input type="text" name="traits" placeholder="" autocomplete="off"></label>
<label>Skills<input type="text" name="skills" placeholder="" autocomplete="off"></label>
<label>Day Joined<input type="number" name="dayJoined" min="1" autocomplete="off"></label>
<div class="submit">
<button type="submit" class="ink-btn">+ Add to Roster</button>
</div>
</form>
</details>
</section>
<!-- ── Generate + Report ──────────────────────────────── -->
<section class="generate" id="sec-report">
<button type="button" id="generateBtn" class="stamp-btn">Generate Report</button>
</section>
<section class="report" id="reportCard" aria-live="polite">
<h2>
<span>Today's Report <small style="font-family:var(--font-mono);letter-spacing:1px;color:var(--ink-pencil);margin-left:8px;">auto-copied to clipboard</small></span>
<button type="button" class="ink-btn ink-btn--ghost" id="copyReportBtn">Copy</button>
</h2>
<div id="reportEmpty" class="report__empty">No report yet. Fill in today's entry and stamp it.</div>
<pre id="reportOutput" hidden></pre>
</section>
<!-- ── Radio Sync ────────────────────────────────────── -->
<details class="sync" id="syncBlock" aria-label="Radio Sync">
<summary>☞ Radio Sync <small>share current state · link only</small></summary>
<div class="sync__body">
<p class="sync__desc">Generates a compressed link with your current form state, roster, and ties (history excluded). Paste on another device to resume.</p>
<div class="sync__link-row">
<label for="syncLinkOutput" class="sr-only">Share link</label>
<input type="text" id="syncLinkOutput" readonly class="sync__link-input" placeholder="Open to generate…" aria-readonly="true">
<button type="button" class="ink-btn" id="syncCopyBtn">Copy Link</button>
</div>
<div class="sync__meta" id="syncMeta" aria-live="polite" aria-atomic="true"></div>
</div>
</details>
<!-- ── History ────────────────────────────────────────── -->
<details class="history" id="historyBlock">
<summary>History Log <small style="font-family:var(--font-mono);font-size:11px;letter-spacing:1px;color:var(--ink-soft);margin-left:8px;font-weight:400;text-transform:none;"><span id="histCount">0</span> entries</small></summary>
<div class="history__bar">
<button type="button" class="ink-btn" id="exportBtn">Export JSON</button>
<button type="button" class="ink-btn" id="importBtn">Import JSON</button>
<input type="file" id="importInput" accept=".json" hidden>
<button type="button" class="ink-btn" id="copyAllBtn">Copy All</button>
<button type="button" class="ink-btn dangerous" id="clearBtn">Clear History</button>
<button type="button" class="ink-btn dangerous" id="newBookBtn">New Book…</button>
</div>
<ol class="history__list" id="historyList"></ol>
<div id="historyEmpty" class="report__empty" style="border-top:1px dashed var(--ink-pencil);">No reports yet. Generate your first to start tracking history.</div>
</details>
<footer class="diary__foot">
<span class="diary__foot-mark">✦</span>
<input type="text" class="diary__foot-text" id="diaryFoot" aria-label="Footer message" maxlength="80" autocomplete="off">
<span class="diary__foot-mark">✦</span>
</footer>
</main>
</div>
<!-- Mobile dock -->
<nav class="dock" aria-label="Sections">
<a href="#sec-stand"><span class="glyph">◷</span>Stand</a>
<a href="#sec-resources">
<svg class="glyph" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="10" width="18" height="11" rx="1"/>
<path d="M7 10 V6 L12 3 L17 6 V10"/>
<line x1="3" y1="15" x2="21" y2="15"/>
</svg>
Res
</a>
<a href="#sec-events"><span class="glyph">✎</span>Log</a>
<a href="#sec-people"><span class="glyph">☉</span>People</a>
<a href="#sec-report"><span class="glyph">✦</span>Report</a>
</nav>
<!-- Tweaks toggle + panel -->
<button type="button" id="tweaksToggle" class="tweaks__toggle">Tweaks ✎</button>
<aside class="tweaks" id="tweaksPanel" aria-label="Tweaks">
<div class="tweaks__head">
<span class="tweaks__title">Tweaks</span>
<button type="button" class="tweaks__close" id="tweaksClose" aria-label="Close">✕</button>
</div>
<div class="tweaks__row">
<span class="field-label">Color mood</span>
<div class="swatches" id="moodSwatches">
<button type="button" class="swatch is-on" data-mood="sepia">Sepia</button>
<button type="button" class="swatch" data-mood="bone">Bone</button>
<button type="button" class="swatch" data-mood="coffee">Coffee</button>
<button type="button" class="swatch" data-mood="olive">Olive</button>
</div>
</div>
<div class="tweaks__row">
<span class="field-label">Paper texture</span>
<div class="slider-row">
<input type="range" min="0" max="100" value="55" id="grainSlider">
<span id="grainValue">55</span>
</div>
</div>
<div class="tweaks__row">
<span class="field-label">Handwriting style</span>
<div class="seg" id="handSeg">
<button type="button" data-hand="script" class="is-on">Neat</button>
<button type="button" data-hand="indie">Loose</button>
<button type="button" data-hand="off">Typewriter</button>
</div>
</div>
</aside>
<div class="notif" id="notif" role="status" aria-live="polite" aria-atomic="true">Saved</div>
<script src="v4/app.js"></script>
</body>
</html>