Template:Tweakparam: Difference between revisions
Jump to navigation
Jump to search
(Added "notext" parameter) |
(Replaced "noinvert" with "imgclass") |
||
Line 1: | Line 1: | ||
<includeonly><div style="display:inline-block;"><!-- | <includeonly><div style="display:inline-block;"><!-- | ||
-->{{#if: {{{icon|}}} | [[File:{{{icon}}}|22px|class={{#if: {{{ | -->{{#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}}}}}} | }}]] <!-- | ||
-->|{{#if:{{{notext|}}} | | {{{title|{{{1}}}}}} }} }}<!-- | -->|{{#if:{{{notext|}}} | | {{{title|{{{1}}}}}} }} }}<!-- | ||
Line 17: | Line 17: | ||
==Usage== | ==Usage== | ||
<code><nowiki>{{tweakparam| | <code><nowiki>{{tweakparam|imgclass|icon=|title|last=y}}</nowiki></code> | ||
* Use <tt> | * 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>. | ||
Line 24: | Line 26: | ||
* 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: | [[Category:Content box templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 01:08, 19 June 2024
Test: (
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.