From f066d12153426c417d666ad392c5ebe78bee3d37 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 13 Apr 2026 14:46:42 +0000 Subject: [PATCH] assets: fix logo alignment and error icon centering Tighten the SVG viewBox to the actual content bounding box and remove hardcoded width/height attributes so the browser no longer adds horizontal padding via preserveAspectRatio. The "h" wordmark now left-aligns with the page content below it. Replace the error icon SVG path (which had an off-center X) with a simple circle + two crossed lines drawn from a centered viewBox. Both icons now use fill="currentColor" for dark mode adaptation. Updates juanfont/headscale#3182 --- hscontrol/assets/headscale.svg | 2 +- hscontrol/assets/style.css | 1 - hscontrol/templates/design.go | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hscontrol/assets/headscale.svg b/hscontrol/assets/headscale.svg index caf19697..47f595af 100644 --- a/hscontrol/assets/headscale.svg +++ b/hscontrol/assets/headscale.svg @@ -1 +1 @@ - + diff --git a/hscontrol/assets/style.css b/hscontrol/assets/style.css index 78418c70..357fcb13 100644 --- a/hscontrol/assets/style.css +++ b/hscontrol/assets/style.css @@ -221,7 +221,6 @@ input:focus-visible { @media (max-width: 768px) { .headscale-logo { width: 200px; - margin-left: 0; } } diff --git a/hscontrol/templates/design.go b/hscontrol/templates/design.go index e9c81b33..d935636a 100644 --- a/hscontrol/templates/design.go +++ b/hscontrol/templates/design.go @@ -444,8 +444,9 @@ func errorBox(heading string, children ...elem.Node) *elem.Element { // errorIcon returns the error X-circle SVG icon as raw HTML. func errorIcon() elem.Node { - return elem.Raw(`