Template:ImageText: Difference between revisions

From Legend of Dragoon - Wiki Project
Jump to navigation Jump to search
(need to save progress)
(mostly working)
Line 3: Line 3:
>[[File:{{{1}}}|{{{w|120}}}x{{{h|150}}}px|{{{2}}}|link={{{link|}}}]]</div>
>[[File:{{{1}}}|{{{w|120}}}x{{{h|150}}}px|{{{2}}}|link={{{link|}}}]]</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}}}; }}"
>{{#if: {{{link|}}} | [[{{{link}}}|{{{2}}}]] | {{{2}}} }}</div>
>[[{{{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 | Frenzy Icon.png | Dart}}
{{ImageText | DartFeld120x150.jpg | Dart }}
{{ImageText | Defensive Duellist Icon.png | Villians}}
{{ImageText | Meru120x150.jpg | Villians }}
{{ImageText | Passive Feature Generic Icon.png | Just a test with very very long text }}
{{ImageText | Passive Feature Generic Icon.png | Allies}}
</pre>
</pre>


Result:
Result:


{{ImageText | DartFeld120x150.jpg | Dart | }}
{{ImageText | DartFeld120x150.jpg | Dart }}
{{ImageText | Meru120x150.jpg | Villians }}
{{ImageText | Meru120x150.jpg | Villians }}
{{ImageText | Passive Feature Generic Icon.png | Just a test with very very long text }}
{{ImageText | Passive Feature Generic Icon.png | Allies}}

Revision as of 04:27, 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: