fix: hero image not loading in portal homepage (backport #31699) (#31700)

fix: hero image not loading in portal homepage (#31699)

(cherry picked from commit 8a6432ec3f4bf63c39d1f687f618cec2360ebccf)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
mergify[bot] 2022-07-26 13:46:03 +05:30 committed by GitHub
parent c6fbb7b27d
commit 5b7b58322f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,6 @@
/* csslint ignore:start */
{% if homepage.hero_image %}
.hero-image {
background-image: url("{{ homepage.hero_image }}");
background-size: cover;
padding: 10rem 0;
}

View File

@ -5,7 +5,11 @@
{% block content %}
<main>
{% if homepage.hero_section_based_on == 'Default' %}
<section class="hero-section border-bottom {%if homepage.hero_image%}hero-image{%endif%}">
<section class="hero-section border-bottom {%if homepage.hero_image%}hero-image{%endif%}"
{% if homepage.hero_image %}
style="background-image: url('{{ homepage.hero_image }}');"
{%- endif %}
>
<div class="container py-5">
<h1 class="d-none d-sm-block display-4">{{ homepage.tag_line }}</h1>
<h1 class="d-block d-sm-none">{{ homepage.tag_line }}</h1>