diff --git a/app/templates/index.html b/app/templates/index.html
index fde897f8..b37228ca 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -4,8 +4,8 @@
Welcome
{% endblock %}
-{% block container %}
-
+{% block content %}
+
{% from "macros/packagegridtile.html" import render_pkggrid %}
- Popular
- {{ render_pkggrid(popular) }}
- Show More
-
- Newly Added
+
+ See more
+
+ Newly Added
{{ render_pkggrid(new) }}
-
+
+
+ See more
+
+ Popular
+ {{ render_pkggrid(popular) }}
+
+
+
+ See more
+
+ Top Texture Packs
+ {{ render_pkggrid(pop_txp) }}
+
+
{% endblock %}
diff --git a/app/templates/macros/packagegridtile.html b/app/templates/macros/packagegridtile.html
index 6c79ee6f..8a41c354 100644
--- a/app/templates/macros/packagegridtile.html
+++ b/app/templates/macros/packagegridtile.html
@@ -40,11 +40,7 @@
{% else %}
No packages available
{% endfor %}
- {% set amt=packages|length %}
- {% if amt > 4 %}
- {% set amt=4 %}
- {% endif %}
- {% for i in range(amt) %}
+ {% for i in range(4) %}
{% endfor %}
diff --git a/app/views/__init__.py b/app/views/__init__.py
index 6c19b0c8..b53361bf 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -48,9 +48,10 @@ def send_upload(path):
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(12).all()
+ new = query.order_by(db.desc(Package.created_at)).limit(8).all()
popular = query.order_by(db.desc(Package.score)).limit(8).all()
- return render_template("index.html", new=new, popular=popular, count=count)
+ 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)
from . import users, githublogin, packages, meta, threads, api
from . import tasks, admin, notifications, tagseditor, licenseseditor