From d7188a1a434d39183be8d7dfccb3790fc1058d68 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Fri, 21 Nov 2025 10:43:10 +1100 Subject: [PATCH] Show public functions on landing page as well --- app.py | 5 ++- templates/landing_page.html | 71 +++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 0614712..a9b6946 100644 --- a/app.py +++ b/app.py @@ -76,7 +76,10 @@ def map_isolator_response_to_flask_response(response): @ app.route("/", methods=["GET"]) def landing_page(): - return render_template("landing_page.html", name='Try me', script=DEFAULT_SCRIPT, environment_info=DEFAULT_ENVIRONMENT) + public_functions = db.get_public_http_functions() + # Limit to top 6 for the landing page + public_functions = public_functions[:6] if public_functions else [] + return render_template("landing_page.html", name='Try me', script=DEFAULT_SCRIPT, environment_info=DEFAULT_ENVIRONMENT, public_functions=public_functions) @app.route("/documentation", methods=["GET"]) def documentation(): diff --git a/templates/landing_page.html b/templates/landing_page.html index 6d48a41..84fbeee 100644 --- a/templates/landing_page.html +++ b/templates/landing_page.html @@ -136,6 +136,77 @@ }) + {% if public_functions %} +
+
+

+ Community Highlights +

+
+
+
+ +
+ {% for func in public_functions %} +
+
+

+ {{ func.name }} +

+ + {{ func.runtime }} + +
+ + + +
+

+ {{ func.description or "No description provided." }} +

+ +
+
+ + + + {{ func.username }} +
+ + View & Fork → + +
+
+
+ {% endfor %} +
+ + +
+
+ {% endif %} +

Features