Template:Image frame

From bg3.wiki
Revision as of 20:19, 20 July 2024 by NtCarlson (talk | contribs) (Updated documentation)
Jump to navigation Jump to search
Template documentation

Render an image cropped into a frame of arbitrary shape. The shape of the border or frame is defined by a CSS clip-path or can use one of the predefined shapes (rounded, diamond, basic).

Examples

Markup Renders as
{{User:NtCarlson/Template:Foo
| image = Portrait Lae'zel.png
| link = Lae'zel
| width = 120
| border-shape = diamond
| border-width = 4
}}

User:NtCarlson/Template:Foo

{{User:NtCarlson/Template:Foo
| image = Portrait Lae'zel.png
| link = Lae'zel
| h  = 120
| bs = rounded
| bw = 2
| bc = red
}}

User:NtCarlson/Template:Foo

{{User:NtCarlson/Template:Foo
| image = Portrait Lae'zel.png
| link = Lae'zel
| height = 120
| border-shape = polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
| border-width = 2
| border-color = #3d3d3d
}}

User:NtCarlson/Template:Foo

{{User:NtCarlson/Template:Foo|Portrait Lae'zel.png|Lae'zel|h=120|bw=0}}

User:NtCarlson/Template:Foo

Template data

Render an image cropped into a frame of arbitrary shape.

Template parameters

ParameterDescriptionTypeStatus
Image1 image

The image file to display.

Filerequired
Link2 link

Clicking the image redirects to this link instead of the image file.

Page namesuggested
Heightheight h

The height of the image in pixels (does not include any additional height from the border size).

Default
Same value as width, if defined. 100 otherwise.
Numbersuggested
Widthwidth w

The width of the image in pixels (does not include any additional width from the border size).

Default
Same value as height, if defined. 100 otherwise.
Numberoptional
Border shapeborder-shape bs

The shape of the border frame. It can be an arbitrary CSS clip path or use one of the predefined values.

Suggested values
rounded diamond basic
Default
rounded
Example
polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)
Stringsuggested
Border colorborder-color bc

The color of the border frame. This can be any CSS color descriptor.

Default
black
Stringoptional
Border widthborder-width bw

The thickness of the border frame in pixels. Set this to 0 to disable the border entirely.

Default
4
Numberoptional