Add range of date in full-picture

This commit is contained in:
Adrien Beudin 2016-03-30 11:12:30 +02:00
parent 749d7d7693
commit 51ada6267b
2 changed files with 19 additions and 9 deletions

View File

@ -2,12 +2,17 @@
{{ image.copy() }} {{ image.copy() }}
<section class="full-picture" style="background: transparent url('{{ image }}') no-repeat scroll center top / cover;"> <section class="full-picture" style="background: transparent url('{{ image }}') no-repeat scroll center top / cover;">
{% if section.text %} {% if section.text %}
<div class="picture-text"> <div class="picture-text">
<div class="picture-text-column"> <div class="picture-text-column">
<h1>{{ section.text.title }}</h1> <h1>{{ section.text.title }}</h1>
<h2>{{ section.text.sub_title }}</h2> <h2>{{ section.text.sub_title }}</h2>
{% if section.text.date %}<div class="datetime">{{ section.text.date.strftime("%d %B %Y") }}</div>{% endif %} {% if section.text.date_end }
</div> <div class="datetime">{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}</div>{% endif %}
{% else }
{% if section.text.date %}
<div class="datetime">{{ section.text.date.strftime("%d %B %Y") }}</div>{% endif %}
{% endif %}
</div> </div>
</div>
{% endif %} {% endif %}
</section> </section>

View File

@ -4,9 +4,14 @@
<div class="parallax"><img src="{{ image }}"></div> <div class="parallax"><img src="{{ image }}"></div>
{% if section.text %} {% if section.text %}
<div class="parallax-tittle white-text"> <div class="parallax-tittle white-text">
<h1>{{ section.text.title }}</h1> <h1>{{ section.text.title }}</h1>
<h2>{{ section.text.sub_title }}</h2> <h2>{{ section.text.sub_title }}</h2>
{% if section.text.date %}<div class="datetime">{{ section.text.date.strftime("%d %B %Y") }}</div>{% endif %} {% if section.text.date_end }
<div class="datetime">{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}</div>{% endif %}
{% else }
{% if section.text.date %}
<div class="datetime">{{ section.text.date.strftime("%d %B %Y") }}</div>{% endif %}
{% endif %}
</div> </div>
{% endif %} {% endif %}
</div> </div>