Template:Quote fancy: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Massively cleaned up template with the help of external CSS)
(Added image position parameter)
Line 1: Line 1:
<includeonly><templatestyles src="ImageQuote/style.css" /><div class="bg3wiki-image-quote">
<includeonly>
<!-- Import template-specific CSS -->
<templatestyles src="ImageQuote/style.css" />
<div style="justify-content:{{{align|left}}}; flex-direction:{{#ifeq:{{{image-position|}}}|right|row-reverse|row}}" class="bg3wiki-image-quote">
<!-- Quote image -->
<!-- Quote image -->
[[File:{{{image}}}|x{{{height|80px}}}|link={{{link|}}}|class=bg3wiki-image-quote-image]]
{{#if:{{{image|}}}|[[File:{{{image|}}}|x{{{height|80px}}}|link={{{link|}}}|class=bg3wiki-image-quote-image]]}}
<!-- Container for the quote and the author/attribution if present -->
<!-- Container for the quote and the author/attribution if present -->
<div style="display: flex; flex-direction: column;">
<div style="display: flex; flex-direction: column;">
   <!-- Formatted quote -->
   <!-- Formatted quote -->
   <blockquote class="bg3wiki-image-quote-blockquote-right" style="font-size:{{{font-size|130%}}}">
   <blockquote class="bg3wiki-image-quote-blockquote-{{{image-position|left}}}" style="font-size:{{{font-size|130%}}}">
     <div style="display:flex;align-items:center>
     <div style="display:flex;align-items:center>
       <!-- Starting quotation mark. Aligned with the top-left corner of the quote text -->
       <!-- Starting quotation mark. Aligned with the top-left corner of the quote text -->
Line 40: Line 43:
| rounding = 20%
| rounding = 20%
| font-size = 120%
| font-size = 120%
| align = center
}}
</nowiki>
| <nowiki>
{{ImageQuote
| quote = The strong embrace the wild that hides inside - keen instincts, primal physicality, and most of all, an unbridled, unquenchable rage.
| image = Class Barbarian Badge Icon.png
| image-position = right
| height = 160px
| font-size = 120%
| link = Barbarian
| align = center
| align = center
}}
}}
Line 86: Line 100:
             "type": "string",
             "type": "string",
             "example": "left, right, center",
             "example": "left, right, center",
            "default": "left"
},
        "image-position": {
"label": "Image position",
"description": "Position of the image relative to the quote",
            "type": "string",
            "example": "left, right",
             "default": "left"
             "default": "left"
},
},
Line 97: Line 118:
},
},
     "description": "Display a quote with an accompanying image which are aligned with each other",
     "description": "Display a quote with an accompanying image which are aligned with each other",
     "format": "block",
     "format": "block"
"paramOrder": [
"quote",
"image",
        "author",
"font-size",
"rounding",
        "align",
        "height"
]
}
}
</templatedata>
</templatedata>

Revision as of 09:06, 20 July 2024

Display a quote with an accompanying image which are vertically aligned with each other.

Examples

Markup
{{ImageQuote
| quote = The operations of these huge steel juggernauts are powered by engines of churning hellfire. 
| image = Portrait Steel Watcher.png
| link = Adamantine Golem
}}
Renders as

Page Template:ImageQuote/style.css has no content.

Portrait Steel Watcher.png

The operations of these huge steel juggernauts are powered by engines of churning hellfire.
Markup
{{ImageQuote
| quote = These levitating eyes transmit all that they see to the one who created them.
| image = Portrait Scrying Eye.png
| author = In-game racial description of [[Scrying Eye]]s
| link = Scrying Eye
| height = 60px
| rounding = 20%
| font-size = 120%
| align = center
}}
Renders as

Page Template:ImageQuote/style.css has no content.

Portrait Scrying Eye.png

These levitating eyes transmit all that they see to the one who created them.
— In-game racial description of Scrying Eyes
Markup
{{ImageQuote
| quote = The strong embrace the wild that hides inside - keen instincts, primal physicality, and most of all, an unbridled, unquenchable rage.
| image = Class Barbarian Badge Icon.png
| image-position = right
| height = 160px
| font-size = 120%
| link = Barbarian
| align = center
}}
Renders as

Page Template:ImageQuote/style.css has no content.

Class Barbarian Badge Icon.png

The strong embrace the wild that hides inside - keen instincts, primal physicality, and most of all, an unbridled, unquenchable rage.

Template data

Display a quote with an accompanying image which are aligned with each other

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Quotequote

The quote

Stringrequired
Imageimage

Add an image to go along with the quote.

Example
Portrait Lae'zel.png
Fileoptional
Authorauthor

The author or context of the quote

Stringoptional
Font sizefont-size

Size of the font used for the quote.

Default
130%
Example
100%, 1.1em
Stringoptional
Roundingrounding

The amount of rounding applied to the image.

Default
15%
Example
50%, 20px
Stringoptional
Alignmentalign

Horizontal alignment of the quote

Default
left
Example
left, right, center
Stringoptional
Image positionimage-position

Position of the image relative to the quote

Default
left
Example
left, right
Stringoptional
Heightheight

The height of the image

Default
80px
Example
60px, 4em
Stringoptional