-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.html
57 lines (57 loc) · 1.35 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Country Flag</title>
<style>
body {
font-family: 'Source Sans Pro', sans-serif;
background-color: #e0e0e0;
}
#country-list {
display: flex;
flex-flow: row wrap;
position: relative;
gap: 10px;
}
.flag {
flex: 0 1 50px;
}
svg {
width: 50px;
}
.svg {
font-size: 50px;
line-height: 0.8;
}
.name {
text-align: center;
font-size: 11px;
font-weight: bold;
font-family: monospace;
color: black;
}
</style>
</head>
<body>
<div id="country-list"></div>
</body>
<script src="main.js"></script>
<script src="country-flag-svg.js"></script>
<script>
let html = ''
const countries = CountryList.getAll()
countries.forEach((country) => {
const flag = CountryFlagSvg[country.code]
if(country.flag) {
html += `<div class="flag">
<div class="svg">${country.flag}</div>
<div class="name">${country.code}</div>
</div>`
}
})
document.getElementById('country-list').innerHTML = html
// document.getElementById('mm').innerHTML = CountryFlagSvg[mm.code]
</script>
</html>