From c91822725f87cb711df159f00837da65bb63593c Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 7 Apr 2016 16:47:19 +0200 Subject: [PATCH] update home --- .../festival/{ => inc}/audio_playlist.html | 0 app/festival/templatetags/festival_tags.py | 2 +- app/templates/blog/includes/post_card.html | 6 +++--- app/templates/index.html | 21 +++++++++++++++---- 4 files changed, 21 insertions(+), 8 deletions(-) rename app/festival/templates/festival/{ => inc}/audio_playlist.html (100%) diff --git a/app/festival/templates/festival/audio_playlist.html b/app/festival/templates/festival/inc/audio_playlist.html similarity index 100% rename from app/festival/templates/festival/audio_playlist.html rename to app/festival/templates/festival/inc/audio_playlist.html diff --git a/app/festival/templatetags/festival_tags.py b/app/festival/templatetags/festival_tags.py index e760556f..b4b653b0 100644 --- a/app/festival/templatetags/festival_tags.py +++ b/app/festival/templatetags/festival_tags.py @@ -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] diff --git a/app/templates/blog/includes/post_card.html b/app/templates/blog/includes/post_card.html index c867038e..1729c7a4 100644 --- a/app/templates/blog/includes/post_card.html +++ b/app/templates/blog/includes/post_card.html @@ -1,12 +1,12 @@
- +
- Portrait {{ artist.name }} + Article: {{ post.title }}

- {{ artist.name }} + {{ post.title }}

diff --git a/app/templates/index.html b/app/templates/index.html index 21f08737..7ee98a7d 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -9,16 +9,29 @@ {% block main %} +{% featured_edito as edito %} +{{ edito.content|safe|slice:":512" }}... +
+{% trans "Read more" %} +
+ +{% featured_posts as post %} +

{% trans "Article" %}

+{% include 'blog/includes/post_card.html' %} +{% trans "All" %} {% trans "articles" %} + {% featured_artist as artist %} +

{% trans "Artist" %}

{% include "festival/inc/artist_card.html" %} +{% trans "All" %} {% trans "artists" %} {% featured_video as video %} +

{% trans "Video" %}

{% include 'festival/inc/video_card.html' %} - -{% featured_edito as page %} -{% include 'festival/audio_playlist.html' %} +{% trans "All" %} {% trans "videos" %} {% featured_playlist as playlist %} -{% include 'festival/audio_playlist.html' %} +

{% trans "Playlist" %}

+{% include 'festival/inc/audio_playlist.html' %} {% endblock %} -- 2.39.5