Template:UI/card

From Miniscope
Jump to: navigation, search

Renders a content card with optional icon, heading link, and description. Designed for landing-page card grids that point visitors at major content areas.

Styling lives in Template:UI/card/styles.css (TemplateStyles), so the CSS travels with the template. To retheme just one wiki, override the --labki-* tokens in that wiki's MediaWiki:Common.css. The styles.css covers .wiki-card itself (and its .card-icon / .card-title / .card-desc children) plus the .wiki-card-grid container — wrap multiple

calls in

to render an

auto-flowing card grid. The grid styles only apply on a page that already renders at least one card (TemplateStyles loads with the template).

Use target for internal wikilinks (e.g. Special:RequestAccount), or url for external URLs (mailing-list signup, Template:Fullurl: constructs, etc.). Provide exactly one. If both are set, url wins.

Parameters:

  • target — internal wikilink target (mutually exclusive with url)
  • url — external URL (mutually exclusive with target)
  • label — heading text (defaults to target if omitted; required when using url)
  • description — short body text below the heading (one sentence)
  • icon — optional icon: a Unicode glyph, HTML entity, or short text
  • icon_name — optional shortcut for Template:UI/icon; pass an
 icon name (e.g. flask, users) and the card
 invokes  internally. Mutually exclusive with
 icon — if both are set, icon wins. Avoids the
 MediaWiki nested-template-with-pipes parsing issue: writing
 {{UI/card|icon={{UI/icon|name=flask}}|...}}
 doesn't work because the inner | is consumed by the outer
 template's parameter split. icon_name=flask sidesteps it.