Template:ImageText: Difference between revisions

From Legend of Dragoon - Wiki Project
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|100}}}px; height: {{{h|100}}}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}}} |{{{2}}}|link={{{link|}}}]]</div>
>[[File:{{{1}}}|{{{w|120}}}x{{{h|150}}}px|{{{2}}}|link={{{2}}}]]</div>
<div class="lodwiki-imagetext-text" style="width: {{{w|100}}}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 | DartFeld120x150.jpg | Dart}}
{{ImageText | DartFeld120x150.jpg | Dart }}
{{ImageText | Defensive Duellist Icon.png | Backgrounds }}
{{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 | Frenzy Icon.png | Origins }}
{{ImageText | DartFeld120x150.jpg | Dart }}
{{ImageText | Defensive Duellist Icon.png | Backgrounds }}
{{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}}

Latest revision as of 07: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: