Skip to content

Commit 8b193b8

Browse files
authored
Update fast-search-card.js
1 parent 3542a64 commit 8b193b8

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed

dist/fast-search-card.js

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5095,7 +5095,7 @@ class FastSearchCard extends HTMLElement {
50955095

50965096
showCategoryButtons() {
50975097
this.collapsePanel(); // <-- HINZUGEFÜGTE ZEILE
5098-
5098+
50995099
// NEU: Search-Wrapper auf Mobile verstecken
51005100
if (this.isMobile()) {
51015101
const searchWrapper = this.shadowRoot.querySelector('.search-panel');
@@ -5107,7 +5107,9 @@ class FastSearchCard extends HTMLElement {
51075107
const categoryButtons = this.shadowRoot.querySelector('.category-buttons');
51085108
this.isMenuView = true;
51095109
categoryButtons.classList.add('visible');
5110-
categoryButtons.animate([{ opacity: 0, transform: 'translateX(20px) scale(0.9)' }, { opacity: 1, transform: 'translateX(0) scale(1)' }], { duration: 400, easing: 'cubic-bezier(0.16, 1, 0.3, 1)', fill: 'forwards' });
5110+
5111+
// Spotlight Animation für Category Buttons
5112+
this.triggerCategorySpotlightAnimation();
51115113
}
51125114

51135115
hideCategoryButtons() {
@@ -15478,7 +15480,50 @@ class FastSearchCard extends HTMLElement {
1547815480
});
1547915481
}
1548015482

15481-
15483+
triggerCategorySpotlightAnimation() {
15484+
const categoryButtons = this.shadowRoot.querySelector('.category-buttons');
15485+
const buttons = this.shadowRoot.querySelectorAll('.category-button');
15486+
15487+
// Spotlight-ähnliche Animation für die 5 Buttons
15488+
this.animateButtonsAsSpotlight(buttons);
15489+
}
15490+
15491+
animateButtonsAsSpotlight(buttons) {
15492+
// Phase 1: Alle Buttons unsichtbar machen
15493+
buttons.forEach(button => {
15494+
button.style.opacity = '0';
15495+
button.style.transform = 'scale(0.8)';
15496+
button.style.filter = 'blur(5px)';
15497+
});
15498+
15499+
// Phase 2: Gooey Blob-Effekt simulieren durch gestaffelte Erscheinung
15500+
buttons.forEach((button, index) => {
15501+
setTimeout(() => {
15502+
// Blob-ähnlicher Effekt
15503+
button.animate([
15504+
{
15505+
opacity: 0,
15506+
transform: 'scale(0.3) translateX(-20px)',
15507+
filter: 'blur(8px)'
15508+
},
15509+
{
15510+
opacity: 0.7,
15511+
transform: 'scale(1.2) translateX(0px)',
15512+
filter: 'blur(3px)'
15513+
},
15514+
{
15515+
opacity: 1,
15516+
transform: 'scale(1) translateX(0px)',
15517+
filter: 'blur(0px)'
15518+
}
15519+
], {
15520+
duration: 600,
15521+
easing: 'cubic-bezier(0.16, 1, 0.3, 1)',
15522+
fill: 'forwards'
15523+
});
15524+
}, index * 150); // 150ms Verzögerung zwischen jedem Button
15525+
});
15526+
}
1548215527

1548315528

1548415529
}

0 commit comments

Comments
 (0)