Template

Superimpose

From Dogcraft Wiki

imported>William
No edit summary
imported>William
No edit summary
Line 3: Line 3:
   | <div style="position: absolute; left: {{{x|0}}}px; top: {{{y|0}}}px; padding: 0;"><!--
   | <div style="position: absolute; left: {{{x|0}}}px; top: {{{y|0}}}px; padding: 0;"><!--
       -->[[Image:{{{float}}}|{{if empty|{{{float_width|{{{width|}}}}}}|0px}}{{#ifeq:{{{float_link|}}}|file:||{{!}}link={{{float_link|}}}}}|alt={{{float_alt|}}}|{{{float_caption|}}}]]</div>
       -->[[Image:{{{float}}}|{{if empty|{{{float_width|{{{width|}}}}}}|0px}}{{#ifeq:{{{float_link|}}}|file:||{{!}}link={{{float_link|}}}}}|alt={{{float_alt|}}}|{{{float_caption|}}}]]</div>
}}[[Image:{{{base|blank.png}}}|{{if empty|{{{base_width|{{{width|}}}}}}|0px}}{{#ifeq:{{{base_link|file:}}}|file:||{{!}}link={{{base_link|file:}}}}}|alt={{{base_alt|}}}|{{{base_caption|}}}]]</div>
}}[[Image:{{{base|blank.png}}}|{{if empty|{{{base_width|{{{width|}}}}}}|0px}}{{#ifeq:{{{base_link|file:}}}|file:||{{!}}link={{{base_link|file:}}}}}|alt={{{base_alt|}}}|{{{base_caption|}}}]]</div>{{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using superimpose with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Superimpose]] with unknown parameter "_VALUE_"|ignoreblank=y| align | base | base_alt | base_caption | base_link | base_width | float | float_alt | float_caption | float_link | float_width | width | x | y }}<noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
 
 
{{Superimpose
  | base = 2020-01-10-Grand-Map-complete-hiRez.png
  | base_width = 200px
  | base_alt = Location test
  | base_caption = Grand Map of Survival 3
  | float = Red pog.svg
  | float_width = 15px
  | x = 1
  | y = 80
}}
</noinclude>

Revision as of 23:28, 14 January 2020

Template documentation[view] [edit] [history] [purge]

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 1

{{Superimpose
  | base = 2020-01-10-Grand-Map-complete-hiRez.png
  | base_width = 2000px
  | 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 = 1
  | y = 80
}}


Template loop detected: Template:Superimpose </noinclude>

Example 2

{{Superimpose
  | align = center
  | base = Riksveier Hedmark Sør-Trøndelag.svg
  | width = 180px
  | base_link = File:Riksveier Hedmark Sør-Trøndelag.svg
  | float = Loc Rv3.svg
  | float_link = File:Loc Rv3.svg
}}


Template loop detected: Template:Superimpose </noinclude>

Using the Template

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

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

Template:Col-float-break or Template:Col-float-break

{{Superimpose
  | align = 
  | width = 
  | base = 
  | float = 
  | float_caption =
}}

Template:Col-float-end

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

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

Parameter definitions

  • align: left, right, center, or none
  • base: File name of the base (underlying) image.
  • base_width: Width to display the base image, in pixels. If not specified, then defaults to the width.
  • 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, e.g. 10px. If not specified, then defaults to the width.
  • 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.
  • width: Default width for both the base and float. This is not required if base_width and float_width are both specified.
  • 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.

Tracking category

See also

  • {{Annotated image}}, allows text notes to overlap image, allows cropping
  • {{Superimpose2}}, supports more layer superimposition.
  • {{Location map}}, places a mark on a map at the specified geographical coordinates.
  • {{Location map+}}, places one or more marks on a map at the specified geographical coordinates.
  • {{Location mark}}, places a mark on a map using relative coordinates.
  • {{Location mark+}}, one or more marks on a map using relative coordinates.
  • {{Site plan}}, related template which superimposes one image on another with different features
  • {{Overlay}}, allows multiple annotations to be placed over an image with a legend



Template loop detected: Template:Superimpose </noinclude>

This page was last modified on 14 January 2020, at 23:28. (11 months ago)
Background SRN Opening by Montenator