Commit 0adda5e4 authored by fred's avatar fred

arrange elements in two columns

parent 4d3e1e0d
......@@ -165,6 +165,7 @@ div#content h2 {
position: relative;
top: 4px;
background: url(../images/a22.gif) bottom repeat-x;
clear: both;
}
div#content ul {
......@@ -390,6 +391,15 @@ a.actually-not-that-friendly:hover {
background: #d01311;
}
div.two-columns ul.episode-list {
-webkit-column-count: 1;
}
div.two-columns > div {
width: 48%;
margin-right: 1%;
float: left;
}
.input-append {
margin-left: 10px;
......@@ -401,6 +411,11 @@ a.actually-not-that-friendly:hover {
padding: 0;
}
div.two-columns > div > ul {
max-height: 20em;
overflow-y: auto;
}
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: FontAwesome;
font-weight: normal;
......
......@@ -5,28 +5,32 @@
{% for emission in emissions %}
<h2>{{ emission.title }}</h2>
<a class="big-friendly-button" href="{% url 'episode-add' emission_slug=emission.slug %}">Ajouter un épisode</a>
<a class="big-friendly-button" href="{% url 'emission-newsitem-add' emission_slug=emission.slug %}">Ajouter une actu</a>
<a class="big-friendly-button" href="{% url 'emission-update' slug=emission.slug %}">Modifier l'émission</a>
<div class="two-columns">
<div>
<h4>Épisodes récents</h4>
<ul class="episode-list">
{% for episode in emission.get_sorted_episodes|slice:":10" %}
{% for episode in emission.get_sorted_episodes|slice:":5" %}
<li>{{ episode.diffusion_set.all.0.datetime|date:"d E o H:i"|lower }}
<br/>   <a href="{% url 'episode-view' emission_slug=emission.slug slug=episode.slug %}">{{ episode.title }}</a>
{% if episode.has_sound %}<span class="icon-music"/>{%endif%}
</li>
{% endfor %}
</ul>
</div>
<div>
<h4>Actus récentes</h4>
<ul class="episode-list">
{% for newsitem in emission.get_sorted_newsitems|slice:":10" %}
{% for newsitem in emission.get_sorted_newsitems|slice:":5" %}
<li>{{ newsitem.datetime|date:"d E o H:i"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
......@@ -34,6 +38,9 @@
Aucune actu.
{% endfor %}
</ul>
</div>
</div> <!-- .two-columns -->
{% endfor %}
......@@ -47,11 +54,11 @@ Aucune actu.
<li>{{ newsitem.datetime|date:"d E o H:i"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
{% empty %}
Aucune actu.
{% endfor %}
</ul>
{% empty %}
Aucune actu.
{% endfor %}
{% endblock %}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment