From 0649e5cf135a17162531f972d91f6bea4340b577 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 25 Aug 2023 20:49:55 +0100 Subject: [PATCH] Lazy load images --- app/scss/packagegrid.scss | 11 +++++++++++ app/templates/base.html | 4 ++-- app/templates/collections/view.html | 2 +- app/templates/index.html | 2 +- app/templates/macros/packagegridtile.html | 4 ++-- app/templates/macros/reviews.html | 3 ++- app/templates/macros/threads.html | 8 +++++--- app/templates/packages/package_base.html | 3 ++- app/templates/packages/review_create_edit.html | 3 ++- app/templates/threads/user_comments.html | 3 ++- app/templates/threads/view.html | 3 ++- 11 files changed, 32 insertions(+), 14 deletions(-) diff --git a/app/scss/packagegrid.scss b/app/scss/packagegrid.scss index d0b6963e..65b9c1ae 100644 --- a/app/scss/packagegrid.scss +++ b/app/scss/packagegrid.scss @@ -13,6 +13,17 @@ background-size: cover; background-repeat: no-repeat; background-position: center; + + img { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + object-fit: cover; + padding: 0; + margin: 0; + } } .packagegridscrub { diff --git a/app/templates/base.html b/app/templates/base.html index 4f237763..e21c3425 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -15,8 +15,8 @@ {%- endif %} - - + + {% if noindex -%} diff --git a/app/templates/collections/view.html b/app/templates/collections/view.html index 1e19457a..6d9c389a 100644 --- a/app/templates/collections/view.html +++ b/app/templates/collections/view.html @@ -79,7 +79,7 @@
- {{ item.package.title }} screenshot + {{ item.package.title }} screenshot
{% if item.package.state.name != "APPROVED" %} diff --git a/app/templates/index.html b/app/templates/index.html index d8f549da..1f76d7f3 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -44,7 +44,7 @@