-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (58 loc) · 2.83 KB
/
index.html
File metadata and controls
70 lines (58 loc) · 2.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>InteraApps Flag Icons</title>
</head>
<body>
<style>
@import url(https://fonts.intera.dev/_/plus+jakarta+sans);
:root {
font-family: 'Plus Jakarta Sans', sans-serif;
--background: #FFF;
--text: #000;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #1E1E1E;
--text: #FFFFFF;
}
}
body {
background: var(--background);
color: var(--text);
font-family: 'Plus Jakarta Sans', sans-serif;
}
</style>
<div id="app"></div>
<script type="module">
import { html, appendTo, state, computed } from 'https://cdn.skypack.dev/pulsjs@1.0.13-prealpha'
const search = state('')
async function Flags() {
const flags = await fetch('/lib/flags.json').then(r => r.json());
return computed(() => flags.map(flag => html`
<a :if=${flag.name.toLowerCase().includes(search.value.toLowerCase()) || flag.code.toLowerCase().includes(search.value.toLowerCase())} href=${flag.src} target="_BLANK" download=${flag.code+'.svg'} style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 160px; text-decoration: none; color: inherit;">
<img src=${flag.src} style="width: 60px; border-radius: 100px; border: 2px solid #DDD;" alt=${flag.name} />
<p style="text-align: center; display: flex; flex-direction: column; gap: 0.2rem;">
<span style="opacity: 0.6">${flag.code}.svg</span>
<span>${flag.name}</span>
</p>
</a>
`), [search])
}
appendTo(document.getElementById('app'), html`
<div class="container" style="display: flex; flex-direction: column; align-items: center; gap: 2rem; padding: 2rem; max-width: 1600px; margin: auto;">
<h1 style="text-align: center; margin-bottom: 4rem">InteraApps Flag Icons</h1>
<input type="text" placeholder="Search..." :bind=${search} style="width: 300px; padding: 0.5rem; border-radius: 4px; border: 1px solid #DDD; font-size: 14px" />
<div style="display: flex; flex-wrap: wrap; gap: 1rem; width: 100%; justify-content: center; margin-bottom: 4rem;">
<img src="/BANNER.svg" style="width: 400px;">
</div>
<div style="display: flex; flex-wrap: wrap; gap: 1rem; width: 100%; justify-content: center;">
<${Flags} />
</div>
</div>
`);
</script>
</body>
</html>