From fb4f487abddca99ad1165d1ef3060e8019782a74 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Mon, 9 Dec 2019 16:54:27 +0100 Subject: [PATCH] Revert layout changes for imageAspectRatio - we still add the imageAspectRatio for new posts, but we don't do anything with the layout until we figure out how to add imageAspectRatios for every post with an image in the database without causing a big downtime --- .../MasonryGrid/MasonryGridItem.vue | 21 +++++++------------ webapp/components/PostCard/PostCard.vue | 9 -------- webapp/pages/index.vue | 7 ++----- webapp/pages/post/_id/_slug/more-info.vue | 6 +----- webapp/pages/profile/_id/_slug.vue | 6 +----- 5 files changed, 12 insertions(+), 37 deletions(-) diff --git a/webapp/components/MasonryGrid/MasonryGridItem.vue b/webapp/components/MasonryGrid/MasonryGridItem.vue index 91fb8a1d8..937da8f1f 100644 --- a/webapp/components/MasonryGrid/MasonryGridItem.vue +++ b/webapp/components/MasonryGrid/MasonryGridItem.vue @@ -5,17 +5,6 @@ diff --git a/webapp/components/PostCard/PostCard.vue b/webapp/components/PostCard/PostCard.vue index 79ba9e8f0..60444c816 100644 --- a/webapp/components/PostCard/PostCard.vue +++ b/webapp/components/PostCard/PostCard.vue @@ -141,15 +141,6 @@ export default { this.$emit('unpinPost', post) }, }, - mounted() { - const width = this.$el.offsetWidth - const height = Math.min(width / this.post.imageAspectRatio, 2000) - const imageElement = this.$el.querySelector('.ds-card-image') - - if (imageElement) { - imageElement.style.height = `${height}px` - } - }, } diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index 3cd669bfe..723232a2f 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -21,13 +21,10 @@