Add site header to login/register pages, link confirmation message to sign-in

login.php and register.php were standalone pages with no way back to the
rest of the site — reusing the same sticky pub-nav header already used on
index.php and profile.php (brand link + Sign In/Get Started), restructured
each page's centered login-box inside a .login-page wrapper so the nav can
sit above it instead of getting pulled into the centering flexbox.

Also: the "check your email to confirm" message after registering had no
way forward once you'd actually confirmed — added a "sign in here" link.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 10:35:27 -07:00
parent c7f1bdd630
commit 524860df1f
2 changed files with 25 additions and 2 deletions
+12 -1
View File
@@ -61,9 +61,19 @@ $reset_msg = isset($_GET['reset']) ? 'Password reset successfully. Pleas
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="<?= BASE_URL ?>/favicon.svg"> <link rel="icon" type="image/svg+xml" href="<?= BASE_URL ?>/favicon.svg">
<title>Login — <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></title> <title>Login — <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></title>
<link rel="stylesheet" href="<?= BASE_URL ?>/assets/css/public.css">
<link rel="stylesheet" href="<?= BASE_URL ?>/assets/css/setup.css"> <link rel="stylesheet" href="<?= BASE_URL ?>/assets/css/setup.css">
</head> </head>
<body class="login-page"> <body>
<nav class="pub-nav">
<a href="<?= BASE_URL ?>/" class="pub-nav-brand">&#x271D; <span><?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></span></a>
<div class="pub-nav-links">
<a href="<?= BASE_URL ?>/register" class="btn-nav">Get Started</a>
</div>
</nav>
<div class="login-page">
<div class="login-box"> <div class="login-box">
<h1>&#x271D; <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></h1> <h1>&#x271D; <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></h1>
<h2>Sign In</h2> <h2>Sign In</h2>
@@ -100,5 +110,6 @@ $reset_msg = isset($_GET['reset']) ? 'Password reset successfully. Pleas
<a href="<?= BASE_URL ?>/register" style="color:#1e3a5f">Create an account</a> <a href="<?= BASE_URL ?>/register" style="color:#1e3a5f">Create an account</a>
</div> </div>
</div> </div>
</div>
</body> </body>
</html> </html>
+13 -1
View File
@@ -131,12 +131,22 @@ if (!$success) {
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="<?= BASE_URL ?>/favicon.svg"> <link rel="icon" type="image/svg+xml" href="<?= BASE_URL ?>/favicon.svg">
<title>Register — <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></title> <title>Register — <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></title>
<link rel="stylesheet" href="<?= BASE_URL ?>/assets/css/public.css">
<link rel="stylesheet" href="<?= BASE_URL ?>/assets/css/setup.css"> <link rel="stylesheet" href="<?= BASE_URL ?>/assets/css/setup.css">
<?php if (recaptcha_enabled()): ?> <?php if (recaptcha_enabled()): ?>
<script src="https://www.google.com/recaptcha/api.js?render=<?= urlencode(get_setting('recaptcha_site_key')) ?>"></script> <script src="https://www.google.com/recaptcha/api.js?render=<?= urlencode(get_setting('recaptcha_site_key')) ?>"></script>
<?php endif; ?> <?php endif; ?>
</head> </head>
<body class="login-page"> <body>
<nav class="pub-nav">
<a href="<?= BASE_URL ?>/" class="pub-nav-brand">&#x271D; <span><?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></span></a>
<div class="pub-nav-links">
<a href="<?= BASE_URL ?>/login">Sign In</a>
</div>
</nav>
<div class="login-page">
<div class="login-box" style="max-width:460px"> <div class="login-box" style="max-width:460px">
<h1>&#x271D; <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></h1> <h1>&#x271D; <?= htmlspecialchars(get_setting('site_name', APP_NAME)) ?></h1>
<h2>Create Account</h2> <h2>Create Account</h2>
@@ -149,6 +159,7 @@ if (!$success) {
<?php else: ?> <?php else: ?>
<div class="alert alert-success"> <div class="alert alert-success">
Account created! Please check your email to confirm your address before logging in. Account created! Please check your email to confirm your address before logging in.
Once confirmed, <a href="<?= BASE_URL ?>/login">sign in here</a>.
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
@@ -211,6 +222,7 @@ if (!$success) {
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>
<?php if (recaptcha_enabled()): ?> <?php if (recaptcha_enabled()): ?>
<script> <script>