Template:Superimpose/doc

From Homecoming Wiki
< Template:Superimpose
Revision as of 13:05, 12 January 2021 by Aberrant (historical) (talk) (Updated category.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This is a documentation subpage for Template:Superimpose (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

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 = Power_Set_Icon-Support.png
  | base_width = 64px
  | base_caption = Support power sets are standard sets, they do not require purchase on the Paragon Market.
  | float = Wiki-Glyph.png
  | float_width = 16px
  | float_caption = This icon contains unofficial, user-contributed artwork.
  | float_link = Wiki-Glyph.png
  | x = 46
  | y = 46
}}

Yields:

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. 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.