Template:Superimpose2/doc: Difference between revisions

From squad.gamelibra.com
Jump to navigation Jump to search
en>Iorsh
(Allow 52 images (complete card deck))
 
(Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> === Usage === <pre> {{Superimpose2 | align = | border = | collapse = | base = | base_style = | base_width = px | base_alt = | base_caption = | base_link = | float = | float_width = px | float_alt = | float_caption = | link = | x = | y = | t = | float2 = | float2_width = px | float2_alt = | float2_caption = | link2 = | x2 =...")
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
This is a template expanded from {{tl|Superimpose}}. This version supports up to 52-layer image [[superimposition]].


=== Usage ===
=== Usage ===
Line 40: Line 39:
   | t3 =  
   | t3 =  
}}</pre>
}}</pre>
===Example===
The Wikisyntax below will create the image at right:
{{Superimpose2
  | border = 1
  | collapse = 1
  | base = Hong Kong Railway Route Map blank.svg
  | base_width = 250px
  | base_style = float: right
  | base_alt = A geographical accurate map of Hong Kong areas with only its rapid transit system lines detailed on it.
  | base_caption = Hong Kong MTR system map
  | base_link = MTR
  | float = Red Dot.svg
  | float_width = 10px
  | float_alt = a red station icon
  | float_caption = Kam Sheung Road
  | link = Kam Sheung Road Station
  | t = Kam Sheung Road
  | x = 107
  | y = 80
  | float2 = Green Dot.svg
  | float2_width = 10px
  | float2_alt = a green station icon
  | float2_caption = Quarry Bay
  | link2 = Quarry Bay Station
  | x2 = 200
  | y2 = 180
  | t2 = Quarry Bay
}}
<div style="margin-right: 300px;">
<pre style="border:0px;overflow:auto;">
{{Superimpose2
  | border = 1
  | collapse = 1
  | base = Hong Kong Railway Route Map blank.svg
  | base_width = 250px
  | base_style = float: right
  | base_alt = A geographical accurate map of Hong Kong areas with only its rapid transit system lines detailed on it.
  | base_caption = Hong Kong MTR system map
  | base_link = MTR
  | float = Red Dot.svg
  | float_width = 10px
  | float_alt = a red station icon
  | float_caption = Kam Sheung Road
  | link = Kam Sheung Road Station
  | t = Kam Sheung Road
  | x = 107
  | y = 80
  | float2 = Green Dot.svg
  | float2_width = 10px
  | float2_alt = a green station icon
  | float2_caption = Quarry Bay
  | link2 = Quarry Bay Station
  | x2 = 200
  | y2 = 180
  | t2 = Quarry Bay
}}
</pre>
</div>
<div style="clear: both"></div>


=== Parameter definitions ===
=== Parameter definitions ===
Line 109: Line 47:
* '''base_style''': Additional CSS code
* '''base_style''': Additional CSS code
* '''base_width''': Width to display the base image, ''in pixels''
* '''base_width''': Width to display the base image, ''in pixels''
* '''base_alt''': [[alt attribute]] for the base image, text for visually impaired readers; see [[WP:ALT]] for properly written alt text
* '''base_alt''': [https://en.wikipedia.org/wiki/Alt_attribute alt attribute] for the base image, text for visually impaired readers; see [https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Accessibility/Alternative_text_for_images WP:ALT] for properly written alt text
* '''base_caption''': Title attribute for the base image, served as the pop-up tooltip message when mouse lays over it.
* '''base_caption''': Title attribute for the base image, served as the pop-up tooltip message when mouse lays over it.
** The pop-up message will display the alt text instead of title text in IE7 and older versions. This interpretation is now considered incorrect.
** The pop-up message will display the alt text instead of title text in IE7 and older versions. This interpretation is now considered incorrect.
Line 123: Line 61:
* '''link''': Linking for the 1st layer image
* '''link''': Linking for the 1st layer image
** When applying the 2nd-50th layer, add the number after all of the words ''float'', ''x'', ''y'', ''t'' and ''link'' of floating image-related parameters to indicate their layer order as shown in the example. The image of the greater number will always appears over the smaller number layer.
** When applying the 2nd-50th layer, add the number after all of the words ''float'', ''x'', ''y'', ''t'' and ''link'' of floating image-related parameters to indicate their layer order as shown in the example. The image of the greater number will always appears over the smaller number layer.
=== Transwiki note ===
* Superimpose2 has the downward compactibility with the original {{tl|Superimpose}}, if the later does not exist in your working Wiki, you can ignore the original and transwiki this version only. Preferably making a [[WP:redirect]].
* Remember to copy {{tl|Superimpose2/base}} as well during transwiki.
=== See also ===
* {{tl|Annotated image}}, allows text notes to overlap image, allows cropping
* {{tl|Superimpose}}, supports simpler layer superimposition.
* {{tl|Location map}}, places a single image over another at a map coordinate location
* {{tl|Lageplan}}, related template to Location map with specific features
* {{tl|Overlay}}, allows multiple annotations to be place over an image with a legend
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Graphics templates]]
}}</includeonly>

Revision as of 15:21, 10 March 2023

Template:Mbox

Usage

{{Superimpose2
  | align =
  | border = 
  | collapse = 
  | base = 
  | base_style =
  | base_width = px
  | base_alt = 
  | base_caption = 
  | base_link = 
  | float = 
  | float_width = px
  | float_alt = 
  | float_caption = 
  | link = 
  | x = 
  | y = 
  | t = 
  | float2 = 
  | float2_width = px
  | float2_alt = 
  | float2_caption = 
  | link2 = 
  | x2 = 
  | y2 = 
  | t2 = 
  | float3 = 
  | float3_width = px
  | float3_alt = 
  | float3_caption = 
  | link3 = 
  | x3 = 
  | y3 = 
  | t3 = 
}}

Parameter definitions

  • align: Alignment of the base image in the content
  • border: Grey border line around the image rim to distinguish from the pale background if necessary. Any input will activate the border. Empty entry for no border by default.
  • collapse: enabling the [show/hide] button to toggle the display of overlap layer.
  • base: File name of the base (bottom) image
  • base_style: Additional CSS code
  • base_width: Width to display the base image, in pixels
  • base_alt: alt attribute for the base image, text for visually impaired readers; see WP:ALT for properly written alt text
  • base_caption: Title attribute for the base image, served as the pop-up tooltip message when mouse lays over it.
    • The pop-up message will display the alt text instead of title text in IE7 and older versions. This interpretation is now considered incorrect.
  • base_link: Linking for the base image
  • float: File name of the 1st layer image
  • float_width: Width to display the 1st layer image, in pixels
  • float_alt: alt attribute for the 1st layer image
  • float_caption: Title attribute for the 1st layer image, served as the pop-up tooltip message when mouse lays over it.
  • x: Distance to offset the 1st layer image from the left edge of the base image, in pixels
  • y: Distance to offset the 1st layer image from the top edge of the base image, in pixels
  • t: Text for the 1st layer
    • If the text exceeding the border of the base dimension is undesirable, use another layer specifically for the text only.
  • link: Linking for the 1st layer image
    • When applying the 2nd-50th layer, add the number after all of the words float, x, y, t and link of floating image-related parameters to indicate their layer order as shown in the example. The image of the greater number will always appears over the smaller number layer.