-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (81 loc) · 2.64 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
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
<html>
<head>
<script src="js/global.js"></script>
<style>
#options {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
#options a {
text-decoration: none;
color: black;
}
.option {
border: solid 2px black;
border-radius: 1em;
width: 20em;
height: 6em;
margin: 1em;
background-color: darkgray;
display: flex;
flex-direction: row;
justify-content: center;
}
.option-icon {
display: flex;
align-items: center;
justify-content: center;
}
.option-icon > div {
padding: 1em;
}
.option-title {
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5em;
margin-bottom: 0.5em;
}
</style>
</head>
<body>
<script>
const apps = [
{ name: 'Skip Counting', link: 'skip-counting.html', icon: 'solid-hashtag' },
{ name: 'Greater Than<br>Less Than', link: 'greater-than-less-than.html', icon: 'solid-less-than' },
{ name: 'State Capitals', link: 'state-capitals.html', icon: 'solid-star' },
{ name: 'Addition<br>Flash Cards', link: 'addition-flash-cards.html', icon: 'solid-plus' },
{ name: 'Subtraction<br>Flash Cards', link: 'subtraction-flash-cards.html', icon: 'solid-minus' },
{ name: 'Multiplication<br>Flash Cards', link: 'multiplication-flash-cards.html', icon: 'solid-times' },
{ name: 'Addition Game', link: 'addition-game.html', icon: 'solid-plus' },
{ name: 'Subtraction Game', link: 'subtraction-game.html', icon: 'solid-minus' },
{ name: 'Multiplication Game', link: 'multiplication-game.html', icon: 'solid-times' },
];
window.addEventListener('load', () => {
const options = document.getElementById('options');
apps.forEach(({ name, link, icon}) => {
const iconHolder = document.createElement('div');
iconHolder.classList.add(icon, 'icon-3');
const optionIcon = document.createElement('div');
optionIcon.classList.add('option-icon');
optionIcon.appendChild(iconHolder);
const optionTitle = document.createElement('div');
optionTitle.classList.add('option-title');
optionTitle.innerHTML = name;
const option = document.createElement('div');
option.classList.add('option');
option.appendChild(optionIcon);
option.appendChild(optionTitle);
const a = document.createElement('a');
a.href = link;
a.appendChild(option);
options.appendChild(a);
});
});
</script>
<div id="options"></div>
</body>
</html>