Template:Class: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly><span class="{{lc:{{{1|}}}}}bg"></span></includeonly><noinclude>
<includeonly><span class="{{lc:{{#fornumargs:key|value|{{#var:value}} <nowiki/>}}}}"></span></includeonly><noinclude>
== About ==
== About ==
This template provides an experimental new way to change the background color for gallery images on a ''per-image'' basis.
This template provides an experimental new way to add supported classes to gallery images on a ''per-image'' basis.


== Usage ==
== Usage ==
The template can be used as either <code><nowiki>{{bg|black}}</nowiki></code> or <code><nowiki>{{bg|gray}}</nowiki></code> and is inserted into the caption of the relevant image(s):
Add the template to the caption of the gallery image you'd like the class applied to. Each numbered parameter is a class name.


=== Supported classes ===
*...
=== Example ===
<pre><gallery>
<pre><gallery>
MarioMP8Artwork.png|[[Mario]]{{bg|black}}
MarioMP8Artwork.png|[[Mario]]{{class|blackbg}}
Luigi Artwork - Mario Party 7.png|[[Luigi]]{{bg|gray}}
Luigi Artwork - Mario Party 7.png|[[Luigi]]{{class|graybg}}
NSMBDS Bowser Artwork.png|[[Bowser]]
NSMBDS Bowser Artwork.png|[[Bowser]]
</gallery></pre>
</gallery></pre>


<gallery>
<gallery>
MarioMP8Artwork.png|[[Mario]]{{bg|black}}
MarioMP8Artwork.png|[[Mario]]{{class|blackbg}}
Luigi Artwork - Mario Party 7.png|[[Luigi]]{{bg|gray}}
Luigi Artwork - Mario Party 7.png|[[Luigi]]{{class|graybg}}
NSMBDS Bowser Artwork.png|[[Bowser]]
NSMBDS Bowser Artwork.png|[[Bowser]]
</gallery>
</gallery>


== Reminder ==
== Reminder ==
To use the same background color for ''all images'' in a gallery, this template isn't needed. Simply use either <code><nowiki><gallery class="blackbg"></nowiki></code> or <code><nowiki><gallery class="graybg"></nowiki></code> for the gallery's opening tag.
To apply a class to ''all images'' in a gallery, this template isn't needed. Simply use <code><nowiki><gallery class="..."></nowiki></code> for the gallery's opening tag.


[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Revision as of 22:03, March 29, 2024

About

This template provides an experimental new way to add supported classes to gallery images on a per-image basis.

Usage

Add the template to the caption of the gallery image you'd like the class applied to. Each numbered parameter is a class name.

Supported classes

  • ...

Example

<gallery>
MarioMP8Artwork.png|[[Mario]]{{class|blackbg}}
Luigi Artwork - Mario Party 7.png|[[Luigi]]{{class|graybg}}
NSMBDS Bowser Artwork.png|[[Bowser]]
</gallery>

Reminder

To apply a class to all images in a gallery, this template isn't needed. Simply use <gallery class="..."> for the gallery's opening tag.