oficina / home Public

Keep the space in the hero headline on phones

index.html wrote "new<br>office", and home.css hides the hero's <br>
at 30rem and below, so every phone read "Open your newoffice suite."
The <br> now has a space after it, which collapses when the break
shows and separates the words when it does not. A test holds every
front-page <br> to having whitespace beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev cf013aa124aef337c4429200bd2b82f7650d13a0 parent 3339ff6
2 files changed, +17 −1
  • internal/home/page_test.go +16 −0
  • internal/home/static/site/index.html +1 −1

CI failed — run details

diff --git a/internal/home/page_test.go b/internal/home/page_test.go
new file mode 100644
index 0000000..f2d9cc3
--- /dev/null
+++ b/internal/home/page_test.go
@@ -0,0 +1,16 @@
+package home
+
+import (
+ "regexp"
+ "testing"
+)
+
+// TestFrontPageLineBreaksKeepTheirSpace: home.css hides the hero's <br> on
+// narrow screens, so a <br> glued to words on both sides runs them together
+// there — "Open your newoffice suite." on every phone (polish audit, round
+// 1). Every <br> on the front page needs whitespace on at least one side.
+func TestFrontPageLineBreaksKeepTheirSpace(t *testing.T) {
+ if glued := regexp.MustCompile(`\S<br\s*/?>\S`).FindAll(indexPage, -1); len(glued) > 0 {
+ t.Fatalf("front page has <br> with no whitespace beside it: %q", glued)
+ }
+}
diff --git a/internal/home/static/site/index.html b/internal/home/static/site/index.html
index eb32f05..abce94e 100644
--- a/internal/home/static/site/index.html
+++ b/internal/home/static/site/index.html
@@ -32,7 +32,7 @@
<!-- ───────── Hero: the lobby directory ───────── -->
<section class="band band-ink hero">
<div class="shell">
- <h1 class="hero-h">Open your new<br>office suite.</h1>
+ <h1 class="hero-h">Open your new<br> office suite.</h1>
<p class="hero-lead">Oficina is fast, modern and light enough to forget it&rsquo;s running.
Six apps that share one account, in the browser or as real native apps &mdash;
with your team&rsquo;s work sealed inside your team&rsquo;s own instance.</p>