forked from ChromeGaming/PACKABUNCHAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (110 loc) · 3.62 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>PACKABUNCHAS</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🚀</text></svg>">
<style>
.c {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: #FFEA7E;
touch-action: none;
}
.c canvas {
object-fit: contain;
max-height: 100%;
max-width: 100%;
touch-action: none;
}
.content {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to bottom right, #FFEA7E, #FFA500); /* Default background gradient */
overflow: hidden;
position: relative;
}
.content canvas {
width: auto;
height: auto;
max-width: 100%;
max-height: 100%; /* Adjusting to full available height */
touch-action: none;
}
body, html {
margin: 0;
padding: 0;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Gradient selector styles */
.gradient-selector-container {
position: absolute;
top: 10px;
right: 10px;
background-color: rgba(0,0,0,0.4);
padding: 10px;
border-radius: 8px;
display: none;
flex-direction: column;
color: whitesmoke
}
.gradient-selector-container label,
.gradient-selector-container select,
.gradient-selector-container input {
margin: 5px 0;
}
.gradient-button {
position: absolute;
top: 10px;
right: 10px;
padding: 10px;
background-color: transparent;
border: none;
cursor: pointer;
font-size: 24px;
}
.gradient-button:focus {
outline: none;
}
#v{
border-radius: 0px 0px 25px 25px;
}
</style>
</head>
<body>
<div class="content">
<canvas id="v" width="1080" height="1920"></canvas>
<button class="gradient-button" onclick="toggleGradientSelector()">🎨</button>
<div class="gradient-selector-container" id="gradientSelectorContainer">
<label for="color1">Color 1:</label>
<input type="color" id="color1" name="color1" value="#FFEA7E">
<label for="color2">Color 2:</label>
<input type="color" id="color2" name="color2" value="#FFA500">
<label for="direction">Direction:</label>
<select id="direction" name="direction">
<option value="to bottom right">To Bottom Right</option>
<option value="to bottom left">To Bottom Left</option>
<option value="to top right">To Top Right</option>
<option value="to top left">To Top Left</option>
<option value="to bottom">To Bottom</option>
<option value="to top">To Top</option>
<option value="to left">To Left</option>
<option value="to right">To Right</option>
</select>
<button onclick="applyGradient()">Apply Gradient</button>
</div>
</div>
<script src="game.js"></script>
</body>
</html>