-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
86 lines (66 loc) · 1.7 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
---
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>What is FED?</title>
<style>
html,
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
text-align: center;
color: #444;
}
.page {
margin-top: 60px;
}
h1 {
font-size: 20px;
font-weight: normal;
margin: 0 0 20px 0;
}
.output {
font-size: 40px;
margin: 0;
}
.output a {
color: inherit;
text-decoration: none;
}
.github {
margin-top: 120px;
}
.github a {
color: #777;
}
</style>
</head>
<body>
<div class="page">
<h1>What is FED?</h1>
<p class="output"><a href="#" id="what">Front End Developer</a></p>
<p class="github"><a href="https://github.com/thefeds/what-is-fed">Add more meanings on GitHub</a></p>
</div>
<script type="text/javascript">
var meanings = {{ site.data.meanings | jsonify }};
var what = document.getElementById('what');
what.addEventListener('click', function (event) {
event.preventDefault();
changeTheText();
});
function changeTheText () {
what.innerHTML = randomValue(meanings);
}
function randomValue (array) {
return array[randomBetween(0, array.length - 1)];
}
function randomBetween (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
changeTheText();
</script>
</body>
</html>