diff --git a/hubsrht/blueprints/public.py b/hubsrht/blueprints/public.py index 64d0d2d..58301ff 100644 --- a/hubsrht/blueprints/public.py +++ b/hubsrht/blueprints/public.py @@ -61,3 +61,14 @@ def project_index(): return render_template("project-index.html", projects=projects, search=search, features=features, sort=sort, **pagination) + +@public.route("/projects/featured") +def featured_projects(): + features = (Feature.query + .join(Project, Feature.project_id == Project.id) + .join(User, Project.owner_id == User.id) + .filter(Project.visibility == Visibility.public) + .order_by(Feature.created.desc())) + features, pagination = paginate_query(features) + return render_template("featured-projects.html", + features=features, **pagination) diff --git a/hubsrht/templates/featured-projects.html b/hubsrht/templates/featured-projects.html new file mode 100644 index 0000000..ddd605f --- /dev/null +++ b/hubsrht/templates/featured-projects.html @@ -0,0 +1,33 @@ +{% extends "layout-full.html" %} +{% block title %} +
+ {{feature.summary | md}} ++