Template:Image frame: Difference between revisions

From Archon Arcana - The KeyForge Wiki
imported>H2g2bob
(Added Note on px)
imported>Tholme
(add style parameter to outer div)
 
(50 intermediate revisions by 28 users not shown)
Line 1: Line 1:
<includeonly><div class="thumb tright">
<includeonly>{{#ifeq: {{{align|}}} | center | <div class="center"> }}<div class="thumb {{#switch: {{{align|}}} | right |#default=tright | left=tleft | center | none=tnone}}" {{#ifeq: {{{mode|}}} | scrollable|style="overflow:hidden;width:{{{width|auto}}};max-width:{{#if:{{{max-width|}}}|{{#expr:{{{max-width|}}}+8}}px|100%}} {{{style|}}}"|style="{{{style|}}}"}}><div class="thumbinner" {{#ifeq: {{{mode|}}} | scrollable||style="width:{{#if:{{{width|}}}| {{#ifeq: {{{border|}}} | no | {{{width}}}px | {{#expr:{{{width}}}+2}}px}} |fit-content; width:-moz-fit-content; width:-webkit-fit-content;}}}}">{{#ifeq: {{{pos|}}} | top | <div class="thumbcaption">{{#if: {{{link|}}} | <div style="float:right">{{{linkoverride|[[File:Desc-i.svg|16px|link={{{link}}}{{#if: {{{link_text|}}} | {{!}}{{{link_text}}}}}]]}}}</div> |}}{{{caption|}}}</div> |}}<div class="{{#ifeq: {{{mode|}}} | scrollable||{{#ifeq: {{{border|}}} | no | center | thumbimage }}}} noresize" style="width:{{#if:{{{width|}}}| {{{width}}}px | auto }};{{#ifeq: {{{mode|}}} | scrollable|overflow:auto;{{#ifeq:{{{dir|}}}|rtl|direction:rtl;}}}}{{{innerstyle|}}}">{{#ifeq: {{{mode|}}} | scrollable|<div style="white-space:nowrap">}}{{{content}}}{{#ifeq: {{{mode|}}} | scrollable|</div>}}</div>{{#ifeq: {{{pos|}}} | top || {{#if:{{{caption|}}}|<div class="thumbcaption">{{#if: {{{link|}}} | <div style="float:right">{{{linkoverride|[[File:Desc-i.svg|16px|link={{{link}}}{{#if: {{{link_text|}}} | {{!}}{{{link_text}}}}}]]}}}</div> }}{{{caption|}}}</div>}} }}</div></div>{{#ifeq: {{{align|}}} | center | </div> }}</includeonly><noinclude>{{Documentation}}</noinclude>
<div {{#if: {{{width|}}} | style="width:{{{width}}}px;" |}}>
{{{content}}}
<div class="thumbcaption">
{{#if: {{{link|}}} | <div class="magnify" style="float:right"><a href="/wiki/{{{link}}}" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div> |}}
{{{caption}}}
</div>
</div>
</div></includeonly><noinclude>
== Description ==
This template creates a frame like those surrounding images. This template was created mainly to put two or more images into a frame together.
 
== Usage ==
 
<nowiki> {{imageframe | width=175 | content= [[Image:TSR1New.jpg|80px]] [[Image:TSR2New.jpg|80px]] | caption=Channel logos }} </nowiki>
 
will cause:
 
{{Imageframe | width=175 | content= [[Image:TSR1New.jpg|80px]] [[Image:TSR2New.jpg|80px]] | caption=Channel logos }}
 
Note, do not add "px" to the width: ie, use width=175 and not width=175px.
== Parameters ==
; content : Content of the main section (generally images)
; caption : Content of the caption section
; width : ''(Optional)'' Width of the DIV, in pixels
; link : ''(Optional)'' Link for the "Enlarge" image in the caption.
 
[[Category:Miscellaneous templates]]
</noinclude>

Latest revision as of 17:52, 23 August 2019

Documentation: