Template:Class: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (Protected "Template:Bg" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
mNo edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="{{{1|}}}bg"></span></includeonly><noinclude>
<includeonly><span class="{{{1|}}}"></span></includeonly><noinclude>
== About ==
This template provides a new way to add supported classes to gallery images on a ''per-image'' basis.
This template provides an experimental new way to change the background color for gallery images on a ''per-image'' basis.
 
To apply a class to ''all images'' in a gallery, this template isn't needed. Simply use <code><nowiki><gallery class="..."></nowiki></code> as the gallery's opening tag.


== 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. The first parameter is the class name. Multiple classes can be separated by spaces.


For a list of classes supported by this template, [[Help:Gallery#Supported classes|see here]].
== 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 ==
To change the 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.


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

Latest revision as of 17:09, July 14, 2024

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

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

Usage

Add the template to the caption of the gallery image you'd like the class applied to. The first parameter is the class name. Multiple classes can be separated by spaces.

For a list of classes supported by this template, see here.

Example

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