Skip to content

Commit 54b5dfa

Browse files
authored
chore: refactor css, restyle to be slightly minimalistic (#7397)
restyle Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 468ac60 commit 54b5dfa

36 files changed

+1875
-996
lines changed

core/http/static/animations.css

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
/* LocalAI Animation System */
2+
/* Purposeful animations with performance optimization */
3+
4+
/* Animation Keyframes */
5+
@keyframes fadeIn {
6+
from {
7+
opacity: 0;
8+
}
9+
to {
10+
opacity: 1;
11+
}
12+
}
13+
14+
@keyframes fadeInUp {
15+
from {
16+
opacity: 0;
17+
transform: translateY(20px);
18+
}
19+
to {
20+
opacity: 1;
21+
transform: translateY(0);
22+
}
23+
}
24+
25+
@keyframes fadeInDown {
26+
from {
27+
opacity: 0;
28+
transform: translateY(-20px);
29+
}
30+
to {
31+
opacity: 1;
32+
transform: translateY(0);
33+
}
34+
}
35+
36+
@keyframes cardReveal {
37+
from {
38+
opacity: 0;
39+
transform: translateY(20px);
40+
}
41+
to {
42+
opacity: 1;
43+
transform: translateY(0);
44+
}
45+
}
46+
47+
@keyframes slideInRight {
48+
from {
49+
opacity: 0;
50+
transform: translateX(-20px);
51+
}
52+
to {
53+
opacity: 1;
54+
transform: translateX(0);
55+
}
56+
}
57+
58+
@keyframes slideInLeft {
59+
from {
60+
opacity: 0;
61+
transform: translateX(20px);
62+
}
63+
to {
64+
opacity: 1;
65+
transform: translateX(0);
66+
}
67+
}
68+
69+
@keyframes pulse {
70+
0%, 100% {
71+
opacity: 1;
72+
}
73+
50% {
74+
opacity: 0.5;
75+
}
76+
}
77+
78+
@keyframes glow {
79+
0%, 100% {
80+
box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
81+
}
82+
50% {
83+
box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
84+
}
85+
}
86+
87+
@keyframes scaleIn {
88+
from {
89+
opacity: 0;
90+
transform: scale(0.95);
91+
}
92+
to {
93+
opacity: 1;
94+
transform: scale(1);
95+
}
96+
}
97+
98+
/* P2P/Network Specific Animations */
99+
@keyframes rotateCircleNodes {
100+
0% { transform: rotate(0deg); }
101+
100% { transform: rotate(360deg); }
102+
}
103+
104+
@keyframes shakeFlask {
105+
0%, 10% { transform: rotate(0deg); }
106+
20% { transform: rotate(-10deg); }
107+
30% { transform: rotate(10deg); }
108+
40% { transform: rotate(-8deg); }
109+
50% { transform: rotate(8deg); }
110+
60% { transform: rotate(-5deg); }
111+
70% { transform: rotate(5deg); }
112+
80% { transform: rotate(-2deg); }
113+
90% { transform: rotate(2deg); }
114+
100% { transform: rotate(0deg); }
115+
}
116+
117+
@keyframes nodeGlow {
118+
0% { left: -100%; }
119+
50% { left: 100%; }
120+
100% { left: 100%; }
121+
}
122+
123+
/* Animation Utility Classes */
124+
.fade-in {
125+
animation: fadeIn var(--duration-fast) var(--ease-out);
126+
}
127+
128+
/* Transition Utility Classes */
129+
.transition-default {
130+
transition: all var(--duration-fast) var(--ease-default);
131+
}
132+
133+
.transition-color {
134+
transition: color var(--duration-fast) var(--ease-default);
135+
}
136+
137+
.transition-background {
138+
transition: background-color var(--duration-fast) var(--ease-default);
139+
}
140+
141+
.fade-in-up {
142+
animation: fadeInUp var(--duration-normal) var(--ease-out) backwards;
143+
}
144+
145+
.fade-in-down {
146+
animation: fadeInDown var(--duration-normal) var(--ease-out) backwards;
147+
}
148+
149+
.slide-in-right {
150+
animation: slideInRight var(--duration-normal) var(--ease-out) backwards;
151+
}
152+
153+
.slide-in-left {
154+
animation: slideInLeft var(--duration-normal) var(--ease-out) backwards;
155+
}
156+
157+
.scale-in {
158+
animation: scaleIn var(--duration-normal) var(--ease-out) backwards;
159+
}
160+
161+
/* Staggered Card Animations */
162+
.card-animate {
163+
animation: cardReveal var(--duration-normal) var(--ease-out) backwards;
164+
}
165+
166+
.card-animate:nth-child(1) { animation-delay: 0ms; }
167+
.card-animate:nth-child(2) { animation-delay: 50ms; }
168+
.card-animate:nth-child(3) { animation-delay: 100ms; }
169+
.card-animate:nth-child(4) { animation-delay: 150ms; }
170+
.card-animate:nth-child(5) { animation-delay: 200ms; }
171+
.card-animate:nth-child(6) { animation-delay: 250ms; }
172+
.card-animate:nth-child(7) { animation-delay: 300ms; }
173+
.card-animate:nth-child(8) { animation-delay: 350ms; }
174+
.card-animate:nth-child(9) { animation-delay: 400ms; }
175+
.card-animate:nth-child(10) { animation-delay: 450ms; }
176+
.card-animate:nth-child(11) { animation-delay: 500ms; }
177+
.card-animate:nth-child(12) { animation-delay: 550ms; }
178+
179+
/* Hero Text Animation */
180+
.hero-title {
181+
animation: fadeInUp var(--duration-normal) var(--ease-out) backwards;
182+
animation-delay: 50ms;
183+
}
184+
185+
.hero-subtitle {
186+
animation: fadeInUp var(--duration-normal) var(--ease-out) backwards;
187+
animation-delay: 100ms;
188+
}
189+
190+
/* Navigation Animation */
191+
.nav-fade-in {
192+
animation: fadeIn var(--duration-normal) var(--ease-out) backwards;
193+
animation-delay: 0ms;
194+
}
195+
196+
/* Loading States - Minimal */
197+
.pulse-animation {
198+
animation: pulse 1.5s var(--ease-in-out) infinite;
199+
}
200+
201+
.glow-animation {
202+
animation: glow 1.5s var(--ease-in-out) infinite;
203+
}
204+
205+
/* Reduced Motion Support */
206+
@media (prefers-reduced-motion: reduce) {
207+
*,
208+
*::before,
209+
*::after {
210+
animation-duration: 0.01ms !important;
211+
animation-iteration-count: 1 !important;
212+
transition-duration: 0.01ms !important;
213+
scroll-behavior: auto !important;
214+
}
215+
216+
.card-animate,
217+
.fade-in-up,
218+
.fade-in-down,
219+
.slide-in-right,
220+
.slide-in-left,
221+
.scale-in,
222+
.hero-title,
223+
.hero-subtitle {
224+
animation: none !important;
225+
}
226+
}
227+
228+
/* Performance Optimization */
229+
.card-animate,
230+
.fade-in-up,
231+
.fade-in-down,
232+
.slide-in-right,
233+
.slide-in-left,
234+
.scale-in {
235+
will-change: transform, opacity;
236+
}
237+
238+
/* After animation completes, remove will-change */
239+
.card-animate.animation-complete,
240+
.fade-in-up.animation-complete,
241+
.fade-in-down.animation-complete,
242+
.slide-in-right.animation-complete,
243+
.slide-in-left.animation-complete,
244+
.scale-in.animation-complete {
245+
will-change: auto;
246+
}
247+
110 KB
Binary file not shown.
110 KB
Binary file not shown.
110 KB
Binary file not shown.
121 KB
Binary file not shown.
120 KB
Binary file not shown.
121 KB
Binary file not shown.
67.7 KB
Binary file not shown.
67.8 KB
Binary file not shown.
67.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)