Template:Tweakparam: Difference between revisions

From Imagisphere
Jump to navigation Jump to search
(Renamed "text" parameter to "title")
(Replaced "noinvert" with "imgclass")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><div style="display:inline-block;"><!--
<includeonly><div style="display:inline-block;"><!--
-->{{#if: {{{icon|}}} | [[File:{{{icon}}}|22px|class={{#if: {{{noinvert|}}} | | invert }} {{{imgclass}}}|{{#if: {{{link|}}} | link={{{link}}} | }} {{{title|{{{1|}}}}}}]] | }}<!--
-->{{#if: {{{icon|}}} | [[File:{{{icon}}}|22px|class={{#if: {{{imgclass|}}} | {{{imgclass}}} | invert }}|{{#if: {{{link|}}} | link={{{link}}} | }} {{{title|{{{1|}}}}}}]] | }}<!--
-->{{#if: {{{link|}}} | [[{{{link}}}{{#if:{{{title|{{{1|}}}}}} | {{!}}{{{title|{{{1}}}}}} | }}]] <!--
-->{{#if: {{{link|}}} | [[{{{link}}}{{#if:{{{title|{{{1|}}}}}} | {{!}}{{{title|{{{1}}}}}} | }}]] <!--
-->| {{{title|{{{1}}}}}} }}<!--
-->|{{#if:{{{notext|}}} | | {{{title|{{{1}}}}}} }} }}<!--
--> {{#if: {{{last|}}} |  | •‎ }}<!--
--> {{#if: {{{last|}}} |  | •‎ }}<!--
--></div></includeonly><noinclude>
--></div></includeonly><noinclude>
Line 12: Line 12:
{{tweakparam|title=Parameter}}
{{tweakparam|title=Parameter}}
{{tweakparam|link=LittleBigPlanet|Parameter with link}}
{{tweakparam|link=LittleBigPlanet|Parameter with link}}
{{tweakparam|icon=Tweak_Speech_Voice_Temp.png|Parameter|last=y}}
{{tweakparam|icon=Tweak_Speech_Voice_Temp.png|Parameter|last=y|notext=y}}
|desc=This is a test of the Tweakparam template.
|desc=This is a test of the Tweakparam template.
}}
}}


==Usage==
==Usage==
<code><nowiki>{{tweakparam|noinvert=y|icon=|title|last=y}}</nowiki></code>
<code><nowiki>{{tweakparam|imgclass|icon=|title|last=y}}</nowiki></code>
* Use <tt>noinvert</tt> if your image isn't just a solid black colour.
* Use <tt>imgclass</tt> to apply one or more CSS classes to the image, separated by spaces.
** If omitted or left empty, <tt>invert</tt> will be applied by default so that solid black icons appear white in dark mode.
** If you don't want to apply any CSS class to your image, just type <tt>imgclass=n</tt>
* Replace <tt>title</tt> with whatever text you want to display.
* Replace <tt>title</tt> with whatever text you want to display.
* If for whatever reason you want a parameter to link to another page, use <tt>link=</tt>.
* If for whatever reason you want a parameter to link to another page, use <tt>link=</tt>.
* If you don't want the text label to be visible, use <tt>notext=y</tt>. The label can still be viewed by hovering the mouse over the icon. Not recommended in most cases.
* Use <tt>last=y</tt> if this is the last parameter on the tweak.
* Use <tt>last=y</tt> if this is the last parameter on the tweak.
*  
*  
[[Category:Templates]]
[[Category:Content box templates]]
</noinclude>
</noinclude>

Latest revision as of 01:08, 19 June 2024

Tweak Speech Voice Temp.png
Test: (
Parameter •‎
Parameter
)

This is a test of the Tweakparam template.

Usage

{{tweakparam|imgclass|icon=|title|last=y}}

  • Use imgclass to apply one or more CSS classes to the image, separated by spaces.
    • If omitted or left empty, invert will be applied by default so that solid black icons appear white in dark mode.
    • If you don't want to apply any CSS class to your image, just type imgclass=n
  • Replace title with whatever text you want to display.
  • If for whatever reason you want a parameter to link to another page, use link=.
  • If you don't want the text label to be visible, use notext=y. The label can still be viewed by hovering the mouse over the icon. Not recommended in most cases.
  • Use last=y if this is the last parameter on the tweak.