-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsources.html
More file actions
59 lines (53 loc) · 2.22 KB
/
sources.html
File metadata and controls
59 lines (53 loc) · 2.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<title>Source Library — Information Diagnostics</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=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<main class="page-content">
<div class="container">
<div class="page-header">
<h1>Source Library</h1>
<p>Curated sources — research papers, organizations, and educational resources that inform our content</p>
</div>
<div class="filter-bar" id="filters">
<span class="filter-bar__label">Type:</span>
<button class="filter-btn active" data-filter="all">All</button>
<button class="filter-btn" data-filter="organization">Organizations</button>
<button class="filter-btn" data-filter="research">Research</button>
<button class="filter-btn" data-filter="educational">Educational</button>
</div>
<div class="grid grid--2 fade-in-stagger mt-6" id="sources-grid"></div>
</div>
</main>
<script src="js/app.js"></script>
<script>
initPage('sources', () => {
const grid = document.getElementById('sources-grid');
const filtersContainer = document.getElementById('filters');
let activeFilter = 'all';
function render() {
let sources = AppData.sources;
if (activeFilter !== 'all') sources = sources.filter(s => s.type === activeFilter);
grid.innerHTML = sources.map(s => Components.sourceCard(s)).join('');
}
filtersContainer.addEventListener('click', e => {
const btn = e.target.closest('.filter-btn');
if (!btn) return;
filtersContainer.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
activeFilter = btn.dataset.filter;
render();
});
render();
});
</script>
</body>
</html>