Spaces:
Running
Running
the heading text now work just change color to the blue dots around picture.
Browse files- index.html +33 -23
index.html
CHANGED
|
@@ -26,7 +26,15 @@
|
|
| 26 |
background-clip: text;
|
| 27 |
color: transparent;
|
| 28 |
}
|
| 29 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
cursor: pointer;
|
| 31 |
transition: all 0.3s ease;
|
| 32 |
min-height: 1.2em;
|
|
@@ -154,6 +162,12 @@
|
|
| 154 |
<div class="mb-8">
|
| 155 |
<div class="flex justify-center flex-wrap gap-3 mb-4" id="socialIconsContainer">
|
| 156 |
<!-- Social media icons will be added here -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
<!-- Plus button for adding social media -->
|
| 158 |
<div class="relative">
|
| 159 |
<button id="addSocialButton" class="w-12 h-12 rounded-full bg-indigo-600 hover:bg-indigo-700 flex items-center justify-center transition">
|
|
@@ -248,9 +262,9 @@
|
|
| 248 |
document.querySelector('.image-upload-container').addEventListener('click', function() {
|
| 249 |
document.getElementById('imageUpload').click();
|
| 250 |
});
|
| 251 |
-
|
| 252 |
// Social media dropdown functionality
|
| 253 |
-
document.getElementById('addSocialButton').addEventListener('click', function() {
|
|
|
|
| 254 |
const dropdown = document.getElementById('socialDropdown');
|
| 255 |
dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block';
|
| 256 |
});
|
|
@@ -370,25 +384,6 @@ function getSocialUrl(platform, handle) {
|
|
| 370 |
const phoneNumber = this.textContent.replace(/[^\d+]/g, '');
|
| 371 |
this.href = `tel:${phoneNumber}`;
|
| 372 |
});
|
| 373 |
-
// Enhanced social media dropdown positioning
|
| 374 |
-
const addSocialButton = document.getElementById('addSocialButton');
|
| 375 |
-
const socialDropdown = document.getElementById('socialDropdown');
|
| 376 |
-
|
| 377 |
-
addSocialButton.addEventListener('click', function(e) {
|
| 378 |
-
e.stopPropagation();
|
| 379 |
-
const rect = addSocialButton.getBoundingClientRect();
|
| 380 |
-
const isVisible = socialDropdown.style.display === 'block';
|
| 381 |
-
socialDropdown.style.display = isVisible ? 'none' : 'block';
|
| 382 |
-
|
| 383 |
-
if (!isVisible) {
|
| 384 |
-
socialDropdown.style.bottom = '100%';
|
| 385 |
-
socialDropdown.style.top = 'auto';
|
| 386 |
-
socialDropdown.style.left = '50%';
|
| 387 |
-
socialDropdown.style.transform = 'translateX(-50%)';
|
| 388 |
-
socialDropdown.style.marginBottom = '8px';
|
| 389 |
-
}
|
| 390 |
-
});
|
| 391 |
-
|
| 392 |
// Social media platform selection
|
| 393 |
document.querySelectorAll('.social-option').forEach(option => {
|
| 394 |
option.addEventListener('click', function(e) {
|
|
@@ -424,6 +419,14 @@ function getSocialUrl(platform, handle) {
|
|
| 424 |
const handle = handleInput.value.trim();
|
| 425 |
if (handle) {
|
| 426 |
addSocialIcon(platform, handle);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 427 |
}
|
| 428 |
document.body.removeChild(modal);
|
| 429 |
document.getElementById('socialDropdown').style.display = 'none';
|
|
@@ -435,9 +438,16 @@ function getSocialUrl(platform, handle) {
|
|
| 435 |
document.body.removeChild(modal);
|
| 436 |
}
|
| 437 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
});
|
| 439 |
});
|
| 440 |
-
|
| 441 |
const container = document.getElementById('socialIconsContainer');
|
| 442 |
|
| 443 |
// Create social icon element
|
|
|
|
| 26 |
background-clip: text;
|
| 27 |
color: transparent;
|
| 28 |
}
|
| 29 |
+
.social-icon-placeholder {
|
| 30 |
+
width: 12px;
|
| 31 |
+
height: 12px;
|
| 32 |
+
border-radius: 50%;
|
| 33 |
+
background: #3b82f6;
|
| 34 |
+
margin: 0 2px;
|
| 35 |
+
display: inline-block;
|
| 36 |
+
}
|
| 37 |
+
.editable {
|
| 38 |
cursor: pointer;
|
| 39 |
transition: all 0.3s ease;
|
| 40 |
min-height: 1.2em;
|
|
|
|
| 162 |
<div class="mb-8">
|
| 163 |
<div class="flex justify-center flex-wrap gap-3 mb-4" id="socialIconsContainer">
|
| 164 |
<!-- Social media icons will be added here -->
|
| 165 |
+
<div class="flex items-center justify-center space-x-1 mb-2 w-full">
|
| 166 |
+
<span class="social-icon-placeholder"></span>
|
| 167 |
+
<span class="social-icon-placeholder"></span>
|
| 168 |
+
<span class="social-icon-placeholder"></span>
|
| 169 |
+
<span class="text-xs text-gray-400">Click + to add social media</span>
|
| 170 |
+
</div>
|
| 171 |
<!-- Plus button for adding social media -->
|
| 172 |
<div class="relative">
|
| 173 |
<button id="addSocialButton" class="w-12 h-12 rounded-full bg-indigo-600 hover:bg-indigo-700 flex items-center justify-center transition">
|
|
|
|
| 262 |
document.querySelector('.image-upload-container').addEventListener('click', function() {
|
| 263 |
document.getElementById('imageUpload').click();
|
| 264 |
});
|
|
|
|
| 265 |
// Social media dropdown functionality
|
| 266 |
+
document.getElementById('addSocialButton').addEventListener('click', function(e) {
|
| 267 |
+
e.stopPropagation();
|
| 268 |
const dropdown = document.getElementById('socialDropdown');
|
| 269 |
dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block';
|
| 270 |
});
|
|
|
|
| 384 |
const phoneNumber = this.textContent.replace(/[^\d+]/g, '');
|
| 385 |
this.href = `tel:${phoneNumber}`;
|
| 386 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
// Social media platform selection
|
| 388 |
document.querySelectorAll('.social-option').forEach(option => {
|
| 389 |
option.addEventListener('click', function(e) {
|
|
|
|
| 419 |
const handle = handleInput.value.trim();
|
| 420 |
if (handle) {
|
| 421 |
addSocialIcon(platform, handle);
|
| 422 |
+
// Remove placeholder dots
|
| 423 |
+
const placeholderDots = document.querySelectorAll('.social-icon-placeholder');
|
| 424 |
+
if (placeholderDots.length > 0) {
|
| 425 |
+
const placeholderContainer = placeholderDots[0].parentNode;
|
| 426 |
+
if (placeholderContainer) {
|
| 427 |
+
placeholderContainer.remove();
|
| 428 |
+
}
|
| 429 |
+
}
|
| 430 |
}
|
| 431 |
document.body.removeChild(modal);
|
| 432 |
document.getElementById('socialDropdown').style.display = 'none';
|
|
|
|
| 438 |
document.body.removeChild(modal);
|
| 439 |
}
|
| 440 |
});
|
| 441 |
+
|
| 442 |
+
// Handle Enter key
|
| 443 |
+
handleInput.addEventListener('keypress', function(e) {
|
| 444 |
+
if (e.key === 'Enter') {
|
| 445 |
+
saveBtn.click();
|
| 446 |
+
}
|
| 447 |
+
});
|
| 448 |
});
|
| 449 |
});
|
| 450 |
+
function addSocialIcon(platform, handle) {
|
| 451 |
const container = document.getElementById('socialIconsContainer');
|
| 452 |
|
| 453 |
// Create social icon element
|