From 3556a0a3c6add5a461feddb74d6f9d846157ecda Mon Sep 17 00:00:00 2001 From: Emma Winston Date: Tue, 1 Oct 2019 17:02:33 +0100 Subject: [PATCH] Only show hero image on static public profile pages if a custom one has been uploaded --- app/views/application/_sidebar.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/application/_sidebar.html.haml b/app/views/application/_sidebar.html.haml index b5ce5845e..3a7144423 100644 --- a/app/views/application/_sidebar.html.haml +++ b/app/views/application/_sidebar.html.haml @@ -1,6 +1,7 @@ .hero-widget - .hero-widget__img - = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title + - if @instance_presenter.hero.present? || @instance_presenter.thumbnail.present? + .hero-widget__img + = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url, alt: @instance_presenter.site_title .hero-widget__text %p= @instance_presenter.site_short_description.html_safe.presence || @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname)