ContributorMural::Renderers::Metro
Inherits ContributorMural::Renderer < Reference < Object
A transit map: contributors are stations on a coloured route that snakes
across the wall — left to right, a rounded 180° turn, back again — in the
flat-colour idiom of the classic network diagrams. Each section is its own
line in its own colour, its title reading as the line's name, and the two
ends of a line carry the heavier ring of a terminus. With role_lines,
a section splits further: one line per role, named after it — and weave
interleaves those lines' rows so the routes genuinely cross one another,
the way a real network does.
Constants
Vertical room reserved under each row for station names.
Mid-lightness route colours that hold up on white and on GitHub's dark background alike, so one palette serves every theme and every stroke is a plain attribute — nothing for CSS or the rasterizer to miss. A ninth line wraps around to the first colour.
The band a role-named line's title takes, and the air between lines.
Terminus ring stroke, as a multiple of the line's width. The ring's inner edge stays flush with the avatar either way; a terminus is only heavier on the outside.
Instance methods
Pixel size at which to fetch this user's avatar (2x render size for crisp display on high-DPI screens).
Half the widest station name in the whole document, measured once so every section shares one margin and the columns stay in true.