From 7d0a93483acb7b81b94813957b41fb863cc8ea25 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 18 Jul 2020 01:27:23 +0100 Subject: [PATCH] Reorder homepage sections --- app/blueprints/homepage/__init__.py | 4 ++-- app/templates/index.html | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/blueprints/homepage/__init__.py b/app/blueprints/homepage/__init__.py index 063aa922..03299484 100644 --- a/app/blueprints/homepage/__init__.py +++ b/app/blueprints/homepage/__init__.py @@ -26,8 +26,8 @@ def home(): updated = db.session.query(Package).select_from(PackageRelease).join(Package) \ .filter_by(soft_deleted=False, approved=True) \ .order_by(db.desc(PackageRelease.releaseDate)) \ - .limit(8).all() - updated = updated[:4] + .limit(20).all() + updated = updated[:8] reviews = PackageReview.query.filter_by(recommends=True).order_by(db.desc(PackageReview.created_at)).limit(5).all() diff --git a/app/templates/index.html b/app/templates/index.html index 3a80f8cf..896239d3 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -23,6 +23,13 @@ {% from "macros/packagegridtile.html" import render_pkggrid %} + + {{ _("See more") }} + +

{{ _("Recently Added") }}

+ {{ render_pkggrid(new) }} + + {{ _("See more") }} @@ -51,13 +58,6 @@ {{ render_pkggrid(pop_txp) }} - - {{ _("See more") }} - -

{{ _("Recently Added") }}

- {{ render_pkggrid(new) }} - - {{ _("See more") }} @@ -65,6 +65,7 @@ {% from "macros/reviews.html" import render_reviews %} {{ render_reviews(reviews, current_user, True) }} +
{{ _("CDB has %(count)d packages, with a total of %(downloads)d downloads.", count=count, downloads=downloads) }}