Skip to content

Commit 1d62adb

Browse files
committed
chore: fix toggle on 1 slider
1 parent cee1aee commit 1d62adb

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

app/retail/templates/home/index2021.html

+30-13
Original file line numberDiff line numberDiff line change
@@ -163,23 +163,40 @@ <h5>{{ slide.subtitle }}</h5>
163163
</div>
164164
</header>
165165

166-
166+
{% elif landingBanner.default %}
167+
<!-- Default Slide -->
168+
<header class="grad">
169+
<div class="container build-slide">
170+
<div class="row pt-5">
171+
<div class="col-12 col-md-6 d-flex flex-column justify-content-around">
172+
<h1 class="mt-5">{{ landingBanner.slides.0.title }}</h1>
173+
<p class="font-bigger-4 text-grey-400 font-weight-300">{{ landingBanner.slides.0.subtitle }}</p>
174+
</div>
175+
<div class="col-12 col-md-6 header-image">
176+
<img class="mt-5" src="{{ landingBanner.slides.0.img }}">
177+
</div>
178+
</div>
179+
</div>
180+
</header>
167181

168182
{% else %}
169-
<header class="grad">
170-
<div class="container build-slide">
171-
<div class="row pt-5">
172-
<div class="col-12 col-md-6 d-flex flex-column justify-content-around">
173-
<h1 class="mt-5">{{ landingBanner.slides.0.title }}</h1>
174-
<p class="font-bigger-4 text-grey-400 font-weight-300">{{ landingBanner.slides.0.subtitle }}</p>
175-
</div>
176-
<div class="col-12 col-md-6 header-image">
177-
<img class="mt-5" src="{{ landingBanner.slides.0.img }}">
183+
<!-- custom slide -->
184+
<header class="grad home-carousel">
185+
<div class="container build-slide">
186+
<div class="row pt-5">
187+
<div class="grants" style="background-image: url('{{ landingBanner.slides.0.backgroundImage }}')">
188+
<div class="d-flex flex-column justify-content-around container">
189+
<h3 class="dates gc-font-heading">{{ landingBanner.slides.0.title }}</h3>
190+
<img src="{{ landingBanner.slides.0.img }}">
191+
<h5>{{ landingBanner.slides.0.subtitle }}</h5>
192+
<a class="btn btn-lg btn-outline-primary" href="{{ landingBanner.slides.0.buttonLink}} ">
193+
{{ landingBanner.slides.0.buttonCTA }}
194+
</a>
195+
</div>
196+
</div>
178197
</div>
179198
</div>
180-
</div>
181-
</header>
182-
199+
</header>
183200
{% endif %}
184201

185202
<section class="container my-5">

app/retail/views.py

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def index(request):
107107

108108
if len(slides) == 0:
109109
landingBanner = {
110+
'default': True,
110111
'slides': [
111112
{
112113
'img': static('v2/images/home/Flying_ppl_optimized.svg'),
@@ -120,6 +121,7 @@ def index(request):
120121

121122
except:
122123
landingBanner = {
124+
'default': True,
123125
'slides': [
124126
{
125127
'img': static('v2/images/home/Flying_ppl_optimized.svg'),

0 commit comments

Comments
 (0)