-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (126 loc) · 3.54 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>GridSnek.io</title>
<script src="/socket.io/socket.io.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js"></script>
<script src="scripts/game.js" type="text/javascript"></script>
<style type="text/css">
body{
margin: 0px 0px 0px 0px;
}
html{
background-color: #BAF876;
}
#b{
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
}
#b2{
position: absolute;
top: 60%;
left: 50%;
transform: translate(-50%, -50%);
}
.btn {
margin: 20px auto;
border: none;
padding: 10px 44px;
font-size: 15px;
position: relative;
}
.btn::before {
transition: all 0.85s cubic-bezier(0.68, -0.55, 0.265, 1.55);
content: '';
width: 50%;
height: 100%;
background: black;
position: absolute;
top: 0;
left: 0;
}
.btn .btn-text {
color: white;
mix-blend-mode: difference;
}
.btn:hover::before {
background: black;
width: 100%;
}
.btn.rounded {
border-radius: 50px;
}
.btn.rounded .text-green {
color: #00F0B5;
mix-blend-mode: difference;
}
.btn.rounded::before {
border-radius: 50px;
width: 25%;
background: #00F0B5;
}
.btn.rounded:hover::before {
background: #00F0B5;
width: 100%;
}
@import url('https://fonts.googleapis.com/css?family=Damion|Muli:400,600');
body{
font-family: 'Muli', sans-serif;
background: url("https://www.toptal.com/designers/subtlepatterns/patterns/geometry2.png");
}
h2 {
font-family: 'Damion', cursive;
font-weight: 400;
color: #4caf50;
font-size: 35px;
text-align: center;
position: relative;
}
h2:before {
position: absolute;
content: '';
width: 100%;
left: 0;
top: 22px;
background: #4caf50;
height: 1px;
}
h2 i {
font-style: normal;
background: #fff;
position: relative;
padding: 10px;
}
:focus{outline: none;}
/* necessary to give position: relative to parent. */
input[type="text"]{font: 15px/24px 'Muli', sans-serif; color: #333; width: 100%; box-sizing: border-box; letter-spacing: 1px;}
:focus{outline: none;}
.col-3{float: left; width: 27.33%; margin: 40px 3%; position: relative;} /* necessary to give position: relative to parent. */
input[type="text"]{font: 15px/24px "Lato", Arial, sans-serif; color: #333; width: 100%; box-sizing: border-box; letter-spacing: 1px;}
.effect-1,
.effect-2,
.effect-3{border: 0; padding: 7px 0; border-bottom: 1px solid #ccc;}
.effect-1 ~ .focus-border{position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: #4caf50; transition: 0.4s;}
.effect-1:focus ~ .focus-border{width: 100%; transition: 0.4s;}
.effect-2 ~ .focus-border{position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background-color: #4caf50; transition: 0.4s;}
.effect-2:focus ~ .focus-border{width: 100%; transition: 0.4s; left: 0;}
</style>
</head>
<body>
<div id="b">
<img src="assets/gridsnek.png"><br>
</div>
<div id = "b2">
<span class="col-3">
<input id="name" type="text" class="effect-2" placeholder="Name" size = 60>
<span class="focus-border"></span>
</span>
<br>
<button id="start" class = "btn rounded" onclick="func()"><span class = "text-green"> Start Game</span>
</button>
</div>
</body>
</html>