Template:ImageText: Difference between revisions
Jump to navigation
Jump to search
(mostly working) |
(picture now links) |
||
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|120}}}px; height: {{{h|150}}}px;" | <div class="lodwiki-imagetext-image" style="display: flex; justify-content: center; align-items: center; width: {{{w|120}}}px; height: {{{h|150}}}px;" | ||
>[[File:{{{1}}}|{{{w|120}}}x{{{h|150}}}px|{{{2}}}|link={{{ | >[[File:{{{1}}}|{{{w|120}}}x{{{h|150}}}px|{{{2}}}|link={{{2}}}]]</div> | ||
<div class="lodwiki-imagetext-text" style="width: {{{w|120}}}px; text-align: center; {{#if: {{{font size|}}} | font-size: {{{font size}}}; }}" | <div class="lodwiki-imagetext-text" style="width: {{{w|120}}}px; text-align: center; {{#if: {{{font size|}}} | font-size: {{{font size}}}; }}" | ||
>[[{{{2}}}]]</div> | >[[{{{2}}}]]</div> |
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: