diff --git a/prosopopee/themes/exposure/static/css/style-page.css b/prosopopee/themes/exposure/static/css/style-page.css index 7dd1cef..635c784 100644 --- a/prosopopee/themes/exposure/static/css/style-page.css +++ b/prosopopee/themes/exposure/static/css/style-page.css @@ -338,6 +338,7 @@ a.google { color: #333; } +.bordered-picture video, .picture video { position: absolute; top: 0; @@ -347,6 +348,12 @@ a.google { height: auto; } +.bordered-picture video { + width: 77%; + margin-left: 11.5%; + margin-right: 11.5%; +} + .bg-section { padding: 1px 0px; } diff --git a/prosopopee/themes/exposure/templates/sections/bordered-picture.html b/prosopopee/themes/exposure/templates/sections/bordered-picture.html index bc6ef98..7763842 100644 --- a/prosopopee/themes/exposure/templates/sections/bordered-picture.html +++ b/prosopopee/themes/exposure/templates/sections/bordered-picture.html @@ -1,22 +1,33 @@ +{% if section.image.type == "video" %} +{% set video = Video(section.image) %} +{% else %} {% set image = Image(section.image) %} {% set caption = section.text %} -{{ image.copy()}} -{% if section.background %} -
+{{ image.copy() }} {% endif %} -
- - -
{% if section.background %} +
+ {% endif %} +
+ {% if video %} + + + {% else %} + + + {% endif %} +
+ {% if section.background %}
{% endif %} diff --git a/prosopopee/themes/material/static/css/styles.css b/prosopopee/themes/material/static/css/styles.css index d92001a..05b0d55 100644 --- a/prosopopee/themes/material/static/css/styles.css +++ b/prosopopee/themes/material/static/css/styles.css @@ -127,6 +127,7 @@ main { height: 100%; } +.bordered-picture video, .picture video { position: absolute; top: 0; @@ -136,6 +137,12 @@ main { height: auto; } +.bordered-picture video { + width: 77%; + margin-left: 11.5%; + margin-right: 11.5%; +} + div#bg-section { padding: 1px 0px; } diff --git a/prosopopee/themes/material/templates/sections/bordered-picture.html b/prosopopee/themes/material/templates/sections/bordered-picture.html index b227bf4..0fac7ee 100644 --- a/prosopopee/themes/material/templates/sections/bordered-picture.html +++ b/prosopopee/themes/material/templates/sections/bordered-picture.html @@ -1,19 +1,31 @@ +{% if section.image.type == "video" %} +{% set video = Video(section.image) %} +{% else %} {% set image = Image(section.image) %} {% set caption = section.text %} -{{ image.copy()}} +{{ image.copy() }} +{% endif %} {% if section.background %}
-{% endif %} - -{% if section.background %} + {% endif %} +
+ {% if video %} + + + {% else %} + + + {% if caption %} +
+
{{ caption }}
+
+ {% endif %} +
+ {% endif %} +
+ {% if section.background %}
{% endif %} + diff --git a/prosopopee/themes/material/templates/sections/pictures-group.html b/prosopopee/themes/material/templates/sections/pictures-group.html index dd84510..d3cfc7a 100644 --- a/prosopopee/themes/material/templates/sections/pictures-group.html +++ b/prosopopee/themes/material/templates/sections/pictures-group.html @@ -19,7 +19,7 @@ {% if video %}
-