Add 3 files
Browse files- README.md +7 -5
- index.html +467 -19
- prompts.txt +0 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: naildesign-size-guide-2
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: red
|
5 |
+
colorTo: yellow
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,467 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Press-On Nail Size Guide</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
@keyframes float {
|
11 |
+
0%, 100% {
|
12 |
+
transform: translateY(0);
|
13 |
+
}
|
14 |
+
50% {
|
15 |
+
transform: translateY(-10px);
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
@keyframes pulse {
|
20 |
+
0%, 100% {
|
21 |
+
transform: scale(1);
|
22 |
+
}
|
23 |
+
50% {
|
24 |
+
transform: scale(1.05);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
.nail-shadow {
|
29 |
+
box-shadow: 0 10px 20px rgba(0,0,0,0.1),
|
30 |
+
inset 0 -5px 10px rgba(0,0,0,0.1),
|
31 |
+
inset 0 5px 10px rgba(255,255,255,0.5);
|
32 |
+
}
|
33 |
+
|
34 |
+
.skeuomorphic-btn {
|
35 |
+
background: linear-gradient(145deg, #ff9a9e, #fad0c4);
|
36 |
+
box-shadow: 5px 5px 15px rgba(0,0,0,0.1),
|
37 |
+
-5px -5px 15px rgba(255,255,255,0.5),
|
38 |
+
inset 2px 2px 5px rgba(255,255,255,0.3),
|
39 |
+
inset -2px -2px 5px rgba(0,0,0,0.1);
|
40 |
+
transition: all 0.3s ease;
|
41 |
+
}
|
42 |
+
|
43 |
+
.skeuomorphic-btn:hover {
|
44 |
+
transform: translateY(-2px);
|
45 |
+
box-shadow: 7px 7px 20px rgba(0,0,0,0.15),
|
46 |
+
-7px -7px 20px rgba(255,255,255,0.6);
|
47 |
+
}
|
48 |
+
|
49 |
+
.skeuomorphic-btn:active {
|
50 |
+
transform: translateY(1px);
|
51 |
+
box-shadow: inset 3px 3px 7px rgba(0,0,0,0.2),
|
52 |
+
inset -3px -3px 7px rgba(255,255,255,0.3);
|
53 |
+
}
|
54 |
+
|
55 |
+
.skeuomorphic-card {
|
56 |
+
background: linear-gradient(145deg, #fff5f5, #ffecec);
|
57 |
+
box-shadow: 10px 10px 30px rgba(0,0,0,0.1),
|
58 |
+
-10px -10px 30px rgba(255,255,255,0.5);
|
59 |
+
border-radius: 20px;
|
60 |
+
}
|
61 |
+
|
62 |
+
.nail-tip {
|
63 |
+
position: relative;
|
64 |
+
overflow: hidden;
|
65 |
+
}
|
66 |
+
|
67 |
+
.nail-tip::after {
|
68 |
+
content: '';
|
69 |
+
position: absolute;
|
70 |
+
top: 0;
|
71 |
+
left: 0;
|
72 |
+
right: 0;
|
73 |
+
height: 30%;
|
74 |
+
background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0));
|
75 |
+
border-radius: 50% 50% 0 0 / 30% 30% 0 0;
|
76 |
+
}
|
77 |
+
|
78 |
+
.hand-animation {
|
79 |
+
animation: float 3s ease-in-out infinite;
|
80 |
+
}
|
81 |
+
|
82 |
+
.size-option:hover {
|
83 |
+
animation: pulse 0.5s ease;
|
84 |
+
}
|
85 |
+
</style>
|
86 |
+
</head>
|
87 |
+
<body class="bg-pink-50 min-h-screen font-sans">
|
88 |
+
<div class="container mx-auto px-4 py-8">
|
89 |
+
<!-- Header -->
|
90 |
+
<header class="text-center mb-12">
|
91 |
+
<h1 class="text-4xl md:text-5xl font-bold text-pink-800 mb-4">Nail Size Guide</h1>
|
92 |
+
<p class="text-lg text-pink-600 max-w-2xl mx-auto">Find your perfect fit with our interactive size guide</p>
|
93 |
+
</header>
|
94 |
+
|
95 |
+
<!-- Main Content -->
|
96 |
+
<div class="flex flex-col lg:flex-row gap-8 items-center justify-center">
|
97 |
+
<!-- Hand Illustration -->
|
98 |
+
<div class="relative w-full lg:w-1/2 max-w-lg hand-animation">
|
99 |
+
<div class="relative">
|
100 |
+
<!-- Hand base -->
|
101 |
+
<div class="absolute w-full h-full">
|
102 |
+
<svg viewBox="0 0 300 400" xmlns="http://www.w3.org/2000/svg">
|
103 |
+
<path d="M150,50 Q180,100 180,150 Q180,250 150,350 Q120,250 120,150 Q120,100 150,50"
|
104 |
+
fill="#FFD1DC" stroke="#FF9EB5" stroke-width="2"/>
|
105 |
+
</svg>
|
106 |
+
</div>
|
107 |
+
|
108 |
+
<!-- Nails - will be updated with JS -->
|
109 |
+
<div class="absolute w-full h-full" id="nailContainer">
|
110 |
+
<!-- Nails will be inserted here by JavaScript -->
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
|
114 |
+
<div class="mt-8 text-center">
|
115 |
+
<button id="measureBtn" class="skeuomorphic-btn text-pink-800 font-semibold py-3 px-6 rounded-full text-lg">
|
116 |
+
<i class="fas fa-ruler-combined mr-2"></i> Measure My Nails
|
117 |
+
</button>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<!-- Size Guide -->
|
122 |
+
<div class="w-full lg:w-1/2">
|
123 |
+
<div class="skeuomorphic-card p-6 md:p-8">
|
124 |
+
<h2 class="text-2xl font-bold text-pink-800 mb-6">How to Find Your Size</h2>
|
125 |
+
|
126 |
+
<div class="space-y-6">
|
127 |
+
<div class="flex items-start">
|
128 |
+
<div class="bg-pink-100 text-pink-800 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-4 mt-1">
|
129 |
+
<span class="font-bold">1</span>
|
130 |
+
</div>
|
131 |
+
<div>
|
132 |
+
<h3 class="font-semibold text-pink-700 mb-1">Print Our Size Guide</h3>
|
133 |
+
<p class="text-pink-600">Download and print our sizing chart at 100% scale to match your nails.</p>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<div class="flex items-start">
|
138 |
+
<div class="bg-pink-100 text-pink-800 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-4 mt-1">
|
139 |
+
<span class="font-bold">2</span>
|
140 |
+
</div>
|
141 |
+
<div>
|
142 |
+
<h3 class="font-semibold text-pink-700 mb-1">Match Your Nails</h3>
|
143 |
+
<p class="text-pink-600">Place each press-on over your natural nail to find the best fit.</p>
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
|
147 |
+
<div class="flex items-start">
|
148 |
+
<div class="bg-pink-100 text-pink-800 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-4 mt-1">
|
149 |
+
<span class="font-bold">3</span>
|
150 |
+
</div>
|
151 |
+
<div>
|
152 |
+
<h3 class="font-semibold text-pink-700 mb-1">Note Your Sizes</h3>
|
153 |
+
<p class="text-pink-600">Each finger may need a different size for the perfect fit.</p>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
|
158 |
+
<div class="mt-8">
|
159 |
+
<h3 class="font-semibold text-pink-700 mb-4">Select a finger to see size options:</h3>
|
160 |
+
|
161 |
+
<div class="grid grid-cols-5 gap-2 mb-6">
|
162 |
+
<button class="size-option finger-btn bg-pink-100 hover:bg-pink-200 text-pink-800 py-2 rounded-lg transition-all" data-finger="thumb">
|
163 |
+
Thumb
|
164 |
+
</button>
|
165 |
+
<button class="size-option finger-btn bg-pink-100 hover:bg-pink-200 text-pink-800 py-2 rounded-lg transition-all" data-finger="index">
|
166 |
+
Index
|
167 |
+
</button>
|
168 |
+
<button class="size-option finger-btn bg-pink-100 hover:bg-pink-200 text-pink-800 py-2 rounded-lg transition-all" data-finger="middle">
|
169 |
+
Middle
|
170 |
+
</button>
|
171 |
+
<button class="size-option finger-btn bg-pink-100 hover:bg-pink-200 text-pink-800 py-2 rounded-lg transition-all" data-finger="ring">
|
172 |
+
Ring
|
173 |
+
</button>
|
174 |
+
<button class="size-option finger-btn bg-pink-100 hover:bg-pink-200 text-pink-800 py-2 rounded-lg transition-all" data-finger="pinky">
|
175 |
+
Pinky
|
176 |
+
</button>
|
177 |
+
</div>
|
178 |
+
|
179 |
+
<div id="sizeOptions" class="hidden">
|
180 |
+
<h4 class="font-medium text-pink-700 mb-3">Available sizes for <span id="currentFinger" class="font-bold">thumb</span>:</h4>
|
181 |
+
<div class="grid grid-cols-3 gap-3" id="sizeButtons">
|
182 |
+
<!-- Size buttons will be inserted here by JavaScript -->
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
|
188 |
+
<div class="skeuomorphic-card p-6 md:p-8 mt-6">
|
189 |
+
<h2 class="text-2xl font-bold text-pink-800 mb-4">Your Selected Sizes</h2>
|
190 |
+
<div id="selectedSizes" class="bg-pink-50 rounded-lg p-4 min-h-20">
|
191 |
+
<p class="text-pink-500 italic" id="noSelectionText">No sizes selected yet. Click on fingers above to choose sizes.</p>
|
192 |
+
<div id="sizeList" class="hidden grid grid-cols-5 gap-2">
|
193 |
+
<!-- Selected sizes will be inserted here by JavaScript -->
|
194 |
+
</div>
|
195 |
+
</div>
|
196 |
+
|
197 |
+
<button id="saveBtn" class="skeuomorphic-btn text-pink-800 font-semibold py-3 px-6 rounded-full text-lg w-full mt-6">
|
198 |
+
<i class="fas fa-save mr-2"></i> Save My Size Preferences
|
199 |
+
</button>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
<!-- Size Guide Modal -->
|
206 |
+
<div id="sizeGuideModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
207 |
+
<div class="skeuomorphic-card p-6 max-w-2xl mx-4 max-h-[90vh] overflow-y-auto">
|
208 |
+
<div class="flex justify-between items-center mb-4">
|
209 |
+
<h3 class="text-xl font-bold text-pink-800">How to Measure Your Nails</h3>
|
210 |
+
<button id="closeModal" class="text-pink-600 hover:text-pink-800">
|
211 |
+
<i class="fas fa-times text-2xl"></i>
|
212 |
+
</button>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
<div class="space-y-4 text-pink-700">
|
216 |
+
<div class="flex items-start">
|
217 |
+
<div class="bg-pink-100 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-4">
|
218 |
+
<i class="fas fa-print text-pink-600"></i>
|
219 |
+
</div>
|
220 |
+
<div>
|
221 |
+
<h4 class="font-semibold">Print the Size Guide</h4>
|
222 |
+
<p>Make sure to print at 100% scale (no scaling). Check the ruler on the page matches a real ruler.</p>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
|
226 |
+
<div class="flex items-start">
|
227 |
+
<div class="bg-pink-100 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-4">
|
228 |
+
<i class="fas fa-hand-paper text-pink-600"></i>
|
229 |
+
</div>
|
230 |
+
<div>
|
231 |
+
<h4 class="font-semibold">Prepare Your Nails</h4>
|
232 |
+
<p>Push back your cuticles and file your nails to your desired shape before measuring.</p>
|
233 |
+
</div>
|
234 |
+
</div>
|
235 |
+
|
236 |
+
<div class="flex items-start">
|
237 |
+
<div class="bg-pink-100 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-4">
|
238 |
+
<i class="fas fa-ruler-horizontal text-pink-600"></i>
|
239 |
+
</div>
|
240 |
+
<div>
|
241 |
+
<h4 class="font-semibold">Measure Width</h4>
|
242 |
+
<p>Measure across the widest part of your natural nail (usually near the cuticle).</p>
|
243 |
+
</div>
|
244 |
+
</div>
|
245 |
+
|
246 |
+
<div class="flex items-start">
|
247 |
+
<div class="bg-pink-100 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-4">
|
248 |
+
<i class="fas fa-arrows-alt-v text-pink-600"></i>
|
249 |
+
</div>
|
250 |
+
<div>
|
251 |
+
<h4 class="font-semibold">Compare Sizes</h4>
|
252 |
+
<p>Match your measurement to our size chart. If between sizes, go with the larger size.</p>
|
253 |
+
</div>
|
254 |
+
</div>
|
255 |
+
</div>
|
256 |
+
|
257 |
+
<div class="mt-6">
|
258 |
+
<button class="skeuomorphic-btn text-pink-800 font-semibold py-2 px-6 rounded-full">
|
259 |
+
<i class="fas fa-download mr-2"></i> Download Size Guide PDF
|
260 |
+
</button>
|
261 |
+
</div>
|
262 |
+
</div>
|
263 |
+
</div>
|
264 |
+
|
265 |
+
<script>
|
266 |
+
document.addEventListener('DOMContentLoaded', function() {
|
267 |
+
// Nail data
|
268 |
+
const nailData = {
|
269 |
+
thumb: { sizes: ['XL', 'L', 'M'], position: { x: 50, y: 50 } },
|
270 |
+
index: { sizes: ['L', 'M', 'S'], position: { x: 120, y: 80 } },
|
271 |
+
middle: { sizes: ['L', 'M', 'S'], position: { x: 180, y: 100 } },
|
272 |
+
ring: { sizes: ['M', 'S', 'XS'], position: { x: 220, y: 120 } },
|
273 |
+
pinky: { sizes: ['S', 'XS', 'XXS'], position: { x: 260, y: 140 } }
|
274 |
+
};
|
275 |
+
|
276 |
+
// Current selections
|
277 |
+
let selectedSizes = {
|
278 |
+
thumb: null,
|
279 |
+
index: null,
|
280 |
+
middle: null,
|
281 |
+
ring: null,
|
282 |
+
pinky: null
|
283 |
+
};
|
284 |
+
|
285 |
+
// Current selected finger
|
286 |
+
let currentFinger = null;
|
287 |
+
|
288 |
+
// Create nail SVGs on the hand
|
289 |
+
const nailContainer = document.getElementById('nailContainer');
|
290 |
+
Object.keys(nailData).forEach(finger => {
|
291 |
+
const nail = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
292 |
+
nail.setAttribute('viewBox', '0 0 300 400');
|
293 |
+
nail.setAttribute('class', 'absolute transition-all duration-300');
|
294 |
+
nail.setAttribute('style', `left: ${nailData[finger].position.x}px; top: ${nailData[finger].position.y}px; width: 40px;`);
|
295 |
+
nail.setAttribute('data-finger', finger);
|
296 |
+
|
297 |
+
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
298 |
+
path.setAttribute('d', 'M10,0 Q15,5 20,0 Q25,15 20,30 Q15,35 10,30 Q5,15 10,0');
|
299 |
+
path.setAttribute('fill', 'rgba(255, 192, 203, 0.5)');
|
300 |
+
path.setAttribute('stroke', 'rgba(255, 105, 180, 0.7)');
|
301 |
+
path.setAttribute('stroke-width', '1');
|
302 |
+
path.setAttribute('class', 'transition-all duration-300');
|
303 |
+
path.setAttribute('data-finger', finger);
|
304 |
+
|
305 |
+
nail.appendChild(path);
|
306 |
+
nailContainer.appendChild(nail);
|
307 |
+
|
308 |
+
// Add hover effect
|
309 |
+
nail.addEventListener('mouseenter', () => {
|
310 |
+
path.setAttribute('fill', 'rgba(255, 182, 193, 0.7)');
|
311 |
+
});
|
312 |
+
|
313 |
+
nail.addEventListener('mouseleave', () => {
|
314 |
+
if (selectedSizes[finger]) {
|
315 |
+
path.setAttribute('fill', 'rgba(255, 105, 180, 0.8)');
|
316 |
+
} else {
|
317 |
+
path.setAttribute('fill', 'rgba(255, 192, 203, 0.5)');
|
318 |
+
}
|
319 |
+
});
|
320 |
+
|
321 |
+
// Click to select finger
|
322 |
+
nail.addEventListener('click', () => {
|
323 |
+
selectFinger(finger);
|
324 |
+
});
|
325 |
+
});
|
326 |
+
|
327 |
+
// Finger buttons
|
328 |
+
const fingerButtons = document.querySelectorAll('.finger-btn');
|
329 |
+
fingerButtons.forEach(button => {
|
330 |
+
button.addEventListener('click', () => {
|
331 |
+
const finger = button.getAttribute('data-finger');
|
332 |
+
selectFinger(finger);
|
333 |
+
});
|
334 |
+
});
|
335 |
+
|
336 |
+
// Select a finger
|
337 |
+
function selectFinger(finger) {
|
338 |
+
currentFinger = finger;
|
339 |
+
|
340 |
+
// Update UI
|
341 |
+
fingerButtons.forEach(btn => {
|
342 |
+
if (btn.getAttribute('data-finger') === finger) {
|
343 |
+
btn.classList.add('bg-pink-300', 'text-pink-900');
|
344 |
+
btn.classList.remove('bg-pink-100');
|
345 |
+
} else {
|
346 |
+
btn.classList.add('bg-pink-100');
|
347 |
+
btn.classList.remove('bg-pink-300', 'text-pink-900');
|
348 |
+
}
|
349 |
+
});
|
350 |
+
|
351 |
+
// Show size options
|
352 |
+
document.getElementById('sizeOptions').classList.remove('hidden');
|
353 |
+
document.getElementById('currentFinger').textContent = finger;
|
354 |
+
|
355 |
+
// Create size buttons
|
356 |
+
const sizeButtonsContainer = document.getElementById('sizeButtons');
|
357 |
+
sizeButtonsContainer.innerHTML = '';
|
358 |
+
|
359 |
+
nailData[finger].sizes.forEach(size => {
|
360 |
+
const button = document.createElement('button');
|
361 |
+
button.className = `size-option bg-pink-100 hover:bg-pink-200 text-pink-800 py-2 rounded-lg transition-all ${selectedSizes[finger] === size ? 'bg-pink-300 font-bold' : ''}`;
|
362 |
+
button.textContent = size;
|
363 |
+
button.addEventListener('click', () => {
|
364 |
+
selectSize(finger, size);
|
365 |
+
});
|
366 |
+
sizeButtonsContainer.appendChild(button);
|
367 |
+
});
|
368 |
+
}
|
369 |
+
|
370 |
+
// Select a size for current finger
|
371 |
+
function selectSize(finger, size) {
|
372 |
+
selectedSizes[finger] = size;
|
373 |
+
|
374 |
+
// Update the nail color
|
375 |
+
const nails = document.querySelectorAll(`[data-finger="${finger}"] path`);
|
376 |
+
nails.forEach(nail => {
|
377 |
+
nail.setAttribute('fill', 'rgba(255, 105, 180, 0.8)');
|
378 |
+
});
|
379 |
+
|
380 |
+
// Update size buttons
|
381 |
+
const sizeButtons = document.querySelectorAll(`#sizeButtons button`);
|
382 |
+
sizeButtons.forEach(button => {
|
383 |
+
if (button.textContent === size) {
|
384 |
+
button.classList.add('bg-pink-300', 'font-bold');
|
385 |
+
} else {
|
386 |
+
button.classList.remove('bg-pink-300', 'font-bold');
|
387 |
+
}
|
388 |
+
});
|
389 |
+
|
390 |
+
// Update selected sizes display
|
391 |
+
updateSelectedSizesDisplay();
|
392 |
+
}
|
393 |
+
|
394 |
+
// Update the selected sizes display
|
395 |
+
function updateSelectedSizesDisplay() {
|
396 |
+
const sizeList = document.getElementById('sizeList');
|
397 |
+
const noSelectionText = document.getElementById('noSelectionText');
|
398 |
+
|
399 |
+
let hasSelection = false;
|
400 |
+
for (const finger in selectedSizes) {
|
401 |
+
if (selectedSizes[finger]) {
|
402 |
+
hasSelection = true;
|
403 |
+
break;
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
if (hasSelection) {
|
408 |
+
noSelectionText.classList.add('hidden');
|
409 |
+
sizeList.classList.remove('hidden');
|
410 |
+
|
411 |
+
sizeList.innerHTML = '';
|
412 |
+
|
413 |
+
Object.keys(selectedSizes).forEach(finger => {
|
414 |
+
const div = document.createElement('div');
|
415 |
+
div.className = 'text-center';
|
416 |
+
|
417 |
+
const p1 = document.createElement('p');
|
418 |
+
p1.className = 'text-sm font-semibold text-pink-700 capitalize';
|
419 |
+
p1.textContent = finger;
|
420 |
+
|
421 |
+
const p2 = document.createElement('p');
|
422 |
+
p2.className = 'text-lg font-bold text-pink-800';
|
423 |
+
p2.textContent = selectedSizes[finger] || '-';
|
424 |
+
|
425 |
+
div.appendChild(p1);
|
426 |
+
div.appendChild(p2);
|
427 |
+
sizeList.appendChild(div);
|
428 |
+
});
|
429 |
+
} else {
|
430 |
+
noSelectionText.classList.remove('hidden');
|
431 |
+
sizeList.classList.add('hidden');
|
432 |
+
}
|
433 |
+
}
|
434 |
+
|
435 |
+
// Measure button
|
436 |
+
document.getElementById('measureBtn').addEventListener('click', () => {
|
437 |
+
document.getElementById('sizeGuideModal').classList.remove('hidden');
|
438 |
+
});
|
439 |
+
|
440 |
+
// Close modal
|
441 |
+
document.getElementById('closeModal').addEventListener('click', () => {
|
442 |
+
document.getElementById('sizeGuideModal').classList.add('hidden');
|
443 |
+
});
|
444 |
+
|
445 |
+
// Save button
|
446 |
+
document.getElementById('saveBtn').addEventListener('click', () => {
|
447 |
+
let allSelected = true;
|
448 |
+
for (const finger in selectedSizes) {
|
449 |
+
if (!selectedSizes[finger]) {
|
450 |
+
allSelected = false;
|
451 |
+
break;
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
if (allSelected) {
|
456 |
+
alert('Your size preferences have been saved!');
|
457 |
+
} else {
|
458 |
+
alert('Please select sizes for all fingers before saving.');
|
459 |
+
}
|
460 |
+
});
|
461 |
+
|
462 |
+
// Initialize with thumb selected
|
463 |
+
selectFinger('thumb');
|
464 |
+
});
|
465 |
+
</script>
|
466 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=sdurdiyev/naildesign-size-guide-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
467 |
+
</html>
|
prompts.txt
ADDED
File without changes
|