From e6ac1e596cd85c562a09ffb6961438b9afb06468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 30 Jul 2017 09:09:19 +0200 Subject: [PATCH] let intro picture be configured from backoffice --- static/css/combo-style.css | 47 +++++----------------- static/js/combo.public.js | 2 +- templates/combo/cells/intro/text-cell.html | 5 +++ 3 files changed, 16 insertions(+), 38 deletions(-) create mode 100644 templates/combo/cells/intro/text-cell.html diff --git a/static/css/combo-style.css b/static/css/combo-style.css index 9287de1..2fd4abc 100644 --- a/static/css/combo-style.css +++ b/static/css/combo-style.css @@ -109,12 +109,17 @@ div.textcell.intro { max-width: 100%; height: 500px; overflow: hidden; - background: url(../img/tram.jpg) no-repeat 50% 60%; - background-size: cover; - border: none; } -div.intro > div { +div.textcell.intro .intro-picture { + background-repeat: no-repeat; + background-position: 50% 60%; + background-size: cover; + border: none; + height: 500px; +} + +div.intro-picture > div { width: 600px; padding: 20px; margin: 0 auto; @@ -127,7 +132,7 @@ div.intro > div { font-size: 110%; } -@media(max-width: 668px) { div.intro > div { width: 90%; } } +@media(max-width: 668px) { div.intro-picture > div { width: 90%; } } div.textcell ul li { margin-top: 1ex; @@ -457,38 +462,6 @@ a.legal { right: 5px; } -.page-citoyens div.textcell.intro { - background-image: url(../img/fontaine3.jpg); -} - -.page-metier div.textcell.intro { - background-image: url(../img/ouvrier.jpg); -} - -.page-parametrage div.textcell.intro { - background-image: url(../img/circuits.jpg); -} - -.page-references div.textcell.intro { - background-image: url(../img/references.jpg); -} - -.page-contact div.textcell.intro { - background-image: url(../img/contact.jpg); -} - -.page-mentions-legales div.textcell.intro { - background-image: url(../img/mentions-legales.jpg); -} - -.page-dossier-presse div.textcell.intro { - background-image: url(../img/dossier-de-presse.jpg); -} - -.page-publik-2020 div.textcell.intro { - background-image: url(../img/diodes.jpg); -} - div.intro img { display: none; } diff --git a/static/js/combo.public.js b/static/js/combo.public.js index bf2fa0c..b46a351 100644 --- a/static/js/combo.public.js +++ b/static/js/combo.public.js @@ -1,5 +1,5 @@ $(function() { - $('.intro').parallax("60%", -0.2); + $('.intro-picture').parallax("60%", -0.2); $('.bistro').parallax("0%", 0.2); $('.bistro > div').parallax("2%", 1.2); $('a[href^="#"]').on('click', diff --git a/templates/combo/cells/intro/text-cell.html b/templates/combo/cells/intro/text-cell.html new file mode 100644 index 0000000..7d740ed --- /dev/null +++ b/templates/combo/cells/intro/text-cell.html @@ -0,0 +1,5 @@ +
+
+{{cell.text|safe}} +
+