File tree Expand file tree Collapse file tree 1 file changed +12
-22
lines changed
src/lib/components/general Expand file tree Collapse file tree 1 file changed +12
-22
lines changed Original file line number Diff line number Diff line change 77
77
<div class =" logo max-h-full min-h-full min-w-full max-w-full bg-neutral-500" />
78
78
{:else }
79
79
<img
80
- class =" logo absolute max-h-full min-h-full min-w-full max-w-full"
81
- class:invisible ={! imageLoaded }
80
+ class =" logo fade-in-image absolute max-h-full min-h-full min-w-full max-w-full"
81
+ class:hidden ={! imageLoaded }
82
82
src ={renderedLogo }
83
83
alt =" {renderedName } Logo"
84
84
on:load ={() => (imageLoaded = true )} />
85
85
{#if ! imageLoaded && thumbHashData }
86
86
<img
87
- class =" logo absolute max-h-full min-h-full min-w-full max-w-full bg-neutral-500"
88
- class:invisible ={! thumbnailLoaded }
87
+ class =" logo fade-in-thumbhash absolute max-h-full min-h-full min-w-full max-w-full bg-neutral-500"
88
+ class:hidden ={! thumbnailLoaded }
89
89
src ={thumbHashData }
90
90
alt =" {renderedName } Logo"
91
91
width =" 100%"
92
92
on:load ={() => (thumbnailLoaded = true )}
93
+ in:fade ={{ duration : 1000 }}
93
94
out:fade ={{ duration : 200 , delay : 100 }} />
94
95
{/if }
95
96
{/if }
157
158
}
158
159
}
159
160
160
- .elementToFadeInAndOut {
161
- width : 200 px ;
162
- height : 200 px ;
163
- background : red;
164
- -webkit-animation : fadeinout 4 s linear forwards;
165
- animation : fadeinout 4 s linear forwards;
161
+ .fade-in-image {
162
+ animation : fadeIn 200 ms ;
166
163
}
167
164
168
- @-webkit-keyframes fadeinout {
169
- 0 % ,
170
- 100 % {
171
- opacity : 0 ;
172
- }
173
- 50 % {
174
- opacity : 1 ;
175
- }
165
+ .fade-in-thumbhash {
166
+ animation : fadeIn 1 s ;
176
167
}
177
168
178
- @keyframes fadeinout {
179
- 0 % ,
180
- 100 % {
169
+ @keyframes fadeIn {
170
+ 0 % {
181
171
opacity : 0 ;
182
172
}
183
- 50 % {
173
+ 100 % {
184
174
opacity : 1 ;
185
175
}
186
176
}
You can’t perform that action at this time.
0 commit comments