Jump to content

Template:Main Page/Card: Difference between revisions

From The Petit Planet Wiki
Added SyntaxHighlight and Template:Example
mNo edit summary
Line 47: Line 47:
"description": "Link of the card.",
"description": "Link of the card.",
"example": "Insect",
"example": "Insect",
"type": "string",
"type": "wiki-page-name",
"required": true
"required": true
},
},

Revision as of 15:50, 2 May 2026

Template documentation
Note: parts of or the entire template might not be visible without values provided.
This template uses CSS found at Template:Main Page/styles.css.

Template that creates cards for {{Main Page}}.

Syntax

{{Main Page/Card|image = |link = |text = }}
  • image – Destination filename (excluding the file extension).
  • ext – Extension for filename. Default: png.
  • link – Link of the card.
  • text – Text displayed on the highlight card. Default: link.

Example

<templatestyles src="Template:Main Page/styles.css" />
<div class="mp-navigation-wrapper mp-card-navigation">
{{Main Page/Card|image = Kabuto Beetle Icon|link = Insect|text = Insects}}
{{Main Page/Card|image = Sanke Koi Icon|link = Fish}}
{{Main Page/Card|image = Bean-Shaped Fist Crab Icon|link = Shore-Dweller|text = Shore-Dwellers}}
</div>

Template Data

Template that creates cards for the Main Page.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Imageimage

Destination filename (excluding the extension).

Example
Kabuto Beetle Icon.png
Filerequired
Extensionext

Extension for filename.

Default
png
Stringoptional
Linklink

Link of the card.

Example
Insect
Page namerequired
Texttext

Text displayed on the card.

Default
<link>
Example
Insects
Stringoptional