Jump to content

Template:Grid

From Swarthmore Knowledge Base

A responsive grid for laying out Template:Cards (or any block content) in columns. Collapses to one column on narrow screens.

Usage

{{Grid|cols=3|
{{Card|icon=book-open|title=Guides|link=Help:Guides|Step-by-step how-tos.}}
{{Card|icon=circle-alert|type=warning|title=Known issues|link=Known issues|Current outages and workarounds.}}
{{Card|icon=mail|title=Contact|link=Help desk|Get in touch with ITS.}}
}}


Parameters

Parameter Default Description
1 / content — The grid items, one per line. Use 1= if the content contains = outside of nested templates.
cols 3 Maximum columns on wide screens: 1, 2, 3 or 4.

Notes

  • Put each item on its own line with no blank lines between them — a blank line makes MediaWiki insert an empty paragraph, which becomes a stray grid cell.
  • Items are stretched to equal height, so card footers align across a row.