Skip to content

Commit 3d64482

Browse files
committed
animate button on first show
1 parent 2071dce commit 3d64482

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

script/AIChatButton.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ class AIChatButton extends HTMLElement {
5454
for (const elem of this.#root.querySelectorAll('[title]')) {
5555
elem.title = this.getAttribute('title-'+elem.title) || elem.title;
5656
}
57+
58+
this.#root.querySelector('button.start').animate({
59+
opacity: [0, 0.5, 1],
60+
transform: ['scale(0.5)', 'scale(1.1)', 'scale(1)'],
61+
easing: ["ease-in", "ease-out"],
62+
}, 1000);
5763
}
5864

5965
/**
@@ -76,6 +82,7 @@ class AIChatButton extends HTMLElement {
7682
}
7783
:host > button svg {
7884
fill: var(--color-chat-icon);
85+
filter: drop-shadow(0.2em 0.2em 0.2em rgb(0 0 0 / 0.4));
7986
}
8087
svg {
8188
width: 2em;
@@ -99,7 +106,7 @@ class AIChatButton extends HTMLElement {
99106
100107
padding: 0.5em;
101108
102-
box-shadow: 0 4px 5px rgb(0 0 0 / 30%);
109+
box-shadow: 0 0.2em 0.2em rgb(0 0 0 / 0.4);
103110
border-radius: 8px;
104111
border: 1px solid #fff;
105112
}

0 commit comments

Comments
 (0)