From 76afaf140d1d09af5f50df32146cac868d6d0086 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 1 Nov 2016 12:21:49 +0100 Subject: [PATCH] [mod] simplify template --- .../templates/sections/full-picture.html | 73 ++++++++++--------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/prosopopee/themes/exposure/templates/sections/full-picture.html b/prosopopee/themes/exposure/templates/sections/full-picture.html index 4e087bf..df3f218 100644 --- a/prosopopee/themes/exposure/templates/sections/full-picture.html +++ b/prosopopee/themes/exposure/templates/sections/full-picture.html @@ -1,16 +1,42 @@ {% if section.image.type == "video" %} -{% set video = Video(section.image) %} -{{ video.copy() }} + {% set video = Video(section.image) %} + {{ video.copy() }} + +
+
+ {% if section.text %} +
+
+

{{ section.text.title }}

+

{{ section.text.sub_title }}

+ {% if section.text.date_end %} +
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
+ {% else %} + {% if section.text.date %} +
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} + {% endif %} +
+
+ {% endif %} + + + + + +
+
+ {% else %} -{% set image = Image(section.image) %} -{{ image.copy() }} -{% endif %} -{% if video %} -
-
- {% if section.text %} -
-
+ {% set image = Image(section.image) %} + {{ image.copy() }} + +
+ + {% if section.text %} +
+

{{ section.text.title }}

{{ section.text.sub_title }}

{% if section.text.date_end %} @@ -21,28 +47,7 @@ {% endif %}
- {% endif %} - - -
-
-{% else %} -
- {% if section.text %} -
-
-

{{ section.text.title }}

-

{{ section.text.sub_title }}

- {% if section.text.date_end %} -
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
- {% else %} - {% if section.text.date %} -
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} - {% endif %} -
-
{% endif %} -
+ + {% endif %}