Template:Show: Difference between revisions
Content deleted Content added
No edit summary Tag: Reverted |
No edit summary Tags: Manual revert Reverted |
||
Line 1:
<includeonly><{{#ifeq:{{{inline|}}}|yes|span|div}} class="mw-collapsible {{#ifeq:{{lc:{{{state|collapsed}}}}}|expanded||mw-collapsed}}
data-expandtext="{{{expandtext|more ▾}}}"
<span class="mw-collapsible-content" style="display:inline;">▼
data-collapsetext="{{{collapsetext|less ▴}}}"
style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}{{#ifeq:{{{compact|}}}|yes|display:inline-block; vertical-align:top;}} {{{style|}}}">
</span>▼
▲<{{#ifeq:{{{inline|}}}|yes|span|div}} class="mw-collapsible-content" style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}">
{{{text|}}}</{{#ifeq:{{{inline|}}}|yes|span|div}}>
</{{#ifeq:{{{inline|}}}|yes|span|div}}></includeonly><noinclude>
== Usage ==
Standard block usage (floats toggle to the far right):
<pre>
{{show
|text=The primary driver for the acquisition was the target's proprietary AI technology.
}}
== Compact Usage ==
This version prevents the "jump" and keeps the link next to the text.
<pre>
{{show
|compact=yes
|text=This
}}
</pre>
== Parameters ==
* '''text''': The content to be hidden/shown.
* '''
* '''
* '''
* '''
* '''state''': Set to "expanded" to have the text visible on page load.
* '''style''': Pass additional CSS styles directly.
== Required CSS ==
Add this to your [[MediaWiki:Common.css]] to ensure the "more" link doesn't float away:
<pre>
.mw-compact-toggle .mw-collapsible-toggle {
float: none !important;
display: inline-block !important;
margin-left: 0.5em;
vertical-align: top !important;
}
</pre>
</noinclude>
| |||