mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-03 02:10:55 +00:00
Add a placeholder for non-cached images to minimize thread jumping
This commit is contained in:
parent
b0c2b394e0
commit
1a5bd99742
@ -7,3 +7,10 @@
|
|||||||
.shortHeight {
|
.shortHeight {
|
||||||
max-height: 680px;
|
max-height: 680px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.placeholderImage {
|
||||||
|
display: block;
|
||||||
|
width: 524px;
|
||||||
|
height: 680px;
|
||||||
|
background-color: var(--background-site);
|
||||||
|
}
|
||||||
|
@ -101,7 +101,10 @@ const NoteImage: Component<{
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Show when={isImageLoaded()}>
|
<Show
|
||||||
|
when={isImageLoaded()}
|
||||||
|
fallback={<div class={styles.placeholderImage}></div>}
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
class={`${props.class || ''} ${props.plainBorder ? '' : 'roundedImage'}`}
|
class={`${props.class || ''} ${props.plainBorder ? '' : 'roundedImage'}`}
|
||||||
href={src()}
|
href={src()}
|
||||||
|
Loading…
Reference in New Issue
Block a user