]> git.parisson.com Git - mezzo.git/commitdiff
update home
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 7 Apr 2016 14:47:19 +0000 (16:47 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 7 Apr 2016 14:47:19 +0000 (16:47 +0200)
app/festival/templates/festival/audio_playlist.html [deleted file]
app/festival/templates/festival/inc/audio_playlist.html [new file with mode: 0644]
app/festival/templatetags/festival_tags.py
app/templates/blog/includes/post_card.html
app/templates/index.html

diff --git a/app/festival/templates/festival/audio_playlist.html b/app/festival/templates/festival/audio_playlist.html
deleted file mode 100644 (file)
index 18bc921..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% load staticfiles %}
-
-{% for audio in playlist.audios.all %}
-{% if forloop.first %}
-<audio id="audio" preload="auto" tabindex="0" controls="" >
-    <source id="primarysrc" src="{{ audio.closed_source_url }}">
-    <source id="secondarysrc" src="{{ audio.open_source_url }}">
-    {{ audio.title }}
-</audio>
-<ul id="playlist">
-{% endif %}
-    <li class="active">
-        <a href="{{ audio.closed_source_url }}" data-altsrc="{{ audio.open_source_url }}">
-            {{ audio.title }}
-        </a>
-    </li>
-{% endfor %}
-{% if forloop.first %}
-</ul>
-{% endif %}
-
-<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
-<script src="{% static "js/player.js" %}"></script>
diff --git a/app/festival/templates/festival/inc/audio_playlist.html b/app/festival/templates/festival/inc/audio_playlist.html
new file mode 100644 (file)
index 0000000..18bc921
--- /dev/null
@@ -0,0 +1,23 @@
+{% load staticfiles %}
+
+{% for audio in playlist.audios.all %}
+{% if forloop.first %}
+<audio id="audio" preload="auto" tabindex="0" controls="" >
+    <source id="primarysrc" src="{{ audio.closed_source_url }}">
+    <source id="secondarysrc" src="{{ audio.open_source_url }}">
+    {{ audio.title }}
+</audio>
+<ul id="playlist">
+{% endif %}
+    <li class="active">
+        <a href="{{ audio.closed_source_url }}" data-altsrc="{{ audio.open_source_url }}">
+            {{ audio.title }}
+        </a>
+    </li>
+{% endfor %}
+{% if forloop.first %}
+</ul>
+{% endif %}
+
+<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
+<script src="{% static "js/player.js" %}"></script>
index e760556f2cebabe7e48f29047828254a75273b1e..b4b653b07d9c1e7b288b559fc4592b78ab8311f3 100644 (file)
@@ -50,4 +50,4 @@ def featured_pages(*args):
 
 @register.as_tag
 def featured_posts(*args):
-    return BlogPost.objects.filter(featured=True)
+    return BlogPost.objects.all()[0]
index c867038e5f22c056e7fab248eb224dbb8f5d361d..1729c7a4f82875e98e887b52e10e42ea4b3cceca 100644 (file)
@@ -1,12 +1,12 @@
 <div class="artist__item msry__item">
     <div class="artist__item__inner">
-        <a href="{% url 'festival-artist-detail' artist.slug %}" class="artist__item__inner">
+        <a href="{% url 'blog_post_detail' post.slug %}" class="artist__item__inner">
             <figure class="artist__item__img">
-                <img src="{% if artist.photo_featured %}{{ MEDIA_URL }}/{{ artist.photo_featured }}{% elif artist.photo %}{{ MEDIA_URL }}/{{ artist.photo }}{% else %}{% endif %}" alt="Portrait {{ artist.name }}">
+                <img src="{{ MEDIA_URL }}/{{ post.photo_featured }}" alt="Article: {{ post.title }}">
             </figure>
             <h3 class="artist__item__name">
                 <span>
-                    {{ artist.name }}
+                    {{ post.title }}
                 </span>
             </h3>
         </a>
index 21f08737778713bd936594817e41c2237dd81c13..7ee98a7de792fa1bc2b598d6b386094b456ce654 100644 (file)
@@ -9,16 +9,29 @@
 
 {% block main %}
 
+{% featured_edito as edito %}
+{{ edito.content|safe|slice:":512" }}...
+<br>
+<a href="{% url 'page' edito.slug %}">{% trans "Read more" %}</a>
+<br>
+
+{% featured_posts as post %}
+<h3>{% trans "Article" %}</h3>
+{% include 'blog/includes/post_card.html' %}
+<a href="{% url 'blog_post_list' %}">{% trans "All" %} {% trans "articles" %}</a>
+
 {% featured_artist as artist %}
+<h3>{% trans "Artist" %}</h3>
 {% include "festival/inc/artist_card.html" %}
+<a href="{% url 'festival-artist-list' %}">{% trans "All" %} {% trans "artists" %}</a>
 
 {% featured_video as video %}
+<h3>{% trans "Video" %}</h3>
 {% include 'festival/inc/video_card.html' %}
-
-{% featured_edito as page %}
-{% include 'festival/audio_playlist.html' %}
+<a href="{% url 'festival-video-list' %}">{% trans "All" %} {% trans "videos" %}</a>
 
 {% featured_playlist as playlist %}
-{% include 'festival/audio_playlist.html' %}
+<h3>{% trans "Playlist" %}</h3>
+{% include 'festival/inc/audio_playlist.html' %}
 
 {% endblock %}