Skip to content

Commit 716347f

Browse files
authored
Update fast-search-card.js
1 parent 70007a3 commit 716347f

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

dist/fast-search-card.js

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,10 @@ class FastSearchCard extends HTMLElement {
13001300
cursor: pointer;
13011301
transition: all 0.2s ease;
13021302
background: var(--glass-shadow);
1303+
/* NEU FÜR MORPH: */
1304+
position: absolute;
1305+
left: 50%;
1306+
transform: translate(-50%, -50%);
13031307
}
13041308

13051309
.category-button:hover {
@@ -5004,6 +5008,7 @@ class FastSearchCard extends HTMLElement {
50045008
}
50055009

50065010

5011+
50075012
showCategoryButtons() {
50085013
this.collapsePanel();
50095014

@@ -5015,14 +5020,34 @@ class FastSearchCard extends HTMLElement {
50155020
}
50165021

50175022
const categoryButtons = this.shadowRoot.querySelector('.category-buttons');
5023+
const buttons = categoryButtons.querySelectorAll('.category-button');
5024+
50185025
this.isMenuView = true;
50195026
categoryButtons.classList.add('visible');
5020-
5027+
5028+
// Alle Buttons auf Startposition (Mitte)
5029+
buttons.forEach(button => {
5030+
button.style.left = '50%';
5031+
button.style.position = 'absolute';
5032+
button.style.transform = 'translate(-50%, -50%)';
5033+
});
5034+
5035+
// Phase 1: Container mit starkem Blur (Blob-Effekt)
50215036
categoryButtons.animate([
5022-
{ opacity: 0, transform: 'translateX(20px) scale(0.9)', filter: 'blur(8px)' },
5023-
{ opacity: 1, transform: 'translateX(0) scale(1)', filter: 'blur(0px)' }
5037+
{ opacity: 0, filter: 'blur(15px) contrast(20)' },
5038+
{ opacity: 1, filter: 'blur(0px) contrast(1)' }
50245039
], { duration: 400, easing: 'cubic-bezier(0.16, 1, 0.3, 1)', fill: 'forwards' });
5025-
5040+
5041+
// Phase 2: Buttons auseinanderfahren (mit leichtem Delay)
5042+
const positions = ['20%', '35%', '50%', '65%', '80%']; // 5 Positionen
5043+
buttons.forEach((button, index) => {
5044+
setTimeout(() => {
5045+
button.animate([
5046+
{ left: '50%' },
5047+
{ left: positions[index] }
5048+
], { duration: 300, easing: 'cubic-bezier(0.16, 1, 0.3, 1)', fill: 'forwards' });
5049+
}, 150); // Startet nach 150ms
5050+
});
50265051
}
50275052

50285053

0 commit comments

Comments
 (0)