Enhances cart and payment interaction UI

Adds interactive cart item editing with expandable sections
Introduces dynamic discount calculation and display
Implements giftcard lookup and balance tracking functionality

Improves user experience with smooth transitions and more flexible item management
This commit is contained in:
Janus C. H. Knudsen 2025-12-19 18:21:55 +01:00
parent e09048742c
commit 1b0ef74551
4 changed files with 759 additions and 69 deletions

View file

@ -442,7 +442,30 @@
}
swp-journal-icon {
font-size: 18px;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
}
swp-journal-icon img {
width: 20px;
height: 20px;
filter: invert(22%) sepia(14%) saturate(1042%) hue-rotate(164deg) brightness(102%) contrast(85%);
transition: filter 150ms ease;
}
swp-journal-link:hover swp-journal-icon img {
filter: invert(32%) sepia(98%) saturate(1234%) hue-rotate(196deg) brightness(93%) contrast(92%);
}
swp-journal-link.no-journal swp-journal-icon img {
filter: invert(45%) sepia(8%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(90%);
}
swp-journal-link.no-journal:hover swp-journal-icon img {
filter: invert(32%) sepia(98%) saturate(1234%) hue-rotate(196deg) brightness(93%) contrast(92%);
}
swp-journal-text {
@ -827,7 +850,7 @@
<swp-drawer-section>
<swp-section-label>Journal</swp-section-label>
<swp-journal-link id="journalLink">
<swp-journal-icon>📋</swp-journal-icon>
<swp-journal-icon><img id="journalIcon" src="icons/journal-alt.svg" alt=""></swp-journal-icon>
<swp-journal-text>Åbn journal</swp-journal-text>
<swp-journal-arrow></swp-journal-arrow>
</swp-journal-link>
@ -898,15 +921,15 @@
// Update journal link
const journalLink = document.getElementById('journalLink');
const journalText = journalLink.querySelector('swp-journal-text');
const journalIcon = journalLink.querySelector('swp-journal-icon');
const journalIcon = document.getElementById('journalIcon');
if (hasJournal) {
journalLink.classList.remove('no-journal');
journalIcon.textContent = '📋';
journalIcon.src = 'icons/journal-alt.svg';
journalText.textContent = 'Åbn journal';
} else {
journalLink.classList.add('no-journal');
journalIcon.textContent = '';
journalIcon.src = 'icons/square-plus.svg';
journalText.textContent = 'Opret journal';
}