Template:Class: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
(Created page with "<includeonly><span class="{{{1}}}"></span></includeonly><noinclude>__NOTOC__ == Info == 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 <code><nowiki><gallery class="..."></nowiki></code> 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 param...")
 
mNo edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="{{{1}}}"></span></includeonly><noinclude>__NOTOC__
<includeonly><span class="{{{1|}}}"></span></includeonly><noinclude>
== Info ==
== Info ==
This template provides a new way to add supported classes to gallery images on a ''per-image'' basis.
This template provides a new way to add supported classes to gallery images on a ''per-image'' basis.
Line 9: Line 9:


=== Supported classes ===
=== Supported classes ===
* <code>blackbg</code> / <code>graybg</code> - Change the background color of the image container
* <code>rawsize</code> : Prevent the image from being upscaled
* <code>invert-light</code> / <code>invert-dark</code> - Invert the image in the wiki's light or dark mode
** <code>rawsize x2</code> - <code>x10</code> : Scale the image a specific amount
* <code>smooth</code> : Use a smooth rather than pixelated image upscaling algorithm
* <code>blackbg</code> / <code>graybg</code> : Change the background color of the image container
* <code>invert-light</code> / <code>invert-dark</code> : Invert the image in the wiki's light or dark mode


== Example ==
== Example ==
<pre><gallery>
<pre><gallery>
Captain Olimar Pikmin 4 Render.png|[[Captain Olimar]]{{class|blackbg}}
Wiki.png|Wiki logo 1{{class|blackbg}}
Oatchirender.png|[[Oatchi]]{{class|graybg}}
Wiki.png|Wiki logo 2{{class|graybg}}
P4 Bulborb Render.png|[[Bulborb]]
Wiki.png|Wiki logo 3
</gallery></pre>
</gallery></pre>


<gallery>
<gallery>
Captain Olimar Pikmin 4 Render.png|[[Captain Olimar]]{{class|blackbg}}
Wiki.png|Wiki logo 1{{class|blackbg}}
Oatchirender.png|[[Oatchi]]{{class|graybg}}
Wiki.png|Wiki logo 2{{class|graybg}}
P4 Bulborb Render.png|[[Bulborb]]
Wiki.png|Wiki logo 3
</gallery>
</gallery>


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

Latest revision as of 17:39, November 5, 2024

Info

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.

Supported classes

  • rawsize : Prevent the image from being upscaled
    • rawsize x2 - x10 : Scale the image a specific amount
  • smooth : Use a smooth rather than pixelated image upscaling algorithm
  • blackbg / graybg : Change the background color of the image container
  • invert-light / invert-dark : Invert the image in the wiki's light or dark mode

Example

<gallery>
Wiki.png|Wiki logo 1{{class|blackbg}}
Wiki.png|Wiki logo 2{{class|graybg}}
Wiki.png|Wiki logo 3
</gallery>