Difference between revisions of "Template:Superimpose/doc"
From Pathfinder Wiki
m (48 revisions: import w:template:superimpose) |
|||
(19 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
− | {{ | + | '''{{tlf|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== | ==Usage== | ||
Line 8: | Line 8: | ||
===Example=== | ===Example=== | ||
− | < | + | {| style="width: 100%; margin-top: 1em" |
+ | |<pre style="margin-top: 0"> | ||
{{Superimpose | {{Superimpose | ||
| base = US_Locator_Blank.svg | | base = US_Locator_Blank.svg | ||
| base_width = 288px | | base_width = 288px | ||
− | | base_alt = Located in north central Colorado, which | + | | 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 = Red | + | | float = Red pog.svg |
| float_width = 10px | | float_width = 10px | ||
| x = 95 | | x = 95 | ||
| y = 80 | | y = 80 | ||
− | }} | + | }}</pre> |
− | </ | + | |- |
− | < | + | |<div style="float: left;"> |
{{Superimpose | {{Superimpose | ||
| base = US_Locator_Blank.svg | | base = US_Locator_Blank.svg | ||
Line 26: | Line 27: | ||
| base_alt = Located in north central Colorado, which in turn is just west of the center of the U.S. | | 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 = Red | + | | float = Red pog.svg |
| float_width = 10px | | float_width = 10px | ||
| x = 95 | | x = 95 | ||
| y = 80 | | y = 80 | ||
− | }} | + | }}</div> |
− | </ | + | |} |
− | + | {{clear}} | |
− | |||
=== Using the Template === | === Using the Template === | ||
Line 39: | Line 39: | ||
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 | {{Superimpose | ||
| base = | | base = | ||
Line 54: | Line 54: | ||
The following blank definition includes all the parameters, including those less-commonly used. | The following blank definition includes all the parameters, including those less-commonly used. | ||
− | <pre> | + | <pre style="width: 15em;"> |
{{Superimpose | {{Superimpose | ||
| base = | | base = | ||
Line 73: | Line 73: | ||
=== Parameter Definitions === | === Parameter Definitions === | ||
− | * '''base:''' File name of the base ( | + | * '''base:''' File name of the base (underlying) image. |
− | * '''base_width:''' Width to display the base image, | + | * '''base_width:''' Width to display the base image, in [[pixel]]s. |
− | * '''base_alt:''' [[Alt text]] for the image, for visually | + | * '''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 | + | * '''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 | + | * '''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:''' File name of the | + | * '''float:''' File name of the superimposed image. |
− | * '''float_width:''' Width to display the | + | * '''float_width:''' Width to display the superimposed image, in pixels. |
− | * '''float_alt:''' Alt text for the | + | * '''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 | + | * '''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 | + | * '''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 | + | * '''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]. |
− | * '''y:''' distance to offset the top image from the top edge of the base image, | + | * '''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. |
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
+ | * {{tl|Annotated image}}, allows text notes to overlap image, allows cropping | ||
* {{tl|Superimpose2}}, supports more layer superimposition. | * {{tl|Superimpose2}}, supports more layer superimposition. | ||
− | * {{tl|Location map}}, places a | + | * {{tl|Location map}}, places a mark on a map at the specified geographical coordinates. |
− | * {{tl|Lageplan}}, related template to | + | * {{tl|Location map+}}, places one or more marks on a map at the specified geographical coordinates. |
+ | * {{tl|Location mark}}, places a mark on a map using relative coordinates. | ||
+ | * {{tl|Location mark+}}, one or more marks on a map using relative coordinates. | ||
+ | * {{tl|Lageplan}}, related template which superimposes one image on another with different features | ||
+ | * {{tl|Overlay}}, allows multiple annotations to be place over an image with a legend | ||
+ | |||
<includeonly> | <includeonly> | ||
<!-- ADD CATEGORIES BELOW THIS LINE --> | <!-- ADD CATEGORIES BELOW THIS LINE --> | ||
− | [[Category: | + | [[Category:Graphics templates]] |
<!-- ADD INTERWIKIS BELOW THIS LINE --> | <!-- ADD INTERWIKIS BELOW THIS LINE --> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</includeonly> | </includeonly> |
Latest revision as of 01:40, 21 September 2018
Script error: No such module "Message box".
{{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 }} |
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.
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.
- {{Lageplan}}, related template which superimposes one image on another with different features
- {{Overlay}}, allows multiple annotations to be place over an image with a legend