-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
667 lines (617 loc) · 43.7 KB
/
Copy pathtest.html
File metadata and controls
667 lines (617 loc) · 43.7 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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<title>Rockford Resilience Hub – Local Resources for Community Strength & Self-Reliance</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, interactive-widget=resizes-content">
<meta name="description" content="Discover Rockford’s local resource directory for food, emergency aid, healthcare, shelters, and mutual support. Built for offline access and community resilience in any situation.">
<meta name="author" content="Michael Schwartz">
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="Rockford Resilience Hub – Local Resources for Community Strength & Self-Reliance">
<meta name="theme-color" content="#13171f">
<meta name="apple-mobile-web-app-title" content="Rockford Resilience Hub – Local Resources for Community Strength & Self-Reliance">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="msapplication-starturl" content="./index.html">
<meta name="msapplication-navbutton-color" content="#13171f">
<meta property="og:url" content="https://michaelsboost.com/RockfordResilienceHub" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Rockford Resilience Hub – Local Resources for Community Strength & Self-Reliance" />
<meta property="og:description" content="Discover Rockford’s local resource directory for food, emergency aid, healthcare, shelters, and mutual support. Built for offline access and community resilience in any situation." />
<link rel="shortcut icon" type="image/x-icon" href="imgs/logo.svg">
<link rel="icon" type="image/svg+xml" href="imgs/logo.svg" />
<link rel="apple-touch-icon" href="imgs/logo.svg">
<link rel="stylesheet" href="src/bundle.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js" defer></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
roku: {
50: '#faf5ff',
100: '#f3e8ff',
200: '#e9d5ff',
300: '#d8b4fe',
400: '#c084fc',
500: '#a855f7',
600: '#9333ea',
700: '#7c22d3',
800: '#662d91',
900: '#581c87',
},
purple: {
50: '#faf5ff',
100: '#f3e8ff',
200: '#e9d5ff',
300: '#d8b4fe',
400: '#c084fc',
500: '#a855f7',
600: '#9333ea',
700: '#7c22d3',
800: '#662d91',
900: '#581c87',
}
},
backgroundImage: {
'roku-gradient': 'linear-gradient(135deg, #662d91 0%, #9333ea 50%, #c084fc 100%)',
'roku-gradient-dark': 'linear-gradient(135deg, #581c87 0%, #7c22d3 50%, #a855f7 100%)',
}
},
},
};
</script>
</head>
<body>
<div x-data="resilienceHub()" x-init="init()" class="min-h-full bg-gray-50 dark:bg-gray-900 transition-colors duration-300">
<!-- Crisis Alert Banner -->
<div x-show="alerts.enabled" class="no-print bg-gradient-to-r from-red-500 to-pink-600 text-white border-b border-red-400 dark:border-red-700">
<div class="container mx-auto px-4 py-3 text-sm flex items-center justify-between gap-4">
<div class="flex items-center gap-3 flex-1">
<svg class="w-5 h-5 text-white flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"></path>
</svg>
<div>
<span class="font-semibold">URGENT:</span>
<span x-text="alerts.message" class="ml-1"></span>
</div>
</div>
<div class="flex items-center gap-2">
<button @click="alerts.enabled=false; saveMeta()" class="text-xs bg-white/20 hover:bg-white/30 px-2 py-1 rounded transition-colors">
Dismiss
</button>
<button @click="openAlertEditor()" class="text-xs bg-white/20 hover:bg-white/30 px-2 py-1 rounded transition-colors">
Edit
</button>
</div>
</div>
</div>
<!-- Header -->
<header class="no-print bg-roku-gradient dark:bg-roku-gradient-dark text-white shadow-xl">
<div class="container mx-auto px-4 py-6">
<div class="flex flex-col lg:flex-row justify-between items-start lg:items-center gap-4">
<div class="flex-1">
<div class="flex items-center gap-3 mb-2">
<div class="w-10 h-10 bg-white/20 rounded-lg flex items-center justify-center">
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
</svg>
</div>
<div>
<h1 class="text-3xl lg:text-4xl font-bold bg-gradient-to-r from-white to-purple-200 bg-clip-text text-transparent">
Rockford Resilience Hub
</h1>
<p class="text-purple-200 text-lg mt-1">Complete self-reliance & community sustainability directory</p>
</div>
</div>
<p class="text-xs text-purple-200/80 mt-2">
<span class="inline-flex items-center gap-1">
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
Last updated <span x-text="meta.lastUpdatedDisplay"></span>
</span>
• Offline‑ready • Community‑powered
</p>
</div>
<div class="flex flex-wrap gap-2">
<button @click="toggleDarkMode()" class="p-2 rounded-lg glass-card hover:bg-white/10 transition-all" :aria-pressed="darkMode" title="Toggle theme">
<svg x-show="!darkMode" class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
</svg>
<svg x-show="darkMode" class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
</svg>
</button>
<button @click="exportData()" class="px-3 py-2 rounded-lg glass-card hover:bg-white/10 font-medium transition-all">
Export
</button>
<button @click="$refs.importFile.click()" class="px-3 py-2 rounded-lg glass-card hover:bg-white/10 font-medium transition-all">
Import
</button>
<button @click="printList()" class="px-3 py-2 rounded-lg glass-card hover:bg-white/10 font-medium transition-all">
Print
</button>
<button @click="showShareModal=true" class="px-3 py-2 rounded-lg glass-card hover:bg-white/10 font-medium transition-all">
Share
</button>
</div>
</div>
</div>
</header>
<!-- Controls Section -->
<section class="container mx-auto px-4 py-6">
<div class="bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6 border border-gray-100 dark:border-gray-700">
<!-- Search and Filters Row -->
<div class="grid gap-4 md:grid-cols-4 items-start mb-6 overflow-x-auto">
<!-- Search -->
<div class="md:col-span-2">
<label class="sr-only" for="search">Search resources</label>
<div class="relative">
<svg class="absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
<input id="search" x-model="searchTerm" @input="filterResources()" type="text" placeholder="Search 150+ resources..." class="w-full pl-10 pr-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
</div>
<!-- Neighborhoods -->
<div>
<select x-model="selectedNeighborhood" @change="filterResources()" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 dark:bg-gray-700 dark:text-white transition-all">
<option value="">All Areas</option>
<template x-for="n in neighborhoods" :key="n">
<option :value="n" x-text="n"></option>
</template>
</select>
</div>
<!-- Sort -->
<div class="flex gap-2">
<select x-model="sortBy" @change="sortResources()" class="flex-1 px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 dark:bg-gray-700 dark:text-white transition-all">
<option value="verified">Recently Verified</option>
<option value="name">Alphabetical</option>
<option value="category">Category</option>
<option value="distance">Distance (near me)</option>
</select>
<button @click="getLocation()" :class="userHasLocation ? 'bg-green-500 hover:bg-green-600 text-white' : 'bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 text-gray-700 dark:text-gray-300'" class="px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl transition-all" :title="userHasLocation ? 'Location set' : 'Use my location'">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"></path>
</svg>
</button>
</div>
</div>
<!-- Category Dropdown -->
<div class="mb-4">
<details class="group">
<summary class="cursor-pointer list-none">
<div class="flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors">
<div class="flex items-center gap-2">
<svg class="w-5 h-5 text-roku-600 dark:text-roku-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
</svg>
<span class="font-semibold text-gray-700 dark:text-gray-300">
Resource Categories
<span x-show="selectedCategories.length > 0" class="text-sm font-normal text-roku-600 dark:text-roku-400">
(<span x-text="selectedCategories.length"></span> selected)
</span>
</span>
</div>
<svg class="w-5 h-5 text-gray-500 transform group-open:rotate-180 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</div>
</summary>
<div class="mt-2 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg border border-gray-200 dark:border-gray-600">
<div class="flex flex-wrap gap-2">
<template x-for="category in categories" :key="category">
<button @click="toggleCategory(category)" class="px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 transform hover:scale-105" :class="selectedCategories.includes(category)
? 'bg-roku-600 text-white shadow-lg shadow-roku-600/25'
: 'bg-white dark:bg-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-500'" x-text="category"></button>
</template>
</div>
<div class="mt-3 flex gap-2">
<button @click="selectedCategories = []; filterResources()" class="text-sm text-roku-600 dark:text-roku-400 hover:underline">
Clear all
</button>
<button @click="selectedCategories = [...categories]; filterResources()" class="text-sm text-roku-600 dark:text-roku-400 hover:underline">
Select all
</button>
</div>
</div>
</details>
</div>
<!-- Tags Dropdown -->
<div class="mb-6">
<details class="group">
<summary class="cursor-pointer list-none">
<div class="flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors">
<div class="flex items-center gap-2">
<svg class="w-5 h-5 text-purple-600 dark:text-purple-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"></path>
</svg>
<span class="font-semibold text-gray-700 dark:text-gray-300">
Popular Tags
<span x-show="selectedTags.length > 0" class="text-sm font-normal text-purple-600 dark:text-purple-400">
(<span x-text="selectedTags.length"></span> selected)
</span>
</span>
</div>
<svg class="w-5 h-5 text-gray-500 transform group-open:rotate-180 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</div>
</summary>
<div class="mt-2 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg border border-gray-200 dark:border-gray-600">
<div class="flex flex-wrap gap-2">
<template x-for="tag in allTags" :key="tag">
<button @click="toggleTag(tag)" class="px-3 py-1.5 rounded-full text-sm font-medium border transition-all duration-200 hover:scale-105" :class="selectedTags.includes(tag)
? 'bg-purple-100 dark:bg-purple-900 border-purple-300 dark:border-purple-700 text-purple-800 dark:text-purple-200 shadow-lg shadow-purple-500/25'
: 'bg-white dark:bg-gray-600 border-gray-200 dark:border-gray-500 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-500'" x-text="tag"></button>
</template>
</div>
<div class="mt-3 flex gap-2">
<button @click="selectedTags = []; filterResources()" class="text-sm text-purple-600 dark:text-purple-400 hover:underline">
Clear all
</button>
<button @click="selectedTags = [...allTags]; filterResources()" class="text-sm text-purple-600 dark:text-purple-400 hover:underline">
Select all
</button>
</div>
</div>
</details>
</div>
<!-- Results and Add Button -->
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 pt-4 border-t border-gray-200 dark:border-gray-700">
<div class="text-gray-600 dark:text-gray-400">
Showing <span x-text="filteredResources.length" class="font-semibold text-roku-600 dark:text-roku-400"></span> of <span x-text="resources.length"></span> resources
</div>
<button @click="openModal()" class="no-print inline-flex items-center gap-2 px-4 py-3 rounded-xl bg-roku-600 hover:bg-roku-700 text-white font-semibold shadow-lg shadow-roku-600/25 hover:shadow-roku-600/40 transition-all duration-200 transform hover:scale-105">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
</svg>
Add Resource
</button>
</div>
</div>
</section>
<!-- Resources Grid -->
<section class="container mx-auto px-4 pb-24">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<template x-for="resource in filteredResources" :key="resource.id">
<article class="card bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-100 dark:border-gray-700 overflow-hidden hover:shadow-xl transition-all duration-300 hover:translate-y-1">
<div class="p-6">
<!-- Header -->
<div class="flex justify-between items-start gap-3 mb-4">
<div class="min-w-0 flex-1">
<h3 class="text-xl font-bold text-gray-900 dark:text-white truncate" x-text="resource.name"></h3>
<div class="mt-2 flex flex-wrap items-center gap-2">
<span class="inline-block px-3 py-1 text-xs font-semibold bg-roku-100 dark:bg-roku-900 text-roku-800 dark:text-roku-200 rounded-full" x-text="resource.category"></span>
<template x-if="resource.status && resource.status !== 'active'">
<span class="inline-block px-2 py-1 text-xs font-semibold rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-100" x-text="resource.status"></span>
</template>
<template x-if="resource.distanceKm !== undefined && !isNaN(resource.distanceKm)">
<span class="inline-block px-2 py-1 text-xs rounded-full bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-200">
<span x-text="resource.distanceKm.toFixed(1)"></span> km
</span>
</template>
</div>
</div>
<div class="flex gap-1 no-print">
<button @click="editResource(resource)" class="p-2 text-gray-400 hover:text-roku-600 dark:hover:text-roku-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors" title="Edit">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path>
</svg>
</button>
<button @click="quickDuplicate(resource)" class="p-2 text-gray-400 hover:text-roku-600 dark:hover:text-roku-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors" title="Duplicate resource">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
</svg>
</button>
<button @click="confirmDelete(resource)" class="p-2 text-gray-400 hover:text-red-600 dark:hover:text-red-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors" title="Delete">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path>
</svg>
</button>
</div>
</div>
<!-- Description -->
<p class="text-gray-600 dark:text-gray-300 leading-relaxed mb-4" x-text="resource.description"></p>
<!-- Tags -->
<div class="flex flex-wrap gap-1.5 mb-4">
<template x-for="tag in resource.tags" :key="tag">
<span class="px-2.5 py-1 text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 rounded-full font-medium" x-text="tag"></span>
</template>
</div>
<!-- Details -->
<dl class="space-y-3 text-sm text-gray-600 dark:text-gray-300">
<div class="flex items-start">
<svg class="w-4 h-4 mt-0.5 mr-3 flex-shrink-0 text-roku-600 dark:text-roku-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"></path>
</svg>
<a :href="mapLink(resource)" target="_blank" class="hover:text-roku-600 dark:hover:text-roku-400 transition-colors" x-text="resource.address"></a>
</div>
<template x-if="resource.hours">
<div class="flex items-start">
<svg class="w-4 h-4 mt-0.5 mr-3 flex-shrink-0 text-roku-600 dark:text-roku-400" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<dd x-text="resource.hours"></dd>
</div>
</template>
<template x-if="resource.contact">
<div class="flex items-start">
<svg class="w-4 h-4 mt-0.5 mr-3 flex-shrink-0 text-roku-600 dark:text-roku-400" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path>
</svg>
<dd><a :href="telLink(resource.contact)" class="hover:underline transition-colors" x-text="resource.contact"></a></dd>
</div>
</template>
<template x-if="resource.website">
<div class="flex items-start">
<svg class="w-4 h-4 mt-0.5 mr-3 flex-shrink-0 text-roku-600 dark:text-roku-400" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9v-9m0-9v9m0 9c-5 0-9-4-9-9s4-9 9-9"></path>
</svg>
<dd><a :href="resource.website" target="_blank" class="hover:underline break-all transition-colors" x-text="resource.website"></a></dd>
</div>
</template>
<template x-if="resource.eligibility">
<div class="flex items-start">
<svg class="w-4 h-4 mt-0.5 mr-3 flex-shrink-0 text-roku-600 dark:text-roku-400" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<dd x-text="resource.eligibility"></dd>
</div>
</template>
<template x-if="resource.languages?.length">
<div class="flex items-start">
<svg class="w-4 h-4 mt-0.5 mr-3 flex-shrink-0 text-roku-600 dark:text-roku-400" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5h12M9 3v2m3 7h6m-3-2v4M4 15h8m-4-2v4"></path>
</svg>
<dd><span class="text-xs font-medium">Languages: </span><span x-text="resource.languages.join(', ')"></span></dd>
</div>
</template>
</dl>
<!-- Footer -->
<div class="mt-6 pt-4 border-t border-gray-200 dark:border-gray-700 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-2 text-xs text-gray-500 dark:text-gray-400">
<div class="flex items-center gap-2">
<span>Verified: <span x-text="resource.verification_date" class="font-medium"></span></span>
<button class="no-print underline hover:text-roku-600 dark:hover:text-roku-400 transition-colors" @click="markVerified(resource)">
mark today
</button>
</div>
<div class="flex gap-3 no-print">
<button @click="suggestNote(resource)" class="underline hover:text-roku-600 dark:hover:text-roku-400 transition-colors">
Add note
</button>
</div>
</div>
</div>
</article>
</template>
</div>
</section>
<!-- Floating Add Button -->
<button @click="openModal()" class="no-print fixed bottom-6 right-6 w-14 h-14 bg-roku-600 hover:bg-roku-700 text-white rounded-full shadow-2xl shadow-roku-600/50 hover:shadow-roku-600/60 flex items-center justify-center transition-all duration-300 transform hover:scale-110">
<svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
</svg>
</button>
<!-- Add/Edit Modal -->
<div x-show="showModal" class="no-print fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50" x-cloak="">
<div class="bg-white dark:bg-gray-800 rounded-2xl shadow-2xl w-full max-w-4xl max-h-[90vh] overflow-y-auto">
<form @submit.prevent="saveResource()" class="p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold text-gray-900 dark:text-white" x-text="editingResource ? 'Edit Resource' : 'Add Resource'"></h2>
<button type="button" @click="closeModal()" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
<svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Required Fields -->
<div class="md:col-span-2">
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Name *</label>
<input type="text" x-model="form.name" required="" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Category *</label>
<select x-model="form.category" required="" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
<option value="">Select a category</option>
<template x-for="category in categories" :key="category">
<option :value="category" x-text="category"></option>
</template>
</select>
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Verification Date *</label>
<input type="date" x-model="form.verification_date" required="" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<!-- Description -->
<div class="md:col-span-2">
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Description</label>
<textarea x-model="form.description" rows="3" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all"></textarea>
</div>
<!-- Contact Information -->
<div class="md:col-span-2">
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Address</label>
<input type="text" x-model="form.address" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Hours</label>
<input type="text" x-model="form.hours" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Contact (phone or email)</label>
<input type="text" x-model="form.contact" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Website</label>
<input type="url" x-model="form.website" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Eligibility</label>
<input type="text" x-model="form.eligibility" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<!-- Additional Fields -->
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Neighborhood</label>
<input type="text" x-model="form.neighborhood" list="neighborhoods" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
<datalist id="neighborhoods">
<template x-for="n in neighborhoods" :key="n">
<option :value="n"></option>
</template>
</datalist>
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Status</label>
<select x-model="form.status" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
<option value="active">Active</option>
<option value="temporarily closed">Temporarily Closed</option>
<option value="seasonal">Seasonal</option>
</select>
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Languages (comma‑separated)</label>
<input type="text" x-model="form.languagesInput" placeholder="English, Spanish" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<div>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Tags (comma‑separated)</label>
<input type="text" x-model="form.tagsInput" placeholder="free, groceries, emergency" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all">
</div>
<!-- Notes -->
<div class="md:col-span-2">
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Notes (internal)</label>
<textarea x-model="form.notes" rows="2" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all" placeholder="verification call outcome, volunteer spoke with, etc."></textarea>
</div>
</div>
<div class="flex justify-between items-center gap-4 pt-6 mt-6 border-t border-gray-200 dark:border-gray-700">
<div class="text-sm text-gray-500 dark:text-gray-400">Fields marked * are required.</div>
<div class="flex gap-3">
<button type="button" @click="closeModal()" class="px-6 py-3 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors">
Cancel
</button>
<button type="submit" class="px-8 py-3 bg-roku-600 hover:bg-roku-700 text-white font-semibold rounded-xl shadow-lg shadow-roku-600/25 hover:shadow-roku-600/40 transition-all duration-200">
<span x-text="editingResource ? 'Update Resource' : 'Add Resource'"></span>
</button>
</div>
</div>
</form>
</div>
</div>
<!-- Delete Confirmation Modal -->
<div x-show="showDeleteModal" class="no-print fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50" x-cloak="">
<div class="bg-white dark:bg-gray-800 rounded-2xl shadow-2xl w-full max-w-md">
<div class="p-6">
<div class="flex items-center gap-4 mb-4">
<div class="w-12 h-12 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center">
<svg class="w-6 h-6 text-red-600 dark:text-red-400" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"></path>
</svg>
</div>
<h3 class="text-xl font-bold text-gray-900 dark:text-white">Delete Resource</h3>
</div>
<p class="text-gray-600 dark:text-gray-300 mb-6">
Are you sure you want to delete "<span x-text="resourceToDelete?.name" class="font-semibold"></span>"? This action cannot be undone.
</p>
<div class="flex justify-end gap-3">
<button type="button" @click="showDeleteModal=false; resourceToDelete=null" class="px-6 py-3 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors">
Cancel
</button>
<button type="button" @click="deleteResource()" class="px-6 py-3 bg-red-600 hover:bg-red-700 text-white font-semibold rounded-xl shadow-lg shadow-red-600/25 hover:shadow-red-600/40 transition-all duration-200">
Delete Resource
</button>
</div>
</div>
</div>
</div>
<!-- Alert Editor Modal -->
<div x-show="showAlertModal" class="no-print fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50" x-cloak="">
<div class="bg-white dark:bg-gray-800 rounded-2xl shadow-2xl w-full max-w-2xl">
<div class="p-6">
<h3 class="text-xl font-bold text-gray-900 dark:text-white mb-4">Edit Crisis Alert</h3>
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-2">Alert Message</label>
<textarea x-model="alerts.message" rows="3" class="w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl focus:ring-2 focus:ring-roku-600 focus:border-transparent dark:bg-gray-700 dark:text-white transition-all" placeholder="Enter urgent community notice..."></textarea>
<div class="mt-4 flex items-center gap-3">
<label class="inline-flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white">
<input type="checkbox" x-model="alerts.enabled" class="rounded border-gray-300 text-roku-600 focus:ring-roku-600">
Show alert banner
</label>
<span class="text-xs text-gray-500 dark:text-gray-400">Use for time‑sensitive emergency information</span>
</div>
<div class="mt-6 flex justify-end gap-3">
<button @click="showAlertModal=false" class="px-6 py-3 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors">
Cancel
</button>
<button @click="saveMeta(); showAlertModal=false" class="px-6 py-3 bg-roku-600 hover:bg-roku-700 text-white font-semibold rounded-xl shadow-lg shadow-roku-600/25 hover:shadow-roku-600/40 transition-all duration-200">
Save Alert
</button>
</div>
</div>
</div>
</div>
<!-- Share Modal -->
<div x-show="showShareModal" class="no-print fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50" x-cloak="">
<div class="bg-white dark:bg-gray-800 rounded-2xl shadow-2xl w-full max-w-2xl">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold text-gray-900 dark:text-white">Share Rockford Resilience Hub</h2>
<button type="button" @click="showShareModal=false" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
<svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<div class="mt-6 grid grid-cols-1 place-items-center">
<img class="border bg-white rounded-lg" src="imgs/file-1.svg" alt="qrcode">
</div>
<div class="mt-6 flex justify-end gap-3">
<button @click="showShareModal=false" class="px-6 py-3 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors">
Close
</button>
<button @click="copyURL(); showShareModal=false" class="px-6 py-3 bg-roku-600 hover:bg-roku-700 text-white font-semibold rounded-xl shadow-lg shadow-roku-600/25 hover:shadow-roku-600/40 transition-all duration-200">
Copy URL
</button>
</div>
</div>
</div>
</div>
<!-- Hidden file input -->
<input type="file" x-ref="importFile" @change="importData($event)" accept=".json,.csv" class="hidden">
<!-- Footer -->
<footer class="py-6 text-center text-gray-500 mt-10 border-t border-gray-200 dark:border-gray-700">
<p class="text-sm flex flex-wrap justify-center items-center gap-2 leading-relaxed">
<span>
Made with
<svg class="w-4 h-4 text-red-500 mb-1 inline" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53Z"></path>
</svg>
for community resilience
</span>
<span class="text-gray-300">•</span>
<span>
Built by
<a href="https://michaelsboost.com/" target="_blank" rel="noopener noreferrer" class="font-semibold text-gray-600 hover:text-[#2a86f4] dark:text-gray-300 dark:hover:text-white">
Michael Schwartz
</a>
</span>
<span class="text-gray-300">•</span>
<a href="https://github.com/michaelsboost/RockfordResilienceHub" target="_blank" rel="noopener noreferrer" class="font-medium text-gray-600 hover:text-[#2a86f4] dark:text-gray-300 dark:hover:text-white">
Source on GitHub
</a>
<span class="text-gray-300">•</span>
<a href="https://github.com/michaelsboost/RockfordResilienceHub/issues" target="_blank" rel="noopener noreferrer" class="font-medium text-gray-600 hover:text-[#2a86f4] dark:text-gray-300 dark:hover:text-white">
Report an Issue
</a>
<span class="text-gray-300">•</span>
<span class="whitespace-nowrap">MIT License</span>
<span class="text-gray-300">•</span>
<span class="whitespace-nowrap">No tracking — runs entirely in your browser</span>
</p>
</footer>
</div>
<script src="dist/script.js"></script>
</body>
</html>