refonte avec Django

This commit is contained in:
nyanloutre 2019-09-01 12:13:50 +02:00
parent bcb37a8862
commit bc6add0029
162 changed files with 572 additions and 1558 deletions

View file

@ -0,0 +1,155 @@
{% load static %}
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Site de la musique de Meyenheim">
<meta name="author" content="Paul TREHIOU">
<title>Musique fraternité - Évènements</title>
{% include "include_head.html" %}
<link href="{% static "timeline.css" %}" rel="stylesheet">
<style>
@media (min-width: 768px) {
.navbar-default .nav > li > a,
.navbar-default .nav > li > a:focus {
color: #222222;
}
.navbar-default .nav > li > a:hover,
.navbar-default .nav > li > a:focus:hover {
color: #F05F40;
}
}
.timeline-body > a > img {
margin-left: auto;
margin-right: auto;
display: block;
margin-bottom: 15px;
}
</style>
</head>
<body id="page-top">
{% include "navbar.html" %}
{% if liste_evenements %}
{% for evenement in liste_evenements %}
{% ifchanged evenement.annee evenement.evenement_passe %}
{% if not forloop.first %}
</ul>
</div>
</section>
{% endif %}
<section id="timeline">
<div class="container">
{% ifchanged evenement.evenement_passe %}
<div class="page-header">
<h1 id="timeline">{{ evenement.evenement_passe | yesno:"Évènements passés, Evènements à venir" }}</h1>
</div>
{% endifchanged %}
{% ifchanged evenement.annee evenement.evenement_passe %}
<h2>{{ evenement.annee }}</h2>
{% endifchanged %}
<ul class="timeline">
{% endifchanged %}
<li class="{% cycle 'timeline-inverted' 'timeline' %}">
<div class="timeline-badge info"><i class="glyphicon {% cycle 'glyphicon-menu-right' 'glyphicon-menu-left' %}"></i></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h4 class="timeline-title">{{ evenement.titre }}</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-calendar"></i>{{ evenement.date }}</small></br>
<small class="text-muted"><i class="glyphicon glyphicon-time"></i>{{ evenement.heure_debut }} - {{ evenement.heure_fin }}</small></br>
<small class="text-muted"><i class="glyphicon glyphicon-map-marker"></i>{{ evenement.lieu }}</small></p>
</div>
<div class="timeline-body">
<a href="#pop_timeline_{{ forloop.counter }}" data-toggle="modal">
<img src="{{ evenement.illustration.url }}" class="img-responsive">
</a>
<hr>
<p>{{ evenement.description }}</p>
<!-- Popup -->
<div id="pop_timeline_{{ forloop.counter }}" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<img src="{{ evenement.illustration.url }}" class="img-responsive">
</div>
</div>
</div>
</div>
</div>
</div>
</li>
{% if forloop.last %}
</ul>
</div>
</section>
{% endif %}
{% endfor %}
{% endif %}
{% include "contact.html" %}
{% include "footer.html" %}
{% include "include_foot.html" %}
<script>
window.onload = function(){$('.carousel').each(function(){
var items = $(this).find(".item"),
heights = [],
tallest;
if (items.length) {
function normalizeHeights() {
items.each(function() { //add heights to array
heights.push($(this).height());
});
tallest = Math.max.apply(null, heights); //cache largest value
items.each(function() {
$(this).css('min-height',tallest + 'px');
});
};
normalizeHeights();
$(window).on('resize orientationchange', function () {
tallest = 0, heights.length = 0; //reset vars
items.each(function() {
$(this).css('min-height','0'); //reset min-height
});
normalizeHeights(); //run it again
});
}
})}
</script>
</body>
</html>