-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
executable file
·429 lines (379 loc) · 9.57 KB
/
style.css
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
/* Custom fonts */
@font-face {
font-family: 'GameBoy1989'; /*Game Boy Color font */
src: url('src/fonts/game_boy_1989.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'DragonWarrior'; /*Game Boy Color font */
src: url('src/fonts/dragon-warrior-gbc.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/* General style for the body */
body {
font-family: 'Arial', sans-serif;
text-align: center;
margin: 10px;
background-color: #e7e6e2; /* GB white-ish body color */
}
/* Things initially hidden */
#uploadCanvas,
#sliderContainer,
#selectColors,
#outputSection {
display: none;
}
/* Style for "Welcome to YEP" */
h1 {
color: #263196; /* GB blue text color */
font-size: 42px;
font-weight: normal;
font-family: 'GameBoy1989', cursive;
}
/* Container to hold the left and right panels */
.container {
display: flex;
flex-direction: column;
gap: 40px;
width: 100%;
max-width: 1200px;
margin: 0 auto;
}
/* style for both left and right panels */
.left-panel, .right-panel {
background-color: #73738a; /* GB bezel color */
padding: 20px;
border-radius: 25px;
border: 3px solid #72737d; /* GB bezel border color */
flex: 1;
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);
}
/* Hide default File Upload button */
#browseButton {
display: none;
}
/* Buttons */
#file-upload-label,
.slider-container label,
.select-colors,
.preview {
display: inline-block;
background-color: #b30f42; /* GB buttons color */
font-family: 'DragonWarrior', cursive;
font-weight: bold;
color: #e7e6e2;
padding: 10px;
border-radius: 15px;
border: 2px ridge #e7e6e2;
cursor: pointer;
margin: 10px;
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);
transition: background-color 0.2s, transform 0.2s;
}
#file-upload-label:hover {
background-color: #c91252;
transform: scale(1.1);
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.5);
}
#file-upload-label:active {
background-color: #a30b3b;
border: 2px groove #e7e6e2;
transform: scale(1)
}
.left-panel {
position: relative;
}
/* Uploaded image canvas style */
#uploadCanvas {
position: relative;
border-radius: 5px;
margin: 10px auto 20px auto;
image-rendering: pixelated;
border: 1px dashed black;
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);
}
/* Palette container style */
#paletteContainer {
justify-content: center;
margin: 10px;
padding: 10px;
border-radius: 4px;
flex-wrap: wrap;
}
/* Individual color box style */
.color-box {
width: 64px;
height: 64px;
margin: 0 10px;
border-radius: 40px;
position: relative;
overflow: hidden;
transition: border 0.3s;
cursor: pointer;
border: 2px dashed grey;
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);
}
/* Hover effect for color boxes */
.color-box:hover {
border: solid 2px rgba(255, 0, 0, 1);
}
/* Red overlay */
.color-box::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 0, 0, 0.5);
opacity: 0;
transition: opacity 0.3s;
}
/* Red overlay on hover */
.color-box:hover::after {
opacity: 1;
}
/* Output style */
.output-container {
font-family: 'DragonWarrior';
color: #202c0c; /* DMG palette dark color */
background: #9A9E3F; /* GB screen color */
width: 320px;
height: 288px;
padding: 20px;
border-radius: 3px;
border: 2px solid #1E2F19; /* GB screen border */
margin: 30px auto 10px auto; /* top, right, bottom, left */
display: flex;
flex-direction: column;
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);
}
#output-wrapper {
flex-grow: 1;
max-height: 290px;
text-align: center;
overflow: auto;
border: solid 2px #1E2F19;
padding: 10px;
}
#output-text {
flex-grow: 1;
overflow-wrap: anywhere;
font-size: 16px;
line-height: 1.5;
}
.output-footer {
display: flex;
padding-top: 10px;
margin-top: auto;
}
.output-footer span {
text-align : left;
font-size: 12px;
margin-left: 20px;
}
#ClickA {
background-image: url('/YobEasyPalette/assets/buttons/a.png');
background-repeat: no-repeat;
background-size: cover;
width: 55px;
height: 32px;
}
#ClickA:hover {
background-image:url('/YobEasyPalette/assets/buttons/a_pressed.png');
transform: translateY(1px);
cursor: pointer;
}
#ClickB {
background-image: url('/YobEasyPalette/assets/buttons/b.png');
background-repeat: no-repeat;
background-size: cover;
width: 55px;
height: 32px;
}
#ClickB:hover {
background-image:url('/YobEasyPalette/assets/buttons/b_pressed.png');
transform: translateY(1px);
cursor: pointer;
}
/* style for left panel canvas */
.right-panel canvas {
border: 2px solid #9A9E3F; /* GB screen color */
box-shadow: 0 0 0 2px #1E2F19; /* GB screen border 5 color */
border-radius: 2px;
margin: 10px auto;
display: block;
image-rendering: pixelated;
}
.shadow {
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);
}
/* Container for the layers */
.layers-wrapper {
position: relative;
width: 320px;
height: 288px;
margin: 10px auto 40px auto;
}
/* Style for each individual layer */
.layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
image-rendering: pixelated;
object-fit: contain;
}
/* Icon selection style */
#previewIcons {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
position: relative;
}
/* Individual icon style in the preview */
#previewIcons img {
width: 64px; /* Width */
height: 64px; /* Height */
image-rendering: pixelated;
border: 2px solid rgba(154, 158, 63, 1);
border-radius: 50%; /* Circular border */
margin: 5px; /* Margin for spacing between icons */
background-color: #1E2F19;
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.5);
transition: border-color 0.3s; /* Smooth transition for color change */
position: relative; /* This allows children to position absolutely within it */
}
/* Loader (spinning dash) style */
.loader {
width: 80px; /* Match the size of the icon */
height: 80px; /* Match the size of the icon */
position: absolute;
top: -1px;
left: -1px;
border-radius: 50%;
background:
radial-gradient(farthest-side, #B2B649 94%, #0000) top/8px 8px no-repeat,
conic-gradient(#0000 30%, #B2B649);
-webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
animation: l13 1s infinite linear;
display: flex; /* Enable flexbox for centering */
align-items: center; /* Center items vertically */
justify-content: center; /* Center items horizontally */
opacity: 0;
}
/* Show loader only on hover */
.tooltip-container:hover .loader {
opacity: 1; /* Make loader visible */
visibility: visible; /* Make sure it is visible */
}
/* Keyframes for spinning effect */
@keyframes l13 {
100% { transform: rotate(1turn); }
}
/* Hover effect for icons */
#previewIcons img:hover {
border: 2px solid rgba(154, 158, 63, 1); /* Change border color to light green on hover */
cursor: pointer;
}
/* Tooltip container style */
.tooltip-container {
position: relative;
display: inline-block;
}
/* Tooltip style */
.tooltip {
visibility: hidden;
width: 120px;
background-color: rgba(0, 0, 0, 0.8); /* Dark background */
color: #fff; /* Light text */
font-size: 12px;
font-family: 'DragonWarrior';
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1; /* On top of other elements */
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
}
/* Show tooltip on hover */
.tooltip-container:hover .tooltip {
visibility: visible;
opacity: 1;
}
/* Modal style */
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.5); /* Black background with opacity */
}
/* Modal content style */
.modal-content {
background-color: #fefefe; /* Light grey background */
margin: 15% auto;
padding: 20px;
border: 1px solid #888; /* Light grey border */
width: 80%;
max-width: 500px;
border-radius: 5px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
/* Close button style in modal */
.modal-close {
color: #aaa; /* Light grey color */
float: right;
font-size: 28px;
font-weight: bold;
}
/* Hover effect for close button */
.modal-close:hover,
.modal-close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
/* OK button in modal */
#modalOkBtn {
background-color: #ad1035; /* Same bright red as main buttons */
color: white; /* White text color */
padding: 10px 15px;
border: none;
border-radius: 5px;
cursor: pointer;
}
/* Hover effect for OK button */
#modalOkBtn:hover {
background-color: #ff4545; /* Lighter red on hover */
}
/* Responsive style for larger screens */
@media (min-width: 600px) {
.container {
flex-direction: row; /* Arrange children side by side on larger screens */
}
}
/* Responsive style for small screens */
@media (max-width: 600px) {
h1 {
font-size: 36px; /* Smaller size for heading on mobile */
}
.left-panel p {
font-size: 16px; /* Smaller font size for mobile paragraphs */
}
button {
font-size: 14px; /* Smaller font size for buttons on mobile */
padding: 8px 12px; /* Smaller padding for buttons */
}
}