let intro picture be configured from backoffice

This commit is contained in:
Frédéric Péters 2017-07-30 09:09:19 +02:00
parent 6fe5e05527
commit e6ac1e596c
3 changed files with 16 additions and 38 deletions

View File

@ -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;
}

View File

@ -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',

View File

@ -0,0 +1,5 @@
<div class="intro-picture" style="background-image: url({{cell.page.picture.url}});">
<div>
{{cell.text|safe}}
</div>
</div>