Difference between revisions of "Template:Click"

From Twinsuniverse
Jump to: navigation, search
m (4 revisions)
(added infobox)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="position: relative; width: {{{width}}}; height: {{{height}}}; overflow: hidden">
+
<includeonly>
<div style="position: absolute; top: 0px; right: 0px; font-size: 100px; overflow: hidden; line-height: 100px; z-index: 3">[[{{{link}}}|&nbsp;&nbsp;&nbsp;]]</div>
+
[[File:{{{image}}}|{{{width}}}|link={{{link}}}]]
<div style="position: absolute; top: 0px; right: 0px; z-index: 2">[[Image:{{{image}}}|{{{width}}}|{{{link}}}]]</div>
+
</includeonly><noinclude>{{Infobox Template
</div>
+
|purpose=formatting
</includeonly>
+
|singletag=no
 +
|multiline=no
 +
|gamerelated=no
 +
|suppressible=
 +
|choice=
 +
|cat1=
 +
|var1=
 +
}}
  
<noinclude>==How to use==
+
This template is used to create an image that points to it's article page, rather than it's file description page.
 +
 
 +
Proper uses of this template includes an image gallery, where the linked-to article itself would link back to the image file page anyway.
 +
 
 +
'''''Note''': please avoid using this template on a regular basis though, as it shortcuts the convention of always linking to the file page, which is custom to MediaWiki sites like this.''
 +
 
 +
==Parameters==
 +
* '''image''': the filename to the image
 +
* '''width''': the width of the rendered image (should end with "px", e.g. 200px)
 +
* '''link''': the link to follow if the image is clicked (i.e. an article name)
 +
 
 +
==Syntax==
 
To use this template, copy this line, and fill in the variables:
 
To use this template, copy this line, and fill in the variables:
  <nowiki>{{Click|image=|width=|height=|link=}}</nowiki>
+
  <nowiki>{{click|image=|width=|link=}}</nowiki>
  
Note that the width and height variables should end with "px" (e.g. 200px). The image variable only needs the file name. For example:
+
==Example==
  <nowiki>{{Click|image=TWINSEN.jpg|width=100px|height=200px|link=Twinsen}}</nowiki>
+
Filling in all parameters, this template could be used like this:
 +
  <nowiki>{{click|image=Twinsen.jpg|width=100px|link=Twinsen}}</nowiki>
  
Result:
+
:{{click|image=Twinsen.jpg|width=100px|link=Twinsen}}
{{Click|image=TWINSEN.jpg|width=100px|height=200px|link=Twinsen}}
+
  
[[Category:Twinsunica - Templates|{{PAGENAME}}]]</noinclude>
+
</noinclude>

Latest revision as of 10:31, 4 June 2014

Click
Purpose

Formatting [list all]

Single tag

No [list all]

Multi-line

No [list all]

Protected

No [list all]

Game related

No [list all]

Categorization
Categories

none [list all]

Variables
Names

none [list all]

Subpages

This template is used to create an image that points to it's article page, rather than it's file description page.

Proper uses of this template includes an image gallery, where the linked-to article itself would link back to the image file page anyway.

Note: please avoid using this template on a regular basis though, as it shortcuts the convention of always linking to the file page, which is custom to MediaWiki sites like this.

Parameters

  • image: the filename to the image
  • width: the width of the rendered image (should end with "px", e.g. 200px)
  • link: the link to follow if the image is clicked (i.e. an article name)

Syntax

To use this template, copy this line, and fill in the variables:

{{click|image=|width=|link=}}

Example

Filling in all parameters, this template could be used like this:

{{click|image=Twinsen.jpg|width=100px|link=Twinsen}}

Twinsen.jpg