From 0d1e88f23ecbd2fef55ae670e9b85b11d8dbb326 Mon Sep 17 00:00:00 2001 From: JS Ng Date: Thu, 1 Oct 2026 15:40:50 +0800 Subject: [PATCH] fix: landing page CTA respects auth state (closes #15) index.html hardcoded the Sign In CTAs, so a signed-in user landing on / saw "Sign In to Get Started" in the hero (and "Sign In Now" at the bottom) while the navbar already showed their identity. Branch both CTAs on g.user: signed in -> Go to Dashboard (/dashboard), signed out -> current Sign In CTAs. --- apps/admin/templates/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/admin/templates/index.html b/apps/admin/templates/index.html index eacf980..01f058b 100644 --- a/apps/admin/templates/index.html +++ b/apps/admin/templates/index.html @@ -13,7 +13,11 @@

Welcome to Campus Admin Portal

Your comprehensive solution for managing campus operations, student records, faculty information, and administrative tasks all in one place.

+ {% if g.user %} + Go to Dashboard + {% else %} Sign In to Get Started + {% endif %}
Reports & Analytics
+ {% if g.user %} +

Welcome Back

+

Go to your dashboard to manage campus clients and users.

+ Go to Dashboard + {% else %}

Ready to Get Started?

Sign in to access your campus administration dashboard.

Sign In Now + {% endif %}
{% endblock %}