Template: Food hub cards

From Chinese Food Wiki
Revision as of 16:42, 25 September 2026 by Admin (talk | contribs) ([CFWK] Create template: section cards for food hub pages (Bootstrap, 2 cols phone / 4 cols desktop))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Documentation

Food hub cards shows a grid of Bootstrap cards linking to the main sections or pages of a food hub (province, city or cuisine page). It uses the Bootstrap 4 classes already loaded by the Tweeki skin (row, col-6 col-md-3, card), so it needs no site CSS: 2 columns on phones, 4 columns from 768 px.

Place it right after the lead paragraph(s). Up to 16 cards; empty slots render nothing.

Parameters

For each card n (1–16):

  • linkn: target, either a section on the same page (#Famous dishes) or another page (Sichuan Cuisine). Required for the card to appear.
  • labeln: card title (defaults to the link).
  • descn: optional short line under the title (keep it to 2–5 words).

Example

{{Food hub cards
|link1=Sichuan Cuisine |label1=Sichuan Cuisine |desc1=Flavours, techniques, schools
|link2=#Famous dishes  |label2=Famous dishes   |desc2=Classic Sichuan dishes
|link3=#Snacks and street food |label3=Snacks
}}

Hook classes: cfwk-hub-cards, cfwk-hub-card-col, cfwk-hub-card.