Skip to content

[web] Adopt the new logo on cloudprober's built-in web pages - #1474

Merged
manugarg merged 2 commits into
mainfrom
web-brand-logo
Sep 7, 2026
Merged

manugarg merged 2 commits into
mainfrom
web-brand-logo

Conversation

@manugarg

@manugarg manugarg commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The status page, /alerts, /logs, /config-* and the artifacts browser still had no favicon at all and a monospace "Cloudprober" text header, predating the brand kit added in #1468. This brings them onto the new logo.

Assets

favicon.ico and the horizontal and icon SVGs are copied from docs/brand/ into web/static/, where the existing //go:embed static/* already picks them up — they're byte-identical to the kit. docs/brand/README.md gains a section under Publishing a change recording this second set of copies alongside the docs/static/ one, with the cp commands to refresh them.

Shared head and header

New resources.HeadLinks() emits the stylesheet plus the <link rel="icon"> tags (.ico at 32x32 and the SVG icon), following the wiring documented in the brand README. It's wired into all three page shells — web/resources, probestatus, and the artifacts browser — which previously each spelled out the CSS link on their own. Paths stay relative, so this still works when the status page is mounted at a custom URL or served behind a non-root path.

Those shells also gain a <title>, which none of them had; with a favicon in place, tabs were otherwise showing the bare URL.

The header itself becomes the horizontal lockup at 170px wide, linking to cloudprober.org:

  • The (Github) link beside it is dropped. It crowded the wordmark, and the site the logo points to links to the repo anyway.
  • The grey header bar is dropped too. It existed to make the monospace text read as a title bar. Around a lockup that already carries a cap height of clear space inside its own viewBox, it was padding the same artwork twice, and the <hr/> below already separates the header from the content. Tightening its padding instead only bought ~10px of the ~70px, since the height comes from the lockup and its built-in padding, not the CSS.

Drive-by fix

The floated info block was cleared by a fixed <br><br><br><br>. That count silently broke the moment a line was added to the block — the next heading rode up alongside the links. Replaced with a clear: both div, which is what the artifacts page already did.

Verification

gofmt and go vet clean; go test green across web/..., internal/surfacers/probestatus, and probes/browser/.... Golden HTML in header_test.go and templates_test.go updated, and web_test.go gains cases asserting the three new assets serve over /static/. Also ran the binary against a live config and checked /status, /alerts and the assets in a browser.

The status page, /alerts, /logs, /config-* and the artifacts browser
still had no favicon at all and a monospace "Cloudprober" text header,
predating the brand kit added in #1468.

Copy favicon.ico and the horizontal and icon SVGs from docs/brand into
web/static, where the existing //go:embed static/* already picks them
up. Add resources.HeadLinks(), which emits the stylesheet plus the
favicon links, and wire it into all three page shells (web/resources,
probestatus, artifacts) so they no longer each spell out the CSS link.
Those shells also gain a <title>, which none of them had.

The header becomes the horizontal lockup at 170px, linking to
cloudprober.org. The Github link next to it is dropped -- it crowded the
wordmark, and the site it points to is one click from the logo. The grey
header bar goes too: it existed to make the monospace text read as a
title bar, and around a lockup that already carries a cap height of
clear space in its own viewBox it was just padding a second time, with
the <hr/> below already doing the separating.

Finally, replace the fixed <br><br><br><br> under the floated info block
with a clear:both div, matching what the artifacts page already did. The
hard-coded count silently broke the moment a line was added to the block
and let the next heading ride up alongside the links.
Follow-up to the previous commit, from review.

The shared <title> I added was the literal "Cloudprober" on every page,
so two open tabs -- /alerts and /logs, say -- became indistinguishable.
Before that commit there was no <title> at all and browsers fell back to
the URL, which at least told them apart. Add resources.PageTitle(), which
puts the page's own path first ("/alerts - Cloudprober") so the tellable
part survives tab truncation, and use it in all three shells. The status
page path comes from config, so it is escaped.

Add TestBrandAssetsMatchBrandKit, comparing the three assets in
web/static against their docs/brand sources through the embedded
filesystem. They are //go:embed-ed, so a copy someone forgot to refresh
would otherwise ship the old logo in the binary with nothing to catch it
-- the existing tests only assert the files are served and parse as SVG.

Drop probestatus's LinkPrefix template field, dead since the previous
commit replaced its only use, {{.LinkPrefix}}static/cloudprober.css,
with {{.HeadLinks}}.
@manugarg
manugarg merged commit cecedde into main Sep 7, 2026
13 checks passed
@manugarg
manugarg deleted the web-brand-logo branch September 7, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant