diff options
-rw-r--r-- | app/templates/index.html | 7 | ||||
-rw-r--r-- | app/views/__init__.py | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/app/templates/index.html b/app/templates/index.html index 83750ee..634224b 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -36,6 +36,13 @@ Welcome {{ render_pkggrid(popular) }} + <a href="{{ url_for('packages_page', type='game', sort='score', order='desc') }}" class="btn btn-secondary float-right"> + See more + </a> + <h2 class="my-3">Top Games</h2> + {{ render_pkggrid(pop_gam) }} + + <a href="{{ url_for('packages_page', type='txp', sort='score', order='desc') }}" class="btn btn-secondary float-right"> See more </a> diff --git a/app/views/__init__.py b/app/views/__init__.py index b53361b..6e4794b 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -50,8 +50,10 @@ def home_page(): count = query.count() new = query.order_by(db.desc(Package.created_at)).limit(8).all() popular = query.order_by(db.desc(Package.score)).limit(8).all() + pop_gam = query.filter_by(type=PackageType.GAME).order_by(db.desc(Package.score)).limit(4).all() pop_txp = query.filter_by(type=PackageType.TXP).order_by(db.desc(Package.score)).limit(4).all() - return render_template("index.html", new=new, popular=popular, count=count, pop_txp=pop_txp) + return render_template("index.html", count=count, \ + new=new, popular=popular, pop_txp=pop_txp, pop_gam=pop_gam) from . import users, githublogin, packages, meta, threads, api from . import tasks, admin, notifications, tagseditor, licenseseditor |