Template:ColorGallery/Color: Difference between revisions

From Mizuumi Wiki
Jump to navigation Jump to search
(Undo revision 74387 by SageVarq (talk) Last change isn't working as expected. Using imagewidths for text area width for the indefinite future.)
Tag: Undo
No edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><span style="text-align:left; float:left; overflow:hidden; margin:1px; border-style:double"><div>[[File:{{#if:{{{filename|}}}|{{{filename}}}|{{#var:filePrefix}}{{{1}}}{{#var:fileSuffix}}.{{#var:imageFileTypes}}}} | center | {{#var:imagewidths}}x{{#var:imageheights}}px | {{{text|Color {{{1}}}}}}]]</div>{{#ifeq:{{#var:showtext}}|yes|<div style="line-height:1; text-align:center; width:{{#var:imagewidths}}px; height:28px">{{{text|Color {{{1}}}}}}</div>}}</span></includeonly><noinclude>__NOTOC__==Usage==
<includeonly><!--
To be used exclusively with [[Template:ColorGallery]].
  // Create a span that floats left
===Template Parameters===
--><span style="float:left; border:1px #aaa solid; margin-right:-1px;"><!--
*'''unlabeled parameter''': The number this color is supposed to be.
  -->{{#ifeq:{{#var:showtext}}|yes|<!--
*'''text''': The text listed below the color. Will show no text if "showtext" is set to "no" in ColorGallery (Default:Color [number])
      --><div class="color-gallery-header" style="width:{{#var:imagewidths}}px; height:{{#var:textHeights}}; display:flex; justify-content:center; align-items:center; flex-wrap:wrap;">{{#if:{{{text|}}} | {{{text}}} | Color {{{1}}} }}</div>}}<!--
===Optional Paramenters===
  --><div {{#ifeq:{{#var:forceImageHeights}}|yes|style="height:{{#var:imageheights}}px;"}}><!--
*'''filename''': Individually set filename if necessary.
      -->[[File:<!--
==Example==
        -->{{#if: {{{filename|}}} |<!--
===Source code:===
            // If specific filename is present, set that file as display
<nowiki>{{ColorGallery | filePrefix=NPB Ignis Color_| imagewidths=220 |imageheights=220 | showtext= no | colors=
            -->{{{filename}}} |<!--
{{ColorGallery/Color|1}}
            // If no file name, use variables given to create filename
{{ColorGallery/Color|2}}
            -->{{#var:filePrefix}}{{{1}}}{{#var:fileSuffix}}.{{{fileTypeOverride|{{#var:imageFileTypes}}}}}<!--
{{ColorGallery/Color|3}}
        -->}}<!--
{{ColorGallery/Color|4}}
    --> | center | {{#var:imagewidths}}x{{#var:imageheights}}px | {{{text|Color {{{1}}}}}} ]]<!--
{{ColorGallery/Color|5}}
  --></div><!--
{{ColorGallery/Color|6}}
--></span></includeonly><noinclude>
{{ColorGallery/Color|7}}
See [[Template:ColorGallery]] for documentation.
{{ColorGallery/Color|8}}
[[Category:Universal]]
{{ColorGallery/Color|9}}
[[Category:Templates]]
{{ColorGallery/Color|10}}
{{ColorGallery/Color|11}}
{{ColorGallery/Color|12}}
{{ColorGallery/Color|13}}
{{ColorGallery/Color|14}}
{{ColorGallery/Color|15}}
{{ColorGallery/Color|16}}
{{ColorGallery/Color|17}}
{{ColorGallery/Color|18}}
{{ColorGallery/Color|19}}
{{ColorGallery/Color|20}}
{{ColorGallery/Color|21}}
}}</nowiki>
===Output:===
{{ColorGallery | filePrefix=NPB Ignis Color_| imagewidths=220 |imageheights=220 | showtext= no | colors=
{{ColorGallery/Color|1}}
{{ColorGallery/Color|2}}
{{ColorGallery/Color|3}}
{{ColorGallery/Color|4}}
{{ColorGallery/Color|5}}
{{ColorGallery/Color|6}}
{{ColorGallery/Color|7}}
{{ColorGallery/Color|8}}
{{ColorGallery/Color|9}}
{{ColorGallery/Color|10}}
{{ColorGallery/Color|11}}
{{ColorGallery/Color|12}}
{{ColorGallery/Color|13}}
{{ColorGallery/Color|14}}
{{ColorGallery/Color|15}}
{{ColorGallery/Color|16}}
{{ColorGallery/Color|17}}
{{ColorGallery/Color|18}}
{{ColorGallery/Color|19}}
{{ColorGallery/Color|20}}
{{ColorGallery/Color|21}}
}}
</noinclude>
</noinclude>

Latest revision as of 23:10, 8 May 2021

See Template:ColorGallery for documentation.