-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
116 lines (101 loc) · 2.73 KB
/
Copy pathindex.html
File metadata and controls
116 lines (101 loc) · 2.73 KB
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
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>g1</title>
<!-- <link rel="stylesheet" href="css/main.css"> -->
<style>
/* Reset */
* {
box-sizing: border-box;
}
body {
position: relative;
min-height: 100vh;
margin: 0;
overflow: hidden;
}
/* GameBrah */
#gameContainer {
display: flex;
margin: 0;
padding: 0;
user-select: none;
}
#playArea {
background-color: yellow;
z-index: 2;
}
#dpadArea {
background-color: orange;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
z-index: 1;
padding-bottom: 15px;
}
#buttonArea {
background-color: orange;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
z-index: 1;
padding-bottom: 15px;
}
@media only screen and (orientation: portrait) {
#gameContainer {
flex-wrap: wrap;
}
#playArea {
width: 100vw;
height: 100vw;
}
#dpadArea {
width: 50%;
height: calc(100vh - 100vw);
order: 2;
}
#buttonArea {
width: 50%;
height: calc(100vh - 100vw);
order: 3;
}
}
@media only screen and (orientation: landscape) {
#playArea {
height: 100vh;
width: 100vh;
order: 2;
}
#dpadArea {
height: 100vh;
width: calc((100% - 100vh) / 2);
order: 1;
}
#buttonArea {
height: 100vh;
width: calc((100% - 100vh) / 2);
order: 3;
}
}
</style>
</head>
<body>
<main id="gameContainer">
<section id="playArea"></section>
<section id="dpadArea">GameBrah(R)</section>
<section id="buttonArea">
<div id="FSbuttons">
<button onclick="openFullScreen();">Full Screen</button>
<button onclick="closeFullScreen();">Exit FS</button>
</div>
</section>
</main>
<script src="index.js"></script>
</body>
</html>