From 2b1c1a6ac7b331f10d411e29a242a498cf5887e2 Mon Sep 17 00:00:00 2001 From: Martin Alexander Kaminski Date: Thu, 26 Nov 2026 00:09:45 +0100 Subject: [PATCH] feat: add logo and progress bar to global loading state --- .../app/components/MainLoading/MainLoading.tsx | 16 ++++++++++++++-- frontend/app/index.css | 12 ++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/MainLoading/MainLoading.tsx b/frontend/app/components/MainLoading/MainLoading.tsx index 54d8b826..f0429fdc 100644 --- a/frontend/app/components/MainLoading/MainLoading.tsx +++ b/frontend/app/components/MainLoading/MainLoading.tsx @@ -1,8 +1,20 @@ function MainLoading() { return (
-

Welcome to Readr!

-

Loading...

+ Readr logo + {/* Progress bar that never fills up. Hidden with reduced motion, where it would look stuck at a third */} + {/* Div used for a non-interactive and decorative-only element */} +
); } diff --git a/frontend/app/index.css b/frontend/app/index.css index ab57916f..b7388ca9 100644 --- a/frontend/app/index.css +++ b/frontend/app/index.css @@ -88,6 +88,18 @@ transform: translateY(-0.75rem); } } + + --animate-loading-bar: loading-bar 1.5s ease-in-out infinite; + + /* Slides a bar that is a third of its track's width from fully outside the left edge to fully outside the right edge */ + @keyframes loading-bar { + from { + transform: translateX(-100%); + } + to { + transform: translateX(300%); + } + } } :root {