-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstyle.css
More file actions
336 lines (299 loc) · 7.89 KB
/
style.css
File metadata and controls
336 lines (299 loc) · 7.89 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
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
:root {
--primary-color: #007AFF;
/* iOS Blue */
--primary-hover: #0056b3;
--background-color: #f2f2f7;
/* iOS System Gray 6 */
--card-bg: #ffffff;
--text-color: #1c1c1e;
--text-muted: #8e8e93;
--border-color: #d1d1d6;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 24px;
--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body {
font-family: var(--font-family);
max-width: 1000px;
margin: 0 auto;
padding: 20px;
background-color: var(--background-color);
color: var(--text-color);
line-height: 1.5;
padding-bottom: 120px;
/* Space for sticky footer */
}
h1 {
text-align: center;
margin-bottom: 2rem;
font-weight: 700;
}
p {
text-align: center;
margin-bottom: 1rem;
color: var(--text-muted);
}
/* Drop Zone */
#dropZone {
border: 2px dashed #aeaeb2;
border-radius: var(--radius-xl);
width: 100%;
height: 180px;
display: flex;
justify-content: center;
align-items: center;
margin: 20px 0 40px 0;
background-color: var(--card-bg);
transition: all 0.3s ease;
cursor: pointer;
font-weight: 600;
color: #8e8e93;
font-size: 1.1rem;
}
#dropZone:hover {
border-color: var(--primary-color);
background-color: #e4eaff;
color: var(--primary-color);
}
/* Options Panel */
.options-container {
background: var(--card-bg);
padding: 24px;
border-radius: var(--radius-lg);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
margin-bottom: 30px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 16px;
}
.checkbox-container {
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
user-select: none;
}
.checkbox-container input[type="checkbox"] {
accent-color: var(--primary-color);
width: 20px;
height: 20px;
cursor: pointer;
}
.checkbox-container label {
cursor: pointer;
font-size: 0.95rem;
color: var(--text-color);
}
/* Gallery / Grid Layout (iPhone Style) */
#pngGridControls {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding: 0 10px;
}
#pngGrid {
display: grid;
/* Use CSS variable for efficient resizing without DOM reconstruction */
--grid-item-size: 130px;
/* Default matches approx 30% scale */
grid-template-columns: repeat(auto-fill, minmax(var(--grid-item-size), 1fr));
gap: 1px;
/* Tighter, more precise gap like native iOS Photos */
margin-bottom: 40px;
background-color: var(--card-bg);
/* Ensure contrast */
padding: 1px;
/* Optional border-like effect */
border-radius: var(--radius-sm);
}
.png-node {
position: relative;
background-color: #fff;
aspect-ratio: 1 / 1;
/* Perfect square */
overflow: hidden;
cursor: pointer;
transition: transform 0.2s;
}
.png-node img {
width: 100%;
height: 100%;
object-fit: cover;
/* Fill the square */
transition: opacity 0.2s;
}
.png-node.checkerboard-bg img {
/* If checkerboard is desired, we might want 'contain' to see transparency?
But 'iPhone style' implies 'cover'. User asked for checkerboard previously.
Let's stick to cover for aesthetics, but maybe add a toggle for 'fit' if needed later.
For now, object-fit: cover is the most "Library" look.
*/
background-image: linear-gradient(45deg, #e5e5ea 25%, transparent 25%),
linear-gradient(-45deg, #e5e5ea 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #e5e5ea 75%),
linear-gradient(-45deg, transparent 75%, #e5e5ea 75%);
background-size: 8px 8px;
background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}
/* Selection State */
.png-node.selected img {
opacity: 0.8;
}
.png-node.selected::after {
content: '';
position: absolute;
inset: 0;
border: 3px solid var(--primary-color);
box-sizing: border-box;
z-index: 2;
}
/* Selection Checkmark Overlay */
.selection-indicator {
position: absolute;
bottom: 6px;
right: 6px;
width: 22px;
height: 22px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.8);
background-color: rgba(0, 0, 0, 0.1);
z-index: 3;
transition: all 0.2s ease;
pointer-events: none;
/* Clicking the cell triggers it */
}
.png-node.selected .selection-indicator {
background-color: var(--primary-color);
border-color: var(--primary-color);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.png-node.selected .selection-indicator::before {
content: '✓';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 12px;
font-weight: bold;
}
/* Hide labels in grid view to act like iPhone library */
.png-node-label {
display: none;
}
/* File Size Badge - Make it subtle or hide in gallery view?
Let's keep it very minimal or maybe hide it for the clean look.
User asked for "iPhone library" look which has NO text overlays usually.
I'll hide it by default in this mode, or maybe show on hover.
*/
.png-node-size {
display: none;
}
/* List View (for non-image files) */
.category h3 {
margin-top: 30px;
font-size: 1.2rem;
color: var(--text-color);
border-bottom: 1px solid var(--border-color);
padding-bottom: 10px;
margin-bottom: 15px;
display: flex;
align-items: center;
justify-content: space-between;
}
#fileList ul {
list-style: none;
padding: 0;
}
#fileList li {
background: var(--card-bg);
border-bottom: 1px solid var(--border-color);
padding: 12px 16px;
display: flex;
align-items: center;
}
#fileList li:first-child {
border-top-left-radius: var(--radius-md);
border-top-right-radius: var(--radius-md);
}
#fileList li:last-child {
border-bottom-left-radius: var(--radius-md);
border-bottom-right-radius: var(--radius-md);
border-bottom: none;
}
.file-checkbox {
margin-right: 15px;
width: 20px;
height: 20px;
accent-color: var(--primary-color);
}
#fileList li a {
color: var(--text-color);
text-decoration: none;
flex-grow: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Buttons */
button {
background-color: #e5e5ea;
color: var(--primary-color);
border: none;
padding: 8px 16px;
border-radius: 18px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
button:hover {
background-color: #d1d1d6;
}
.download-all button {
background-color: var(--primary-color);
color: white;
padding: 12px 24px;
font-size: 1.1rem;
}
.download-all button:hover {
background-color: var(--primary-hover);
}
/* Sticky Selection Bar */
#selectionBar {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%) translateY(150%);
background-color: rgba(28, 28, 30, 0.9);
/* Dark translucent */
backdrop-filter: blur(10px);
color: white;
padding: 16px 32px;
border-radius: 40px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
gap: 20px;
z-index: 2000;
transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
width: fit-content;
min-width: 320px;
justify-content: space-between;
}
#selectionBar.visible {
transform: translateX(-50%) translateY(0);
}
#selectionCount {
font-weight: 600;
}
#downloadSelectedBtn {
background-color: var(--primary-color);
color: white;
}
#clearSelectionBtn {
background: rgba(255, 255, 255, 0.2);
color: white;
}