From 29f51e2ff5b3f53d870865d30a0beeef3b45bdc5 Mon Sep 17 00:00:00 2001 From: ZTatman Date: Mon, 8 Jun 2026 14:46:19 -0400 Subject: [PATCH] style(web): polish error page, update copy, and finalize btn/image styling Refine 401 guard dog page (quips, laser eye positions, brand image swap, opacity tuning), update landing page tagline/description copy, add img-wrapper utility and red hover to btn-primary, propagate rename in lockfile, and reformat long function signatures. Co-Authored-By: Claude Opus 4.6 --- web/app/main.py | 4 +- web/app/routers/setup.py | 4 +- web/app/static/css/input.css | 18 ++++++- web/app/templates/error.html | 38 +++++++------- web/app/templates/index.html | 4 +- web/uv.lock | 98 ++++++++++++++++++------------------ 6 files changed, 89 insertions(+), 77 deletions(-) diff --git a/web/app/main.py b/web/app/main.py index ad920b8..c59f41e 100644 --- a/web/app/main.py +++ b/web/app/main.py @@ -89,9 +89,7 @@ ERROR_TITLES = { @app.exception_handler(StarletteHTTPException) -async def http_exception_handler( - request: Request, exc: StarletteHTTPException -) -> Response: +async def http_exception_handler(request: Request, exc: StarletteHTTPException) -> Response: """Render a styled error page for browser requests, JSON for API clients.""" accept = request.headers.get("accept", "") if "text/html" in accept: diff --git a/web/app/routers/setup.py b/web/app/routers/setup.py index 95816ca..3107d53 100644 --- a/web/app/routers/setup.py +++ b/web/app/routers/setup.py @@ -46,9 +46,7 @@ async def _require_auth_if_configured( @router.get("", dependencies=[Depends(_require_auth_if_configured)]) -async def setup_page( - request: Request, db: Annotated[AsyncSession, Depends(get_db)] -) -> Response: +async def setup_page(request: Request, db: Annotated[AsyncSession, Depends(get_db)]) -> Response: """Render the setup wizard. Pre-fills fields when reconfiguring.""" existing = request.app.state.app_settings user_count = await db.scalar(select(sql_func.count()).select_from(User)) or 0 diff --git a/web/app/static/css/input.css b/web/app/static/css/input.css index 9a423eb..12e1d5f 100644 --- a/web/app/static/css/input.css +++ b/web/app/static/css/input.css @@ -99,6 +99,8 @@ --color-expired: #bdb8ad; --color-expired-foreground: #d6d0c4; --color-expired-muted: #282b30; + + --image-wrapper-size: 100%; } @layer base { @@ -149,7 +151,7 @@ } .btn-primary { - @apply bg-primary text-primary-foreground hover:bg-primary-hover; + @apply text-primary-foreground bg-primary-hover hover:bg-[#c62030]/90 hover:text-[#f7f2e8]; } .btn-secondary { @@ -279,3 +281,17 @@ @apply text-sm font-medium text-danger-foreground; } } + + +@utility img-wrapper-* { + width: 100%; + height: 100%; + max-width: --value(--max-w-*, [length], [percentage], [*], "none", "inherit", "initial", "unset"); + + /* Automatically target the image inside */ + & img { + width: 100%; /* Replaces 'stretch' for better compatibility */ + height: auto; /* Maintains aspect ratio */ + display: block; /* Removes bottom whitespace common in inline images */ + } +} \ No newline at end of file diff --git a/web/app/templates/error.html b/web/app/templates/error.html index 1d28f90..0264a44 100644 --- a/web/app/templates/error.html +++ b/web/app/templates/error.html @@ -51,8 +51,8 @@ opacity: 0; animation-fill-mode: both; } - .laser-eye-left { top: 22%; left: 40%; } - .laser-eye-right { top: 22%; left: 52%; } + .laser-eye-left { inset-block-start: 40px; inset-inline-start: 81px; } + .laser-eye-right { inset-block-start: 39px; inset-inline-start: 100px; } .laser-beam { position: fixed; height: 2px; @@ -90,30 +90,30 @@ {% endif %}
-
- + Firebreak + height="268" /> +
+
{% if status_code == 401 %} -

{{ status_code }}

-

{{ title }}

+

{{ status_code }}

+

{{ title }}

{% else %}

{{ status_code }}

-

{{ title }}

+

{{ title }}

{% endif %} -

{{ detail }}

+

{{ detail }}

{% if status_code == 401 %} {% set quips = [ - "This area is protected by Big Tech's finest.", - "Your data is safe. His isn't.", - "He doesn't bite. He just harvests.", - "Move along. Nothing to scrape here.", - "Unauthorized. The Zuck abides.", - "ACCESS DENIED. Deploying Cuckerberg." + "I'm not saying you're a data scraper, but I AM saying that this page is off-limits.", + "I'm watching you Wazowski.... ALWAYS watching.", + "He doesn't bite. He just harvests your data.", + "Move along clanker! Nothing to see here.", + "Just get out of here you STUPID, DUMB ANIMAL!" ] %} -

{{ quips | random }}

+

{{ quips | random }}

{% endif %}
Go home @@ -127,7 +127,7 @@
+ class="w-full opacity-65 grayscale" />
@@ -138,7 +138,7 @@
{% if status_code == 401 %}