Skip to content

Commit 997a90d

Browse files
committed
Docs: work on homepage
1 parent c127c4e commit 997a90d

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

docs/src/components/AILoader/AILoader.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,19 @@
99

1010
canvas {
1111
display: block;
12+
13+
&.idle {
14+
animation: jiggle 1500ms ease;
15+
animation-iteration-count: infinite;
16+
}
17+
}
18+
19+
@keyframes jiggle {
20+
0% { transform: scale3d(1, 1, 1); }
21+
30% { transform: scale3d(1.05, 0.96, 1); }
22+
40% { transform: scale3d(0.95, 1.05, 1); }
23+
50% { transform: scale3d(1.05, 0.95, 1); }
24+
65% { transform: scale3d(.98, 1.03, 1); }
25+
75% { transform: scale3d(1.03, .98, 1); }
26+
100% { transform: scale3d(1, 1, 1); }
1227
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<canvas class="{activeIf active}"></canvas>
1+
<canvas class="{classMap getClasses}"></canvas>

docs/src/components/AILoader/AILoader.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ const createComponent = ({ self, el, $, settings }) => ({
2929
self.createKeyframes();
3030
},
3131

32+
getClasses() {
33+
return {
34+
active: settings.active,
35+
idle: !settings.active,
36+
};
37+
},
38+
3239
createTendrils() {
3340
self.tendrilAngles = Array.from({ length: NUM }, (_, i) => (i / NUM) * Math.PI * 2 - Math.PI / 2);
3441
self.tendrilWidths = Array.from({ length: NUM }, (_, i) => 0.6 + 0.8 * (0.5 + 0.5 * Math.sin(i * 2.3 + 0.7)));
@@ -146,6 +153,7 @@ const createComponent = ({ self, el, $, settings }) => ({
146153
ctx.restore();
147154
}
148155
}
156+
149157
self.rafId = requestAnimationFrame((t) => self.render(t));
150158
},
151159

docs/src/components/AIPrompt/AIPrompt.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@
242242

243243
.bar {
244244
transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
245-
/*
246-
width: 80%
245+
/* Too much
247246
font-size: 12px;
248247
padding: 7px 10px;
249248
*/
@@ -254,6 +253,13 @@
254253
transform: translateY(0);
255254
}
256255
}
256+
ui-button {
257+
--button-styled-background: var(--standard-solid-20);
258+
--button-styled-hover-background: var(--standard-solid-25);
259+
260+
--button-styled-pressed-background: var(--standard-solid-30);
261+
--button-styled-active-background: var(--standard-solid-30);
262+
}
257263
}
258264

259265
/*******************************

docs/src/components/AIPrompt/AIPrompt.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="hint">{getHint}</div>
33
<div class="bar {classMap barClass}">
44
<input class="input" type="text" placeholder="{placeholder}" maxlength="{maxLength}" />
5-
<ui-button grey subtle class="submit" icon-only icon="send" disabled={!hasPrompt}></ui-button>
5+
<ui-button subtle class="submit" icon-only icon="send" disabled={!hasPrompt}></ui-button>
66
</div>
77
{#if cotVisible}
88
<div class="cot {classMap cotClass}">

0 commit comments

Comments
 (0)