diff --git a/wwwroot/poc-indstillinger.html b/wwwroot/poc-indstillinger.html
index 7252e03..9a67879 100644
--- a/wwwroot/poc-indstillinger.html
+++ b/wwwroot/poc-indstillinger.html
@@ -953,9 +953,14 @@
}
swp-variable-tag:hover {
- background: color-mix(in srgb, var(--color-teal) 10%, transparent);
border-color: var(--color-teal);
color: var(--color-teal);
+ cursor: pointer;
+ }
+
+ swp-message-preview .highlight.active {
+ background: color-mix(in srgb, var(--color-teal) 35%, transparent);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-teal) 20%, transparent);
}
swp-variable-tag i {
@@ -975,11 +980,9 @@
}
swp-message-preview .highlight {
- background: color-mix(in srgb, var(--color-teal) 20%, transparent);
padding: 1px 4px;
border-radius: 3px;
- color: var(--color-teal);
- font-weight: 500;
+ transition: all 150ms ease;
}
swp-preview-meta {
@@ -1239,11 +1242,16 @@
color: var(--color-text-secondary);
}
- /* Highlight in email preview - subtle background only */
+ /* Highlight in email preview - only on hover */
swp-email-preview .editable {
- background: rgba(0, 137, 123, 0.12);
padding: 1px 3px;
border-radius: 2px;
+ transition: all 150ms ease;
+ }
+
+ swp-email-preview .editable.active {
+ background: rgba(0, 137, 123, 0.35);
+ box-shadow: 0 0 0 2px rgba(0, 137, 123, 0.2);
}
@@ -1972,13 +1980,13 @@ Vil du ændre din tid? {booking_link}
Forhåndsvisning
- Hej Anna Jensen!
+ Hej Anna Jensen!
Din tid er bekræftet:
- Dameklip + Føn
- Torsdag d. 2. januar kl. 14:30
- Hos Maria
- Salon Beauty, Hovedgaden 123
- Vil du ændre din tid? book.plantempus.dk/x7k2
+ Dameklip + Føn
+ Torsdag d. 2. januar kl. 14:30
+ Hos Maria
+ Salon Beauty, Hovedgaden 123
+ Vil du ændre din tid? book.plantempus.dk/x7k2
312 tegn
@@ -2072,26 +2080,26 @@ Vil du ændre din tid? {booking_link}
- Hej Anna,
+ Hej Anna,
Vi glæder os til at se dig! Her er detaljerne for din aftale.
- Dameklip + Føn
+ Dameklip + Føn
- Torsdag d. 2. januar 2025
+ Torsdag d. 2. januar 2025
- Kl. 14:30 – 15:15
+ Kl. 14:30 – 15:15
- Hos Maria
+ Hos Maria
@@ -2302,6 +2310,42 @@ Vil du ændre din tid? {booking_link}
}
editor.textContent += varText;
});
+
+ // Highlight preview on hover
+ tag.addEventListener('mouseenter', () => {
+ const varName = tag.dataset.var;
+ const preview = document.getElementById('messagePreview');
+ preview.querySelectorAll(`.highlight[data-var="${varName}"]`).forEach(span => {
+ span.classList.add('active');
+ });
+ });
+
+ tag.addEventListener('mouseleave', () => {
+ const preview = document.getElementById('messagePreview');
+ preview.querySelectorAll('.highlight.active').forEach(span => {
+ span.classList.remove('active');
+ });
+ });
+ });
+
+ // ==========================================
+ // HIGHLIGHT EMAIL PREVIEW ON HOVER
+ // ==========================================
+ document.querySelectorAll('#emailDrawer swp-variable-tag').forEach(tag => {
+ tag.addEventListener('mouseenter', () => {
+ const varName = tag.dataset.var;
+ const preview = document.querySelector('swp-email-preview');
+ preview.querySelectorAll(`.editable[data-var="${varName}"]`).forEach(span => {
+ span.classList.add('active');
+ });
+ });
+
+ tag.addEventListener('mouseleave', () => {
+ const preview = document.querySelector('swp-email-preview');
+ preview.querySelectorAll('.editable.active').forEach(span => {
+ span.classList.remove('active');
+ });
+ });
});
// ==========================================