-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
123 lines (100 loc) · 2.85 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Namensfinder</title>
<style type="text/css">
body {
background: rgb(80, 80, 80);
}
.name {
transition: all 10s linear;
font-family: Calibri;
font-size: 75px;
font-weight: bold;
color: rgb(255, 255, 255);
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
/* non- selectable */
-webkit-user-select: none;
/* Chrome all / Safari all */
-moz-user-select: none;
/* Firefox all */
-ms-user-select: none;
/* IE 10+ */
user-select: none;
/* Likely future */
/* non- selectable */
}
/*
.next-name-button:hover {
background-color: rgb(180, 100, 145);
}
*/
.next-name-button:active {
background-color: rgb(180, 100, 145);
}
body,
html {
margin: 0;
padding: 0;
}
.center-vh {
height: 100vh;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.next-name-button {
background-color: #ffff3f;
padding: 12px;
text-align: center;
width: 100%;
/* non- selectable */
-webkit-user-select: none;
/* Chrome all / Safari all */
-moz-user-select: none;
/* Firefox all */
-ms-user-select: none;
/* IE 10+ */
user-select: none;
/* Likely future */
/* non- selectable */
transition: all 1s;
}
</style>
</head>
<body>
<section class="center-vh">
<div class="name">Horst</div>
<div class="next-name-button">NÄCHSTE</div>
</section>
<!--
<h2>Weiterentwicklung Ideen</h2>
<ul>
<li>Trennung nach Geschlecht</li>
<li>Optimierung für Smartphones</li>
<li>„Hübsche” Anzeige: Name, Häufigkeit</li>
<li>Charts: Beliebteste Namen</li>
<li>Swipen</li>
<li>Gefällt mir / Gefällt mir nicht</li>
<li>Seltenste Namen</li>
<li>Regionale Unterschiede</li>
<li>namen filtern</li>
</ul>
-->
<script>
var nameList = ["Hubert", "Horst", "Paul", "Bernd", "Albrecht"];
document.querySelector('.next-name-button').addEventListener('click', function() {
var nameIndex = Math.round(Math.random() * 4);
var name = nameList[nameIndex];
document.querySelector('.name').innerHTML = name;
});
</script>
</body>
</html>