Skip to content

Commit

Permalink
refactor: some loading optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Jan 29, 2025
1 parent 1a2546d commit e7c4bad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/organisms/gallery/PreviewGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const PreviewGridContent: FunctionComponent<PreviewGridProps> = async ({
alt={assetAlt(additional, locale)}
priority={i < 10}
quality={80}
className={styles.image}
/>
<div className={styles.titleCard}>
{assetTitle(additional, locale) || name}
Expand Down
5 changes: 5 additions & 0 deletions components/organisms/gallery/PreviewGrid/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
}
}

.image {
content-visibility: auto;
}

.titleCard {
position: absolute;
bottom: 0;
Expand All @@ -30,6 +34,7 @@
transition: var(--time-transition-base) transform;
transform: var(--translate-card, translateY(100%));
width: 100%;
word-break: break-word;

@media (prefers-reduced-transparency: no-preference) {
--opacity-background-title: 0.8;
Expand Down

0 comments on commit e7c4bad

Please sign in to comment.