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 }} + + + + + + + + + View Details + + + + + + + {{ func.description or "No description provided." }} + + + + + + + + {{ func.username }} + + + View & Fork → + + + + + {% endfor %} + + + + + Explore All Functions + + + + + {% endif %} + Features
+ {{ func.description or "No description provided." }} +