Skip to content

Commit

Permalink
Lazy loading for overview pages too
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter committed May 28, 2020
1 parent f97175a commit 70e79a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions assets/js/app/listing/Components/Table/Row/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@
<div
v-if="size === 'normal' && record.extras.image"
class="listing__row--item is-thumbnail"
:style="`background-image: url('${record.extras.image.thumbnail}')`"
></div>
>
<img
:src="record.extras.image.thumbnail"
style="width: 108px;"
loading="lazy"
/>
</div>
<!-- end column -->

<!-- column meta -->
Expand Down
6 changes: 3 additions & 3 deletions assets/scss/modules/listing/row/row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ $checkbox-row-width: 32px;
top: 0.25rem;
display: block;
flex: 0 0 20%;
max-width: 100px;
max-height: 70px;
max-width: 108px;
max-height: 86px;
overflow: hidden;
border-radius: $border-radius 0 0 $border-radius;
background-color: var(--shade-400);
background-repeat: no-repeat;
Expand All @@ -83,7 +84,6 @@ $checkbox-row-width: 32px;
@include media-breakpoint-up(md) {
order: 2;
top: 0;
max-height: none;
}

& ~ .is-excerpt {
Expand Down

0 comments on commit 70e79a9

Please sign in to comment.