Template:ImageText: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(picture now links) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div class="lodwiki-imagetext" style="display: inline-table; margin: 5px;"> | <includeonly><div class="lodwiki-imagetext" style="display: inline-table; margin: 5px;"> | ||
<div class="lodwiki-imagetext-image" style="display: flex; justify-content: center; align-items: center; width: {{{w| | <div class="lodwiki-imagetext-image" style="display: flex; justify-content: center; align-items: center; width: {{{w|120}}}px; height: {{{h|150}}}px;" | ||
>[[File:{{{1}}} |{{{2}}}|link={{{ | >[[File:{{{1}}}|{{{w|120}}}x{{{h|150}}}px|{{{2}}}|link={{{2}}}]]</div> | ||
<div class="lodwiki-imagetext-text" style="width: {{{w| | <div class="lodwiki-imagetext-text" style="width: {{{w|120}}}px; text-align: center; {{#if: {{{font size|}}} | font-size: {{{font size}}}; }}" | ||
> | >[[{{{2}}}]]</div> | ||
</div></includeonly><noinclude> | </div></includeonly><noinclude> | ||
Line 9: | Line 9: | ||
The element will be an inline block, meaning several can appear in one line. You can give them all a specific width and height to get a nice consistent layout. | The element will be an inline block, meaning several can appear in one line. You can give them all a specific width and height to get a nice consistent layout. | ||
Code I had to take out >{{#if: {{{link|}}} | [[{{{link}}}|{{{2}}}]] | {{{2}}} }}</div> | |||
---- | ---- | ||
Line 15: | Line 17: | ||
<pre> | <pre> | ||
{{ImageText | DartFeld120x150.jpg | Dart}} | {{ImageText | DartFeld120x150.jpg | Dart }} | ||
{{ImageText | | {{ImageText | Meru120x150.jpg | Villians }} | ||
{{ImageText | Passive Feature Generic Icon.png | | {{ImageText | Passive Feature Generic Icon.png | Allies}} | ||
</pre> | </pre> | ||
Result: | Result: | ||
{{ImageText | | {{ImageText | DartFeld120x150.jpg | Dart }} | ||
{{ImageText | | {{ImageText | Meru120x150.jpg | Villians }} | ||
{{ImageText | Passive Feature Generic Icon.png | | {{ImageText | Passive Feature Generic Icon.png | Allies}} |
Latest revision as of 06:46, 23 February 2024
This template allows you to add images on top of a piece of text.
The element will be an inline block, meaning several can appear in one line. You can give them all a specific width and height to get a nice consistent layout.
Code I had to take out >{{#if: | [[{{{link}}}|{{{2}}}]] | {{{2}}} }}
Standard width/height is 100:
{{ImageText | DartFeld120x150.jpg | Dart }} {{ImageText | Meru120x150.jpg | Villians }} {{ImageText | Passive Feature Generic Icon.png | Allies}}
Result: