-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
443 lines (385 loc) · 13.9 KB
/
index.html
File metadata and controls
443 lines (385 loc) · 13.9 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
---
layout: none
title: Awesome Wikidata
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ page.title }}</title>
<meta name="description"
content="Curated list of Wikidata projects and applications across models, services, web, desktop, and mobile.">
<link rel="icon" type="image/svg+xml" href="assets/logo.svg">
<style>
:root {
--bg-1: #04111f;
--bg-2: #081f31;
--panel: rgba(10, 28, 46, 0.72);
--line: rgba(81, 226, 255, 0.3);
--text: #ecf8ff;
--muted: #a1cbe3;
--accent: #4de6ff;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
color: var(--text);
background:
radial-gradient(circle at 12% 4%, #134a75 0, transparent 45%),
radial-gradient(circle at 92% 22%, #0f4f61 0, transparent 35%),
linear-gradient(145deg, var(--bg-1), var(--bg-2) 58%, #071726);
font-family: "Space Grotesk", "Segoe UI", sans-serif;
}
.shell {
max-width: 1120px;
margin: 0 auto;
padding: 1.2rem 1rem 2.8rem;
}
.hero {
border: 1px solid var(--line);
border-radius: 20px;
padding: 1rem;
background: linear-gradient(170deg, rgba(77, 230, 255, 0.13), rgba(76, 255, 178, 0.05));
box-shadow: 0 0 72px rgba(77, 230, 255, 0.1);
}
.brand {
display: flex;
align-items: center;
gap: 0.75rem;
}
.brand img {
width: 54px;
height: 54px;
border-radius: 12px;
border: 1px solid rgba(81, 226, 255, 0.45);
background: rgba(255, 255, 255, 0.08);
}
h1 {
margin: 0;
font-size: clamp(1.8rem, 5vw, 3rem);
letter-spacing: 0.02em;
}
.subtitle {
margin: 0.55rem 0 0;
color: var(--muted);
}
.top-actions {
margin-top: 0.85rem;
display: flex;
gap: 0.6rem;
flex-wrap: wrap;
}
.pill {
display: inline-block;
border-radius: 999px;
border: 1px solid var(--line);
background: rgba(77, 230, 255, 0.1);
color: #d2f6ff;
text-decoration: none;
padding: 0.42rem 0.75rem;
}
.pill:hover {
color: #fff;
border-color: rgba(81, 226, 255, 0.7);
}
.menu {
margin-top: 0.95rem;
display: flex;
gap: 0.55rem;
flex-wrap: wrap;
}
.menu a {
display: inline-block;
border-radius: 999px;
border: 1px solid rgba(81, 226, 255, 0.38);
background: rgba(77, 230, 255, 0.08);
color: #d1f6ff;
text-decoration: none;
padding: 0.36rem 0.68rem;
}
.menu a:hover {
color: #fff;
border-color: rgba(81, 226, 255, 0.68);
}
.grid {
margin-top: 1rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 0.9rem;
}
.card {
border: 1px solid var(--line);
border-radius: 16px;
padding: 0.9rem;
background: var(--panel);
-webkit-backdrop-filter: blur(5px);
backdrop-filter: blur(5px);
}
.card h2 {
margin: 0 0 0.65rem;
font-size: 1.08rem;
color: var(--accent);
display: flex;
align-items: center;
gap: 0.5rem;
}
.icon {
width: 1.4rem;
height: 1.4rem;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 999px;
border: 1px solid rgba(81, 226, 255, 0.5);
background: rgba(77, 230, 255, 0.14);
font-size: 0.83rem;
}
.card ul {
margin: 0;
padding-left: 1.1rem;
}
.card li+li {
margin-top: 0.34rem;
}
.item-name {
display: inline-block;
}
.item-desc {
margin-top: 0.15rem;
color: var(--muted);
font-size: 0.93rem;
line-height: 1.35;
}
.card a {
color: #b8ecff;
text-decoration-color: rgba(184, 236, 255, 0.45);
}
.card a:hover {
color: #fff;
text-decoration-color: #fff;
}
#readme-source {
display: none;
}
@media (max-width: 760px) {
.brand img {
width: 46px;
height: 46px;
}
.shell {
padding-top: 0.85rem;
}
}
</style>
</head>
<body>
<main class="shell">
<section class="hero">
<div class="brand">
<img src="assets/logo.svg" alt="Awesome Wikidata logo">
<h1>Awesome Wikidata</h1>
</div>
<p id="site-subtitle" class="subtitle">Curated list of Wikidata projects and applications across web, desktop,
and mobile.</p>
<nav class="menu" aria-label="Sections">
<a href="#models">Models</a>
<a href="#projects-services">Projects & Services</a>
<a href="#web-applications">Web</a>
<a href="#desktop-cli-applications">Desktop / CLI</a>
<a href="#mobile-friendly-applications">Mobile</a>
</nav>
<div class="top-actions">
<a id="improve-link" class="pill" href="#">Improve this list</a>
</div>
</section>
<section id="app-grid" class="grid"></section>
</main>
<section id="readme-source">
{% capture readme_content %}{% include_relative README.md %}{% endcapture %}
{{ readme_content | markdownify }}
</section>
<script>
(function () {
function normalize(text) {
return (text || "").replace(/\s+/g, " ").trim().toLowerCase();
}
function slugify(text) {
return (text || "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
}
function findHeading(container, tagName, text) {
var headings = container.querySelectorAll(tagName);
var target = normalize(text);
for (var i = 0; i < headings.length; i += 1) {
if (normalize(headings[i].textContent) === target) return headings[i];
}
return null;
}
function collectListsBetween(startHeading, endHeading) {
var out = [];
if (!startHeading) return out;
var node = startHeading.nextElementSibling;
while (node && node !== endHeading) {
if (node.tagName === "UL") out.push(node);
node = node.nextElementSibling;
}
return out;
}
function firstLinkItem(li) {
var a = li.querySelector("a");
if (!a) return null;
var raw = (li.textContent || "").replace(/\s+/g, " ").trim();
var name = a.textContent.trim();
var desc = "";
var split = raw.indexOf(" - ");
if (split >= 0) {
desc = raw.slice(split + 3).trim();
} else {
desc = raw.replace(name, "").trim().replace(/^[\-–—:\s]+/, "");
}
desc = desc
.replace(/🖥|📱/g, "")
.replace(/🖥|📱|🖥|📱|🖥|📱/g, "")
.replace(/\s+/g, " ")
.trim();
return { name: name, href: a.href, raw: raw, desc: desc };
}
function hasDesktopMarker(raw) {
return /desktop|🖥|🖥/i.test(raw || "");
}
function hasMobileMarker(raw) {
return /mobile|📱|📱/i.test(raw || "");
}
function dedupePush(target, item, seen) {
if (!item || !item.href || seen[item.href]) return;
seen[item.href] = true;
target.push(item);
}
function renderCard(root, id, iconHtml, title, items) {
var article = document.createElement("article");
article.className = "card";
article.id = id || slugify(title);
var h2 = document.createElement("h2");
var iconSpan = document.createElement("span");
iconSpan.className = "icon";
iconSpan.innerHTML = iconHtml;
h2.appendChild(iconSpan);
h2.appendChild(document.createTextNode(title));
article.appendChild(h2);
var ul = document.createElement("ul");
for (var i = 0; i < items.length; i += 1) {
var li = document.createElement("li");
var a = document.createElement("a");
a.className = "item-name";
a.href = items[i].href;
a.textContent = items[i].name;
li.appendChild(a);
if (items[i].desc) {
var desc = document.createElement("div");
desc.className = "item-desc";
desc.textContent = items[i].desc
.replace(/\uD83D\uDDA5|\uD83D\uDCF1/g, "")
.replace(/🖥|📱|🖥|📱/g, "")
.replace(/^available on (pc )?desktop\s*/i, "")
.replace(/^available on mobile phones\s*/i, "")
.trim();
li.appendChild(desc);
}
ul.appendChild(li);
}
article.appendChild(ul);
root.appendChild(article);
}
var source = document.getElementById("readme-source");
var grid = document.getElementById("app-grid");
if (!source || !grid) return;
var repoUrl = "{{ site.github.repository_url | default: '' }}";
var defaultBranch = "{{ site.github.default_branch | default: 'main' }}";
var readmeEditUrl = repoUrl ? repoUrl + "/edit/" + defaultBranch + "/README.md" : "";
var subtitle = document.getElementById("site-subtitle");
if (subtitle) {
var paras = source.querySelectorAll("p");
for (var q = 0; q < paras.length; q += 1) {
var pText = (paras[q].textContent || "").trim();
if (/curated list/i.test(pText)) {
subtitle.textContent = pText;
break;
}
}
}
function hasDesktopMarker(raw) {
return /desktop|🖥|\uD83D\uDDA5|🖥|🖥|🖥/i.test(raw || "");
}
function hasMobileMarker(raw) {
return /mobile|📱|\uD83D\uDCF1|📱|📱|📱/i.test(raw || "");
}
var modelsHeading = findHeading(source, "h2", "Models");
var servicesHeading = findHeading(source, "h2", "Services and API");
var toolsHeading = findHeading(source, "h2", "Tools");
var webHeading = findHeading(source, "h3", "Web");
var cliHeading = findHeading(source, "h3", "Command-line");
var librariesHeading = findHeading(source, "h2", "Libraries");
var modelLists = collectListsBetween(modelsHeading, servicesHeading);
var projectLists = collectListsBetween(servicesHeading, toolsHeading);
var webLists = collectListsBetween(webHeading, cliHeading);
var cliLists = collectListsBetween(cliHeading, librariesHeading);
var models = [];
var projects = [];
var webApps = [];
var desktopApps = [];
var mobileApps = [];
var seenModels = {};
var seenProjects = {};
var seenWeb = {};
var seenDesktop = {};
var seenMobile = {};
function collectFromLists(lists, output, seen) {
for (var i = 0; i < lists.length; i += 1) {
var lis = lists[i].querySelectorAll("li");
for (var j = 0; j < lis.length; j += 1) {
dedupePush(output, firstLinkItem(lis[j]), seen);
}
}
}
collectFromLists(modelLists, models, seenModels);
collectFromLists(projectLists, projects, seenProjects);
for (var w = 0; w < webLists.length; w += 1) {
var webLis = webLists[w].querySelectorAll("li");
for (var x = 0; x < webLis.length; x += 1) {
var webItem = firstLinkItem(webLis[x]);
dedupePush(webApps, webItem, seenWeb);
if (webItem && hasDesktopMarker(webItem.raw)) dedupePush(desktopApps, webItem, seenDesktop);
if (webItem && hasMobileMarker(webItem.raw)) dedupePush(mobileApps, webItem, seenMobile);
}
}
for (var c = 0; c < cliLists.length; c += 1) {
var cliLis = cliLists[c].querySelectorAll("li");
for (var d = 0; d < cliLis.length; d += 1) {
dedupePush(desktopApps, firstLinkItem(cliLis[d]), seenDesktop);
}
}
renderCard(grid, "models", "🧠", "Models", models);
renderCard(grid, "projects-services", "🚀", "Projects & Services", projects);
renderCard(grid, "web-applications", "🕸", "Web Applications", webApps);
renderCard(grid, "desktop-cli-applications", "🖥", "Desktop / CLI Applications", desktopApps);
renderCard(grid, "mobile-friendly-applications", "📱", "Mobile-Friendly Applications", mobileApps);
var improve = document.getElementById("improve-link");
if (improve && readmeEditUrl) improve.href = readmeEditUrl;
var links = document.querySelectorAll("a");
for (var n = 0; n < links.length; n += 1) {
var label = normalize(links[n].textContent);
var href = links[n].getAttribute("href") || "";
var isImproveLabel = label.indexOf("improve this page") !== -1;
var pointsToIndex = /\/(blob|edit|tree)\/[^/]+\/index\.(md|html)(?:$|[#?])/i.test(href);
if ((isImproveLabel || pointsToIndex) && readmeEditUrl) {
links[n].href = readmeEditUrl;
} else if (pointsToIndex) {
links[n].href = href.replace(/index\.(md|html)/i, "README.md");
}
}
})();
</script>
</body>
</html>