-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
147 lines (132 loc) · 4.26 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Scrum Poker (lite)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico">
<style>
body {
font-family: Verdana;
margin: 0;
background: floralwhite;
}
a, a:visited {
text-decoration: none;
color: #0E4BD8;
}
.cards {
display: flex;
flex-direction: row;
flex-wrap: wrap;
font-size: 0;
perspective: 200vw;
width: 100vw;
height: 100vh;
padding: 4vh 2vw;
box-sizing: border-box;
place-content: center;
align-items: center;
}
.card {
position: relative;
width: 2em;
height: 3em;
line-height: 3em;
font-size: 6.75vh;
margin: 2vh 4vw;
transform-style: preserve-3d;
transition: transform 0.5s ease-in-out;
}
.card.selected {
font-size: calc(10vh + 20vw);
margin: 0 auto;
}
.card.selected.flipped {
transform: rotateY(180deg);
transition: none;
}
.cards.selected .card:not(.selected) {
display: none !important;
}
.card .front, .card .back {
backface-visibility: hidden;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #0E4BD8;
border-radius: 0.3em;
color: white;
font-family: Verdana;
font-weight: bold;
text-align: center;
text-shadow: 0 0 1px rgba(0, 0, 0, 1), 0 0 3px rgba(0, 0, 0, 0.6);
}
.card .back {
transform: rotateY(180deg);
background-image: url(logo-white.svg);
background-repeat: no-repeat;
background-color: #0E4BD8;
background-position: center center;
background-size: 75%;
}
footer {
color: #888;
text-align: right;
font-size: 8pt;
display: inline-block;
position: absolute;
right: 2vw;
bottom: 1vh;
z-index: 1;
}
.love {
color: red;
}
@media screen and (orientation:landscape) {
.card {
font-size: 6.6666vw;
margin: 4vh 3vw;
}
.card.selected {
font-size: 31vh;
}
}
</style>
</head>
<body>
<div class="cards">
<div class="card"><div class="front">1</div><div class="back"></div></div>
<div class="card"><div class="front">2</div><div class="back"></div></div>
<div class="card"><div class="front">3</div><div class="back"></div></div>
<div class="card"><div class="front">5</div><div class="back"></div></div>
<div class="card"><div class="front">8</div><div class="back"></div></div>
<div class="card"><div class="front">13</div><div class="back"></div></div>
<div class="card"><div class="front">20</div><div class="back"></div></div>
<div class="card"><div class="front">?</div><div class="back"></div></div>
</div>
<footer>Made with <span class="love">❤</span> by <a href="https://fxbits.io/">fxBITS</a></footer>
<script>
const container = document.querySelector('.cards');
document.querySelectorAll('.card').forEach(div => {
div.addEventListener('click', () => {
const cls = div.classList;
if (cls.contains('selected')) {
if (cls.contains('flipped')) {
cls.remove('flipped');
} else {
cls.remove('selected');
container.classList.remove('selected');
}
} else {
cls.add('selected', 'flipped');
container.classList.add('selected');
}
});
});
</script>
</body>
</html>