Editing Template:Main Page/Card

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--><div class="mp-card"><!--
--><div class="mp-card"><!--
   --><div class="mp-card-image"><!--
   --><div class="mp-card-image">[[File:{{{image|}}}.{{{ext|png}}}|60x60px|alt=|link={{{link|}}}]]</div><!--
    -->[[File:{{{image|{{{icon|Unknown}}} Icon}}}.{{{ext|png}}}|60x60px|alt={{{text|{{{link|}}}}}}|link={{{link|}}}<!--
  -->|class={{#switch:{{lc:{{{invert|}}}}}<!--
          -->|day|light=day-invert-image<!--
  -->|night|dark=night-invert-image<!--
  -->|#default=<!--
  -->}}<!--
-->]]<!--
  --></div><!--
   --><div class="mp-card-text">[[{{{link|}}}|{{{text|{{{link|}}}}}}]]</div><!--
   --><div class="mp-card-text">[[{{{link|}}}|{{{text|{{{link|}}}}}}]]</div><!--
--></div></includeonly><noinclude>{{Documentation|type=Main Page|content=
--></div></includeonly><noinclude>{{Documentation|type=Main Page|content=
Line 17: Line 9:
==Syntax==
==Syntax==
<syntaxhighlight lang="wikitext" copy>
<syntaxhighlight lang="wikitext" copy>
{{Main Page/Card|icon = |link = |text = }}
{{Main Page/Card|image = |link = |text = }}
</syntaxhighlight>
</syntaxhighlight>
* {{F|icon}} &ndash; Icon for the card {{Color|Old|excluding}} the file extension. Shorthand for images with the {{F|Icon}} suffix.
* {{F|image}} &ndash; Destination filename ('''excluding''' the file extension).
* {{F|image}} &ndash; Image for the card {{Color|Old|excluding}} the file extension.
* {{F|ext}} &ndash; Extension for filename. Default: {{F|png}}.
* {{F|ext}} &ndash; Extension of the image. Default: {{F|png}}.
* {{F|link}} &ndash; Link of the card.
* {{F|link}} &ndash; Link of the card.
* {{F|text}} &ndash; Text displayed on the card. Default: {{F|link|v=1}}.
* {{F|text}} &ndash; Text displayed on the highlight card. Default: {{F|link|v=1}}.
* {{F|invert}} &ndash; Set to apply a filter to the image for either day/light or night/dark mode. Available values:
** {{F|Day}} &ndash; Invert the image in day/light mode. Will invert light-colored icons to gray in day/light mode.
** {{F|Night}} &ndash; Invert the image in night/dark mode. Will invert dark-colored icons to white in night/dark mode.


==Example==
==Example==
{{Example|<nowiki>
{{Example|<nowiki>
<templatestyles src="Template:Main Page/styles.css" />
<div class="mp-navigation-wrapper mp-card-navigation">
<div class="mp-navigation-wrapper mp-card-navigation">
{{Main Page/Card|icon = Kabuto Beetle|link = Insect|text = Insects}}
{{Main Page/Card|image = Kabuto Beetle Icon|link = Insect|text = Insects}}
{{Main Page/Card|icon = Sanke Koi|link = Fish}}
{{Main Page/Card|image = Sanke Koi Icon|link = Fish}}
{{Main Page/Card|icon = Hexia|link = Galaxy|text = Galaxies|invert = Day}}
{{Main Page/Card|image = Bean-Shaped Fist Crab Icon|link = Shore-Dweller|text = Shore-Dwellers}}
{{Main Page/Card|image = CSS Logo|ext = svg|link = :File:CSS Logo.svg|text = CSS|invert = Night}}
</div>
</div>
</nowiki>}}
</nowiki>}}
Line 42: Line 30:
{
{
"params": {
"params": {
"icon": {
"label": "Icon",
"description": "Icon for the card excluding the file extension. Shorthand for files with the {{F|Icon}} suffix.",
"example": "Kabuto Beetle",
"type": "wiki-file-name",
"suggested": true
},
"image": {
"image": {
"label": "Image",
"label": "Image",
"description": "Image for the card excluding the file extension.",
"description": "Destination filename (excluding the extension).",
"example": "Kabuto Beetle Icon",
"example": "Kabuto Beetle Icon.png",
"type": "wiki-file-name"
"type": "wiki-file-name",
"required": true
},
},
"ext": {
"ext": {
"label": "Extension",
"label": "Extension",
"description": "Extension of the image.",
"description": "Extension for filename.",
"default": "png",
"default": "png",
"type": "string"
"type": "string"
Line 74: Line 56:
"type": "string",
"type": "string",
"default": "<link>"
"default": "<link>"
},
"invert": {
"label": "Invert",
"description": "Set to apply a filter to the image for either day/light or night/dark mode.",
"example": "Day, Night",
"type": "string"
}
}
},
},
"description": "Template that creates cards for the Main Page.",
"description": "Template that creates cards for the Main Page.",
"paramOrder": [
"paramOrder": [
"icon",
"image",
"image",
"ext",
"ext",
"link",
"link",
"text",
"text"
"invert"
],
],
"format": "inline"
"format": "inline"
}
}
</templatedata>
</templatedata>
<templatestyles src="Template:Main Page/styles.css" />
 
}}</noinclude>
}}</noinclude>
Please note that all contributions to The Petit Planet Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Petit Planet Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.
File Pages==Summary====Licensing=={{Fairuse}}{{File|}}
Dynamic Page List¦²«»²{¦}²«»«/»«!----»
Array in DPL¹^2{}^2^2{¹}^2
Parser Functions{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}
Markup{{}}|[][[]][[Category:]]#REDIRECT [[]] [[Category:Redirect Pages]]<code></code><includeonly></includeonly><noinclude></noinclude><nowiki></nowiki><!----><br>§
Notices{{Stub|}}{{Stub Dialogue}}{{Upcoming}}{{Under Construction}}{{Placeholder|}}
Magic Words{{!}}{{formatnum:}}{{lc:}}{{uc:}}{{PAGENAME}}{{FULLPAGENAME}}{{ROOTPAGENAME}}{{BASEPAGENAME}}{{SUBPAGENAME}}{{DISPLAYTITLE:|noreplace}}__TOC____NOTOC____EXPECTUNUSEDCATEGORY____HIDDENCAT__
HTML Entities&mdash;&nbsp;&comma;&shy;