Template:Superimpose/doc: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(usage (copied from talk))
No edit summary
 
(46 intermediate revisions by 28 users not shown)
Line 1: Line 1:
<includeonly>:''This template documentation is [[Wikipedia:Template doc page pattern|transcluded]] from [[{{FULLPAGENAME}}/doc]]'' [<span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}/doc|action=edit}} edit]</span>]</includeonly>
'''{{tl|Superimpose}}''' is a utility template which superimposes one image on top another. The position of the superimposed image is relative to the top left corner of the underlying image. It is often used to display a location mark on a map image, but it can be used with any two images.
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->__NOTOC__
 
==Usage==
==Usage==


===Example===
===Example===


<div style="float: right;">
{| style="width: 100%; margin-top: 1em"
{{Superimpose| base = US_Locator_Blank.svg
|<pre style="margin-top: 0">
{{Superimpose
  | base = US_Locator_Blank.svg
   | base_width = 288px
   | base_width = 288px
  | base_alt = Located in north central Colorado, which is just west of the center of the U.S.
   | base_caption = United States Locator Map
   | base_caption = United States Locator Map
   | float = Locator_Dot.gif
   | float = Red pog.svg
   | float_width = 10px
   | float_width = 10px
  | float_caption = Boulder, Colorado
   | x = 95
   | x = 83
   | y = 80
   | y = 53
}}</pre>
}}
|-
</div>
|<div style="float: left;">
 
{{Superimpose
The wikicode below will create the image at right:
  | base = US_Locator_Blank.svg
 
<div style="margin-right: 300px;">
<pre>
{{Superimpose| base = US_Locator_Blank.svg
   | base_width = 288px
   | base_width = 288px
  | base_alt = Located in north central Colorado, which in turn is just west of the center of the U.S.
   | base_caption = United States Locator Map
   | base_caption = United States Locator Map
   | float = Locator_Dot.gif
   | float = Red pog.svg
   | float_width = 10px
   | float_width = 10px
  | float_caption = Boulder, Colorado
   | x = 95
   | x = 83
   | y = 80
   | y = 53
}}</div>
}}
|}
</pre>
{{clear}}
</div>
 
<div style="clear: both"></div>


=== Using the Template ===
=== Using the Template ===
Line 39: Line 36:
To get started, you can simply copy this blank definition into your page, and fill in the data.
To get started, you can simply copy this blank definition into your page, and fill in the data.


<pre>
<pre style="width: 15em;">
{{Superimpose| base =  
{{Superimpose
  | base =
  | base_width =
  | base_alt =
  | base_caption =
  | float =
  | float_width =
  | x =
  | y =
}}
</pre>
 
The following blank definition includes all the parameters, including those less-commonly used.
 
<pre style="width: 15em;">
{{Superimpose
  | base =  
   | base_width =  
   | base_width =  
  | base_alt =
   | base_caption =  
   | base_caption =  
  | base_link =
   | float =  
   | float =  
  | float_alt =
   | float_width =  
   | float_width =  
   | float_caption =  
   | float_caption =  
  | float_link =
   | x =  
   | x =  
   | y =  
   | y =  
Line 53: Line 70:
=== Parameter Definitions ===
=== Parameter Definitions ===


* '''base:''' File name of the base (bottom) image
* '''base:''' File name of the base (underlying) image.
* '''base_width:''' Width to display the base image, ''in pixels''
* '''base_width:''' Width to display the base image, in [[w:pixel|pixel]]s.
* '''base_caption:''' Text to show when a user's mouse hovers over the base image
* '''base_alt:''' [[w:Alt text|Alt text]] for the image, for visually users; see [[WP:ALT]]. This should describe the composite image.
* '''float:'''  File name of the top image
* '''base_caption:''' Text to show when the mouse courser hovers over the base image; ignored if '''base_link''' is specified to be empty.
* '''float_width:'''  Width to display the top image, ''in pixels''
* '''base_link:''' Name of page that the user will be sent to if they click on the base image. The special value "<code>file:</code>", stands for the file page for the base image. If empty, nothing happens if the user clicks on the base image. The default is "<code>file:</code>".
* '''float_caption:''' Text to show when a user's mouse hovers over the top image
* '''float:'''  File name of the superimposed image.
* '''x:''' distance to offset the top image from the left edge of the base image, ''in pixels or any other CSS-standard units''
* '''float_width:'''  Width to display the superimposed image, in pixels.
* '''y:''' distance to offset the top image from the top edge of the base image, ''in pixels or any other CSS-standard units''
* '''float_alt:''' Alt text for the superimposed image. This is needed only if '''float_link''' is nonempty. Normally the alt text for the base image describes the combination of the two images, and this parameter is not needed.
 
* '''float_caption:''' Text to show when the mouse courser hovers over the superimposed image; ignored if '''float_link''' is missing or empty
=== A Note about the Locator Dot ===
* '''float_link:''' Name of page that the user will be sent to if they click on the superimposed image. This acts like '''base_link''', except it is for the top image, and it defaults to empty.
 
* '''x:''' distance to offset the left edge of the superimposed image from the left edge of the base image, in pixels or any other [http://w3schools.com/cssref/css_units.asp CSS units].
I originally built this template thinking I could use an SVG file with transparency (mostly for the dot in locator maps). However, it seems Internet Explorer users can't handle transparent PNGs without a fix that Wikimedia's not yet delivering, so for now I recommend using the GIF version in the example above. When IE better supports PNGs, we can swap the better format back in.
* '''y:''' distance to offset the top edge of the superimposed image from the top edge of the base image, in pixels or any other CSS units.
&mdash;[[User:Papayoung|Papayoung]] [[User_talk:Papayoung|&#9775;]] 02:06, 26 October 2005 (UTC)


<includeonly>
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Formatting templates]]
[[Category:Graphic templates]]
 
<!-- ADD INTERWIKIS BELOW THIS LINE -->
[[de:Vorlage:Bild mit Markierung]]
[[es:Plantilla:Sobrepuesto]]
[[fi:Malline:Superimpose]]
[[fr:Modèle:Superpose]]
[[he:תבנית:החפפת תמונה]]
[[kn:Template:Superimpose]]
[[nl:Sjabloon:Superimpose]]
[[ro:Format:Suprapunere]]
[[rmy:Format:Opralthovipen]]
</includeonly>
</includeonly>

Latest revision as of 10:46, 13 June 2013

{{Superimpose}} is a utility template which superimposes one image on top another. The position of the superimposed image is relative to the top left corner of the underlying image. It is often used to display a location mark on a map image, but it can be used with any two images.

Usage

Example

{{Superimpose
  | base = US_Locator_Blank.svg
  | base_width = 288px
  | base_alt = Located in north central Colorado, which is just west of the center of the U.S.
  | base_caption = United States Locator Map
  | float = Red pog.svg
  | float_width = 10px
  | x = 95
  | y = 80
}}
Located in north central Colorado, which in turn is just west of the center of the U.S.

Using the Template

To get started, you can simply copy this blank definition into your page, and fill in the data.

{{Superimpose
  | base = 
  | base_width = 
  | base_alt = 
  | base_caption = 
  | float = 
  | float_width = 
  | x = 
  | y = 
}}

The following blank definition includes all the parameters, including those less-commonly used.

{{Superimpose
  | base = 
  | base_width = 
  | base_alt = 
  | base_caption = 
  | base_link = 
  | float = 
  | float_alt = 
  | float_width = 
  | float_caption = 
  | float_link = 
  | x = 
  | y = 
}}

Parameter Definitions

  • base: File name of the base (underlying) image.
  • base_width: Width to display the base image, in pixels.
  • base_alt: Alt text for the image, for visually users; see WP:ALT. This should describe the composite image.
  • base_caption: Text to show when the mouse courser hovers over the base image; ignored if base_link is specified to be empty.
  • base_link: Name of page that the user will be sent to if they click on the base image. The special value "file:", stands for the file page for the base image. If empty, nothing happens if the user clicks on the base image. The default is "file:".
  • float: File name of the superimposed image.
  • float_width: Width to display the superimposed image, in pixels.
  • float_alt: Alt text for the superimposed image. This is needed only if float_link is nonempty. Normally the alt text for the base image describes the combination of the two images, and this parameter is not needed.
  • float_caption: Text to show when the mouse courser hovers over the superimposed image; ignored if float_link is missing or empty
  • float_link: Name of page that the user will be sent to if they click on the superimposed image. This acts like base_link, except it is for the top image, and it defaults to empty.
  • x: distance to offset the left edge of the superimposed image from the left edge of the base image, in pixels or any other CSS units.
  • y: distance to offset the top edge of the superimposed image from the top edge of the base image, in pixels or any other CSS units.