From 703a90bcb011a3d1234eea85b3eaec1e674e6f9b Mon Sep 17 00:00:00 2001 From: Mark Gibson Date: Thu, 18 Apr 2024 09:52:51 +0100 Subject: [PATCH] Move page specific css into own files Use CSS to reveal quiz options rather than streaming delays, which no longer works in Chrome Add a 'ready' class to body after page load --- components/Page.tsx | 2 + lib/handle_route_static_dir.ts | 24 ++++++----- routes.ts | 4 ++ routes/_static/main.css | 64 ----------------------------- routes/_static/ready.js | 3 ++ routes/async.tsx | 8 ++++ routes/calc/_static/calc.css | 6 +++ routes/calc/index.tsx | 2 + routes/ex/_static/ex.css | 12 ++++++ routes/ex/index.tsx | 2 + routes/quiz/_components/Quiz.tsx | 8 ++-- routes/quiz/_static/quiz.css | 69 ++++++++++++++++++++++++++++++++ routes/quiz/index.tsx | 3 ++ routes/quote/_static/tv.js | 4 +- routes/todo/:listId/index.tsx | 3 ++ routes/todo/_static/todo.css | 5 +++ 16 files changed, 139 insertions(+), 80 deletions(-) create mode 100644 routes/_static/ready.js create mode 100644 routes/calc/_static/calc.css create mode 100644 routes/ex/_static/ex.css create mode 100644 routes/quiz/_static/quiz.css create mode 100644 routes/todo/_static/todo.css diff --git a/components/Page.tsx b/components/Page.tsx index a7a3c23..e2c27d9 100644 --- a/components/Page.tsx +++ b/components/Page.tsx @@ -56,6 +56,8 @@ export function Page({ req, children, reqURL, module, ...props }: Props) {
©️ {new Date().getFullYear()} Mark Gibson
+ +