-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
107 lines (96 loc) · 3.17 KB
/
Copy pathindex.html
File metadata and controls
107 lines (96 loc) · 3.17 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Presentations · DevNinja</title>
<meta name="description" content="Technical presentations from DevNinja on AI, engineering, and modern software development.">
<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;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<header class="header">
<div class="header-inner">
<a href="https://devninja.in" class="logo">DevNinja</a>
<span class="logo-sep">/</span>
<span class="site-name">Presentations</span>
</div>
</header>
<main class="main">
<div class="search-wrap">
<input
class="search-input"
type="search"
id="search"
placeholder="Search presentations…"
autocomplete="off"
aria-label="Search presentations"
>
</div>
<div class="card-grid" id="grid"></div>
<div class="empty" id="empty">No presentations found.</div>
</main>
<footer class="footer">
<div class="footer-inner">
<span>© 2026 DevNinja. Professional tech insights for modern teams.</span>
<a
class="footer-link"
href="https://whatsapp.com/channel/0029Va4bjZE3wtb3J2FWPr2V"
target="_blank"
rel="noopener noreferrer"
>📱 Join Community</a>
</div>
</footer>
<script>
const grid = document.getElementById('grid');
const empty = document.getElementById('empty');
const search = document.getElementById('search');
let all = [];
function esc(s) {
return String(s)
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"');
}
function formatDate(iso) {
return new Date(iso + 'T00:00:00').toLocaleDateString('en-US', {
year: 'numeric', month: 'long', day: 'numeric'
});
}
function render(items) {
grid.innerHTML = items.map(p => `
<a class="card" href="/${esc(p.slug)}/">
<div class="card-title">${esc(p.title)}</div>
<div class="card-desc">${esc(p.description)}</div>
<div class="card-tags">${p.tags.map(t => `<span class="tag">${esc(t)}</span>`).join('')}</div>
<div class="card-date">${formatDate(p.date)}</div>
</a>
`).join('');
empty.classList.toggle('visible', items.length === 0);
}
function filter(q) {
const t = q.toLowerCase().trim();
if (!t) return all;
return all.filter(p =>
p.title.toLowerCase().includes(t) ||
p.description.toLowerCase().includes(t) ||
p.tags.some(tag => tag.toLowerCase().includes(t))
);
}
search.addEventListener('input', e => render(filter(e.target.value)));
fetch('presentations.json')
.then(r => { if (!r.ok) throw new Error(r.status); return r.json(); })
.then(data => {
all = data.sort((a, b) => b.date.localeCompare(a.date));
render(all);
})
.catch(err => {
console.error('Failed to load presentations:', err);
empty.classList.add('visible');
});
</script>
</body>
</html>