Template:Quote fancy: Difference between revisions
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- | <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" | ||
} | } | ||
</templatedata> | </templatedata> |
Revision as of 08: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.
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.
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.
Template data
Display a quote with an accompanying image which are aligned with each other
Parameter | Description | Type | Status | |
---|---|---|---|---|
Quote | quote | The quote | String | required |
Image | image | Add an image to go along with the quote.
| File | optional |
Author | author | The author or context of the quote | String | optional |
Font size | font-size | Size of the font used for the quote.
| String | optional |
Rounding | rounding | The amount of rounding applied to the image.
| String | optional |
Alignment | align | Horizontal alignment of the quote
| String | optional |
Image position | image-position | Position of the image relative to the quote
| String | optional |
Height | height | The height of the image
| String | optional |