Only show hero image on static public profile pages if a custom one has been uploaded

This commit is contained in:
Emma Winston 2019-10-01 17:02:33 +01:00
parent b151f24dd8
commit 3556a0a3c6

View File

@ -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)