Skip to content

Commit da328c9

Browse files
committed
svg animation
1 parent 388d68c commit da328c9

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

src/app/pages/home/home.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
-->
1616

1717
<div class="api-key-banner">
18-
<p>Open <code>functions/.env</code> and add your Gemini API key.</p>
18+
<div>
19+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M280-400q-33 0-56.5-23.5T200-480q0-33 23.5-56.5T280-560q33 0 56.5 23.5T360-480q0 33-23.5 56.5T280-400Zm0 160q-100 0-170-70T40-480q0-100 70-170t170-70q67 0 121.5 33t86.5 87h352l120 120-180 180-80-60-80 60-85-60h-47q-32 54-86.5 87T280-240Zm0-80q56 0 98.5-34t56.5-86h125l58 41 82-61 71 55 75-75-40-40H435q-14-52-56.5-86T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Z"/></svg>
20+
<p>Open <code>functions/.env</code> and add your Gemini API key.</p>
21+
</div>
1922
</div>
2023

2124
<header>

src/app/pages/home/home.component.scss

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,31 @@ header {
130130
display: flex;
131131
justify-content: center;
132132

133-
& p {
133+
& div {
134+
display: flex;
135+
align-items: center;
136+
gap: 1rem;
137+
134138
padding: 16px;
135-
background-color: var(--primary);
136-
color: var(--background);
139+
border: 2px solid var(--primary);
140+
color: var(--contrast);
137141
border-radius: 12px;
138142
max-width: fit-content;
143+
144+
& svg {
145+
animation: wobble 1s ease-in-out infinite;
146+
}
139147
}
140148
}
149+
150+
@keyframes wobble {
151+
0%, 50% {
152+
transform: translateX(0);
153+
}
154+
12.5% {
155+
transform: translateX(-5px);
156+
}
157+
37.5% {
158+
transform: translateX(5px);
159+
}
160+
}

0 commit comments

Comments
 (0)