]> git.0d.be Git - panikweb.git/commitdiff
templates: add more sounds/newsitems to homepage
authorFrédéric Péters <fpeters@0d.be>
Sat, 28 Dec 2019 13:58:06 +0000 (14:58 +0100)
committerFrédéric Péters <fpeters@0d.be>
Sat, 28 Dec 2019 13:58:58 +0000 (14:58 +0100)
panikweb/views.py
panikweb_templates/static/css/_specifics.scss

index 3314d71fbeac1abe84043d64f425aed350b1f007..1d0eb6d1b03b0ababa7add799fe1c0c99397a7a7 100644 (file)
@@ -512,7 +512,7 @@ class Home(TemplateView):
     def get_context_data(self, **kwargs):
         context = super(Home, self).get_context_data(**kwargs)
         context['emissions'] = Emission.objects.filter(archived=False).order_by('-creation_timestamp')[:3]
-        context['newsitems'] = NewsItem.objects.exclude(date__gt=date.today()).order_by('-date')[:3]
+        context['newsitems'] = NewsItem.objects.exclude(date__gt=date.today()).order_by('-date')[:6]
 
         context['soundfiles'] = SoundFile.objects.prefetch_related('episode__emission__categories').filter(
                 podcastable=True, fragment=False) \
@@ -522,7 +522,7 @@ class Home(TemplateView):
                     where=['''datetime = (SELECT MIN(datetime)
                                             FROM emissions_diffusion
                                         WHERE episode_id = emissions_episode.id)'''],
-                    tables=['emissions_diffusion'],).order_by('-creation_timestamp').distinct() [:3]
+                    tables=['emissions_diffusion'],).order_by('-creation_timestamp').distinct() [:6]
 
         context['newsletter_form'] = SubscribeForm()
 
index acaacb6d3bb62b8bcb603728545841c9e7c0f341..117673d156d637437fe456938950d2e3ade75fe9 100644 (file)
@@ -2187,14 +2187,14 @@ div.around-nav {
        overflow: hidden;
        & > div {
                display: flex;
-               width: 1000px;
        }
 }
 
 #recent-news div.newsitem-home,
 #recent-sounds div.episode.soundfile {
        background: white;
-       width: 10em;
+       width: 180px;
+       min-width: 180px;
        margin-right: 10px;
        display: inline-block;
        height: 220px;