📄 CSS Manual for Hobbes Archive

Hobbesgram CSS Styling Reference

All color theming is controlled through Admin → CSS & Color Theme (/admin/css). Colors are stored as hex values in data/settings/settings.json under the css key. The values are injected directly into a <style> block in templates/header.php at page render time — there is no separate stylesheet file to edit.


Color Palette Variables

Each variable maps to one or more CSS rules. The table shows the key name (as used in the admin panel and in config.php), what it controls, and its default value in the OS/2 Classic preset.

Page Base

KeyControlsDefault
bg_colorbody background — the outer page canvas#c0c0c0
text_colorbody foreground — default text everywhere#000000
link_colora — unvisited hyperlinks#000080
visited_colora:visited — already-followed links#800080
muted_color.muted helper class, form hints, category tree expand markers#444444
KeyControlsDefault
header_bg#site-header background; also the border-bottom ridge colour#000080
header_text#site-header text and all links inside it (site name, user-bar links)#ffffff
KeyControlsDefault
nav_bg#nav strip background#003399
nav_text#nav a link colour#ffffff
nav_hover_bg#nav a:hover and #nav a.active highlight background#0055cc

The sidebar (#sidebar) uses panel_bg and border_color (see Panels below).

Tables

KeyControlsDefault
th_bgtable.listing th background; also .panel-title background#000080
th_texttable.listing th text; also .panel-title text#ffffff
tr_alt_bgEvery even row background (tr:nth-child(even) td)#e8e8ff
tr_hover_bgRow background on mouse-over (tr:hover td)#c8c8e8
border_colorAll table.listing cell borders; panel/sidebar/header borders; hr lines; pagination links border#808080

Panels and Boxes

KeyControlsDefault
panel_bg.panel background; #sidebar background; .info-box background; .admin-card background#ffffff
panel_border.panel border (2 px solid)#808080

Note: .panel-title uses th_bg/th_text, not panel_border.

Buttons

KeyControlsDefault
btn_bg.btn background; pagination link background#c0c0c0
btn_text.btn text colour#000000
btn_border.btn 2 px outset border (inverts to inset on hover)#808080

.btn-primary ignores btn_bg/btn_text and uses th_bg/th_text with accent as border colour instead. .btn-danger is always hardcoded red (#cc0000) regardless of the palette.

Forms and Inputs

Applies to all input, select, and textarea elements globally, not just inside form.std.

KeyControlsDefault
input_bgInput/select/textarea background#000080
input_textInput/select/textarea text colour#ffff00
input_borderInput border (1 px global; 2 px inset inside form.std)#808080

Flash / Alert Messages

KeyControlsDefault
error_bg.flash-error background (border is hardcoded #cc0000)#ffcccc
success_bg.flash-success background (border is hardcoded #006600)#ccffcc
info_bg.flash-info background (border is hardcoded #000080)#ccccff
KeyControlsDefault
footer_bg#site-footer background; also the border-top ridge colour#000080
footer_text#site-footer text and all links in it#ffffff

Accent

KeyControlsDefault
accent.btn-primary border; .pagination a.current background; markdown heading colour (.md-content h1/h2/h3); markdown blockquote left border#000080

Derived / Shared Uses

Some keys are used in more than one context. Quick cross-reference:

  • th_bg / th_text — table headers and panel title bars and .btn-primary and .tag inline badges
  • border_color — table cell borders and panel/sidebar/header chrome and hr rules and pagination borders and .info-box border
  • panel_bg — panels and sidebar and .info-box and .admin-card
  • btn_bg — buttons and pagination link backgrounds
  • muted_color.muted text and form .hint text and category tree [+]/[-] markers

Special Sections Not Controlled by the Palette

These areas use hardcoded colours and cannot be changed through the palette editor.

ElementHardcoded valueNotes
.btn-danger#cc0000 bg / #fff textDelete/destructive action buttons
.role-admin badge#400 bg / #faa textUser role indicator
.role-editor badge#040 bg / #afa textUser role indicator
.role-contributor badge#004 bg / #aaf textUser role indicator
.role-guest badge#444 bg / #ddd textUser role indicator
.md-content code#eee bgInline code in markdown
.md-content pre#111 bg / #eee textCode blocks in markdown
.md-content blockquote text#555Blockquote body text (left border uses accent)
Flash message borders#cc0000 / #006600 / #000080Error / success / info
Font size steps13 px / 15 px / 17 px / 20 pxControlled by A-/A+ nav buttons; stored in localStorage

To restyle these you must edit templates/header.php directly.


IBM Two Spot Mode

Admin → CSS & Color Theme → IBM Two Spot (two_spot key in settings).

When enabled, Two Spot overrides the entire palette with just two colours using !important on every major element. Everything becomes background-colour + foreground-colour; hover/active states invert them.

SettingControls
Background (two_spot.bg)All backgrounds sitewideDefault #000080
Text (two_spot.text)All text and borders sitewideDefault #ffff00

Two Spot overrides: body, #site-header, #nav, #sidebar, .panel, .panel-title, .panel-body, table.listing th/td, even/alt rows, .btn, input/select/textarea, all flash variants, .info-box, .tag, .pagination a, .cat-tree li a, .admin-card.

When Two Spot is enabled the Custom Color Palette has no visible effect.


Color Presets

Five built-in presets are available at Admin → CSS & Color Theme → Color Presets. Applying a preset overwrites all 29 palette keys at once.

PresetCharacter
OS/2 Classic (Blue/Gray)Grey canvas, navy header/nav, white panels — default look
Dark ModeNear-black background, muted blue nav, dark panels
Green TerminalDeep green monochrome CRT aesthetic
Hobbes OGDark navy-blue overall, warm cream text, teal accents
AmberBlack background with amber/gold text, CRT amber monitor

Layout Constants (not themeable via admin)

These structural values are hardcoded in templates/header.php and require a direct file edit to change.

PropertyValueElement
Max page width1000px#wrap
Sidebar width180px#sidebar
Base font'Courier New', Courier, monospacebody
Base font size15px (step 1 of 4)html
Font size steps13 / 15 / 17 / 20 pxA-/A+ controls
Header border3px ridge#site-header bottom
Nav border2px solid#nav bottom
Footer border3px ridge#site-footer top
Panel border2px solid.panel
Button border2px outset (hover: inset).btn
Content padding10px#main
Sidebar padding8px#sidebar