From ffec79cbec26cd2ebe5a18d5e6a345f436f18073 Mon Sep 17 00:00:00 2001 From: blake Date: Mon, 2 Nov 2026 11:46:46 -0600 Subject: [PATCH] feat: enhance signup form with new styling and noindex functionality Added new CSS styles for the signup form, including a grid layout and improved note visibility. Updated the application logic to include a noindex option for specific pages, ensuring search engines do not index sensitive content. Modified tests to verify the presence of new elements and the correct application of noindex headers. --- public/css/app.css | 21 +++++++++++++++++++++ src/app.tsx | 8 +++++++- src/pages.tsx | 9 +++++++-- tests/public-pages.test.ts | 18 ++++++++++++++++-- tests/signup.test.ts | 1 + 5 files changed, 52 insertions(+), 5 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 9c90199..f638256 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1794,6 +1794,27 @@ article.shift-card { font-size: 1.6rem; } +.signup-lead { + display: grid; + gap: 0.4rem; +} + +.signup-lead p { + margin: 0; + line-height: 1.5; +} + +.signup-note { + font-size: 0.92rem; + line-height: 1.45; + color: var(--hope-ink-2); +} + +.signup-form .hint { + font-size: 0.92rem; + line-height: 1.45; +} + .name-pair { display: grid; grid-template-columns: 1fr 1fr; diff --git a/src/app.tsx b/src/app.tsx index 6ea8ce6..eca9ce2 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -71,6 +71,8 @@ export function createApp( at, `${only.title} · Hope Volunteer`, , + 200, + { noindex: true }, ); } return page( @@ -99,6 +101,8 @@ export function createApp( at, `${event.title} · Hope Volunteer`, , + 200, + { noindex: true }, ); }); @@ -142,11 +146,13 @@ function page( title: string, body: Child, status: 200 | 404 | 500 = 200, + options?: { noindex?: boolean }, ) { c.header('Cache-Control', 'no-store'); + if (options?.noindex) c.header('X-Robots-Tag', 'noindex'); const account = readSession(db, c.req.header('cookie'), now); return c.html( - + {body} , status, diff --git a/src/pages.tsx b/src/pages.tsx index 83778a7..a363e52 100644 --- a/src/pages.tsx +++ b/src/pages.tsx @@ -26,6 +26,7 @@ export function Layout(props: { title: string; path?: string; turnstile?: boolean; + noindex?: boolean; account?: { csrf: string } | null; children?: Child; }) { @@ -44,6 +45,7 @@ export function Layout(props: { + {props.noindex ? : null} {props.title} @@ -1041,7 +1043,10 @@ function SignupForm(props: { config: AppConfig; shiftId: number; remaining: numb return (