Template:Image frame

From bg3.wiki
Revision as of 17:10, 20 July 2024 by NtCarlson (talk | contribs) (Created page with "<includeonly>{{#lvardef: clip-path|{{#switch:{{{border-shape|diamond}}} | diamond = polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%) | rounded = xywh(0 0 100% 100% round 15%); | #default = {{{border-shape}}} }}}}<div style=" display: inline-block; height: calc({{{height|100px}}} + 2*{{{border-width|4px}}}); width: calc({{{height|100px}}} + 2*{{{border-width|4px}}}); clip-path: {{#lvar:clip-path}}; background: {{{border-color|black}}}; "> <div style=" position: a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Renders an image cropped into a frame of arbitrary shape.

Examples

Markup Renders as
{{User:NtCarlson/Template:Foo
| height = 120px
| border-shape = diamond
| border-width = 4px
}}

User:NtCarlson/Template:Foo

{{User:NtCarlson/Template:Foo
| height = 120px
| border-shape = rounded
| border-width = 2px
| border-color = red
}}

User:NtCarlson/Template:Foo

{{User:NtCarlson/Template:Foo
| height = 120px
| border-shape = polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
| border-width = 2px
| border-color = #3d3d3d
}}

User:NtCarlson/Template:Foo