summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2017-07-30 07:09:19 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2017-07-30 07:10:55 (GMT)
commite6ac1e596cd85c562a09ffb6961438b9afb06468 (patch)
tree2f14a0c3febdcbca0cbf2e11b5522a07a96781fc
parent6fe5e0552718110a9cbb40470740d76c57073bbf (diff)
downloadpublik-website-e6ac1e596cd85c562a09ffb6961438b9afb06468.zip
publik-website-e6ac1e596cd85c562a09ffb6961438b9afb06468.tar.gz
publik-website-e6ac1e596cd85c562a09ffb6961438b9afb06468.tar.bz2
let intro picture be configured from backoffice
-rw-r--r--static/css/combo-style.css43
-rw-r--r--static/js/combo.public.js2
-rw-r--r--templates/combo/cells/intro/text-cell.html5
3 files changed, 14 insertions, 36 deletions
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%;
+}
+
+div.textcell.intro .intro-picture {
+ background-repeat: no-repeat;
+ background-position: 50% 60%;
background-size: cover;
border: none;
+ height: 500px;
}
-div.intro > div {
+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 @@
+<div class="intro-picture" style="background-image: url({{cell.page.picture.url}});">
+<div>
+{{cell.text|safe}}
+</div>
+</div>