Add header_image to Article Index Page
This commit is contained in:
parent
1abbc707f3
commit
849d539478
2 changed files with 13 additions and 0 deletions
|
@ -40,6 +40,8 @@ class ArticleIndexPage(Page):
|
|||
'title_en',
|
||||
)
|
||||
|
||||
header_image = ImageChooserBlock(required=False)
|
||||
|
||||
intro_de = RichTextField(default='', blank=True)
|
||||
intro_fr = RichTextField(default='', blank=True)
|
||||
intro_en = RichTextField(default='', blank=True)
|
||||
|
@ -73,6 +75,7 @@ class ArticleIndexPage(Page):
|
|||
FieldPanel('intro_fr'),
|
||||
FieldPanel('title_en'),
|
||||
FieldPanel('intro_en'),
|
||||
ImageChooserPanel('header_image'),
|
||||
ImageChooserPanel('feed_image'),
|
||||
MultiFieldPanel(
|
||||
[
|
||||
|
|
|
@ -16,7 +16,17 @@
|
|||
</section>
|
||||
|
||||
{% else %}
|
||||
{% if page.header_image %}
|
||||
<div id="carousel-banner" class="slide">
|
||||
<div class="carousel-inner slick slick-initialized slick-slider" role="listbox">
|
||||
|
||||
<div class="slick-list draggable" tabindex="0"><div class="slick-track" style="opacity: 1; width: 1908px;"><div class="item slick-slide slick-active" data-slick-index="0" style="width: 1908px; position: relative; left: 0px; top: 0px; z-index: 900; opacity: 1;">
|
||||
<img style="background-image:url({{page.header_image}})">
|
||||
</div></div></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<section id="article-index" class="article-index-page">
|
||||
<div class="container">
|
||||
<h2>{{ page.trans_title }}</h2>
|
||||
|
|
Loading…
Reference in a new issue