Template:Main Page/Card
Template page
More actions
Template documentation
Note: parts of or the entire template might not be visible without values provided.
Note: parts of or the entire template might not be visible without values provided.
| Main | Usage |
This template uses CSS found at Template:Main Page/styles.css.
Template that creates cards for {{Main Page}}.
Syntax
{{Main Page/Card|icon = |link = |text = }}
- icon – Icon for the card excluding the file extension. Shorthand for images with the Icon suffix.
- image – Image for the card excluding the file extension.
- ext – Extension of the image. Default: png.
- link – Link of the card.
- text – Text displayed on the card. Default: link.
- invert – Set to apply a filter to the image for either day/light or night/dark mode. Available values:
- Day – Invert the image in day/light mode. Will invert light-colored icons to gray in day/light mode.
- Night – Invert the image in night/dark mode. Will invert dark-colored icons to white in night/dark mode.
Example
<div class="mp-navigation-wrapper mp-card-navigation">
{{Main Page/Card|icon = Kabuto Beetle|link = Insect|text = Insects}}
{{Main Page/Card|icon = Sanke Koi|link = Fish}}
{{Main Page/Card|icon = Hexia|link = Galaxy|text = Galaxies|invert = Day}}
{{Main Page/Card|image = CSS Logo|ext = svg|link = :File:CSS Logo.svg|text = CSS|invert = Night}}
</div>
Template Data
Template that creates cards for the Main Page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Icon | icon | Icon for the card excluding the file extension. Shorthand for files with the {{F|Icon}} suffix.
| File | suggested |
| Image | image | Image for the card excluding the file extension.
| File | optional |
| Extension | ext | Extension of the image.
| String | optional |
| Link | link | Link of the card.
| Page name | required |
| Text | text | Text displayed on the card.
| String | optional |
| Invert | invert | Set to apply a filter to the image for either day/light or night/dark mode.
| String | optional |