Template:Superimpose

From HorizonXI Wiki
Revision as of 15:44, 28 July 2023 by Aramachus (talk | contribs) (added chatgpt interpreted documentation on template behavior)


Superimpose Template

documentation by chatgpts interpretation of the template code, trust at your own risk

The "Superimpose" template allows you to overlay an image (called "float") on top of another image (called "base") using absolute positioning. This can be useful when you want to combine images or add annotations to an existing image.

Usage

To use the "Superimpose" template, follow this syntax:

{{Superimpose
| base = Base_image.jpg
| base_width = width_of_base_image
| float = Float_image.png
| float_width = width_of_float_image
| x = horizontal_position (optional, defaults to 0)
| y = vertical_position (optional, defaults to 0)
| align = [left, right, center] (optional, defaults to center)
| base_link = link_to_base_image (optional)
| float_link = link_to_float_image (optional)
| base_alt = alt_text_for_base_image (optional)
| float_alt = alt_text_for_float_image (optional)
| base_caption = caption_for_base_image (optional)
| float_caption = caption_for_float_image (optional)
}}


Parameters

  • `base`: The filename or file path of the base image that you want to display.
  • `base_width`: The width of the base image in pixels (e.g., "200px").
  • `float`: The filename or file path of the image that you want to float on top of the base image.
  • `float_width`: The width of the float image in pixels (e.g., "100px").
  • `x`: The horizontal position of the float image relative to the top-left corner of the base image (optional, defaults to 0).
  • `y`: The vertical position of the float image relative to the top-left corner of the base image (optional, defaults to 0).
  • `align`: The alignment of the entire superimposed image block (optional, defaults to center). Choose from "left," "right," or "center."
  • `base_link`: The optional link for the base image (e.g., "base_image.jpg").
  • `float_link`: The optional link for the float image (e.g., "float_image.png").
  • `base_alt`: The optional alternative text for the base image (used for accessibility).
  • `float_alt`: The optional alternative text for the float image (used for accessibility).
  • `base_caption`: The optional caption for the base image.
  • `float_caption`: The optional caption for the float image.