Template:Hub card: Difference between revisions
Speedybrain (talk | contribs) Hub card in the TPT2 brand kit style (tpt-card). Source: wiki repo onwiki/Template/Hub card.wikitext |
Speedybrain (talk | contribs) Fix |
||
| Line 1: | Line 1: | ||
<div class="tpt-card wiki-card{{#if:{{{facility|}}}| tpt-fac-{{{facility}}}}}"><div class="tpt-card__head">{{#if:{{{mark|}}}|<span class="tpt-hex tpt-hex--s"><span class="tpt-hex__mark">{{{mark}}}</span></span>}}{{#if:{{{icon|}}}|<span class="wiki-card__icon">[[File:{{{icon}}}|32px|link=|alt=]]</span>}}<div class="tpt-card__title">{{#if:{{{url|}}}|[{{{url}}} {{{title|}}}]|[[{{{link|{{{title|}}}}}}|{{{title|{{{link|}}}}}}]]}}</div></div>{{#if:{{{text|}}}|<div class="tpt-card__text">{{{text}}}</div>}}{{#if:{{{meta|}}}|<div class="tpt-card__meta">{{{meta}}}</div>}}</div><noinclude> | <div class="tpt-card wiki-card {{#if:{{{facility|}}}|tpt-fac-{{{facility}}}}}"><div class="tpt-card__head">{{#if:{{{mark|}}}|<span class="tpt-hex tpt-hex--s"><span class="tpt-hex__mark">{{{mark}}}</span></span>}}{{#if:{{{icon|}}}|<span class="wiki-card__icon">[[File:{{{icon}}}|32px|link=|alt=]]</span>}}<div class="tpt-card__title">{{#if:{{{url|}}}|[{{{url}}} {{{title|}}}]|[[{{{link|{{{title|}}}}}}|{{{title|{{{link|}}}}}}]]}}</div></div>{{#if:{{{text|}}}|<div class="tpt-card__text">{{{text}}}</div>}}{{#if:{{{meta|}}}|<div class="tpt-card__meta">{{{meta}}}</div>}}</div><noinclude> | ||
A card that links to a page, in the TPT2 brand kit's style (<code>tpt-card</code>). Put cards inside [[Template:Hub grid]], which loads their styles; the whole card is clickable. | A card that links to a page, in the TPT2 brand kit's style (<code>tpt-card</code>). Put cards inside [[Template:Hub grid]], which loads their styles; the whole card is clickable. | ||
Revision as of 12:12, 6 October 2026
[[|]]
A card that links to a page, in the TPT2 brand kit's style (tpt-card). Put cards inside Template:Hub grid, which loads their styles; the whole card is clickable.
{{Hub grid|
{{Hub card|title=Laboratory|facility=laboratory|mark=VI|text=Twelve experiments that unlock modules.|meta=Max. tier VI}}
{{Hub card|title=Module database|url=https://www.perfecttower2.com/tools/modules/|text=Search all modules.|meta=Official}}
}}
A linked card for hub pages and the Main Page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title | title | no description | String | required |
| Page | link | Wiki page to link; defaults to the title | Page name | optional |
| External URL | url | Links outside the wiki instead of to a page | URL | optional |
| Text | text | One short sentence | String | suggested |
| Meta line | meta | Small uppercase line at the bottom | String | optional |
| Facility | facility | Building color: power-plant, mine, factory, headquarters, arcade, laboratory, shipyard, trading-post, workshop, museum, construction-firm or statue-of-cubos | String | optional |
| Hexagon mark | mark | Short text in a hexagon badge, e.g. a tier | String | optional |
| Icon | icon | Small image next to the title | File | optional |