From 7653e72e88b004764c9f1bce4cfce3332f647f72 Mon Sep 17 00:00:00 2001 From: mikiher Date: Wed, 9 Oct 2024 15:04:25 +0300 Subject: [PATCH] Use object-cover for author images unless AR is really high or low. --- client/components/covers/AuthorImage.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/components/covers/AuthorImage.vue b/client/components/covers/AuthorImage.vue index b4fb3cca..0073a958 100644 --- a/client/components/covers/AuthorImage.vue +++ b/client/components/covers/AuthorImage.vue @@ -72,8 +72,7 @@ export default { if (this.$refs.img) { var { naturalWidth, naturalHeight } = this.$refs.img var imgAr = naturalHeight / naturalWidth - var arDiff = Math.abs(imgAr - aspectRatio) - if (arDiff > 0.15) { + if (imgAr < 0.5 || imgAr > 2) { this.showCoverBg = true } else { this.showCoverBg = false