mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 09:33:44 +01:00
Replace Popular with Top Mods
This commit is contained in:
parent
de9135f44f
commit
137a6928bc
@ -25,15 +25,15 @@ Welcome
|
||||
<a href="{{ url_for('packages_page', sort='created_at', order='desc') }}" class="btn btn-secondary float-right">
|
||||
See more
|
||||
</a>
|
||||
<h2 class="my-3">Newly Added</h2>
|
||||
<h2 class="my-3">Recently Added</h2>
|
||||
{{ render_pkggrid(new) }}
|
||||
|
||||
|
||||
<a href="{{ url_for('packages_page', sort='score', order='desc') }}" class="btn btn-secondary float-right">
|
||||
<a href="{{ url_for('packages_page', type='mod', sort='score', order='desc') }}" class="btn btn-secondary float-right">
|
||||
See more
|
||||
</a>
|
||||
<h2 class="my-3">Popular</h2>
|
||||
{{ render_pkggrid(popular) }}
|
||||
<h2 class="my-3">Top Mods</h2>
|
||||
{{ render_pkggrid(pop_mod) }}
|
||||
|
||||
|
||||
<a href="{{ url_for('packages_page', type='game', sort='score', order='desc') }}" class="btn btn-secondary float-right">
|
||||
|
@ -49,11 +49,11 @@ def home_page():
|
||||
query = Package.query.filter_by(approved=True, soft_deleted=False)
|
||||
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_mod = query.filter_by(type=PackageType.MOD).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", count=count, \
|
||||
new=new, popular=popular, pop_txp=pop_txp, pop_gam=pop_gam)
|
||||
new=new, pop_mod=pop_mod, pop_txp=pop_txp, pop_gam=pop_gam)
|
||||
|
||||
from . import users, githublogin, packages, meta, threads, api
|
||||
from . import tasks, admin, notifications, tagseditor, licenseseditor
|
||||
|
Loading…
Reference in New Issue
Block a user