Template:ImageText: Difference between revisions

From The Political Machine - Official Wiki
Jump to navigation Jump to search
(Created page with "<div class="tpm-imagetext" style="display: inline-table; margin: 5px;"> <div class="tpm-imagetext-image" style="display: flex; justify-content: center; align-items: center; width: {{{w|100}}}px; height: {{{h|100}}}px;" >[[File:{{{1}}}|{{{w|100}}}x{{{h|100}}}px|{{{2}}}|link={{{link|}}}]]</div> <div class="bg3wiki-imagetext-text" style="width: {{{w|100}}}px; text-align: center; {{#if: {{{font size|}}} | font-size: {{{font size}}}; }}" >{{#if: {{{link|}}} | {{{link}}}|{{{...")
 
No edit summary
Line 1: Line 1:
<div class="tpm-imagetext" style="display: inline-table; margin: 5px;">
<includeonly><div class="tpm-imagetext" style="display: inline-table; margin: 5px;">
<div class="tpm-imagetext-image" style="display: flex; justify-content: center; align-items: center; width: {{{w|100}}}px; height: {{{h|100}}}px;"
<div class="tpm-imagetext-image" style="display: flex; justify-content: center; align-items: center; width: {{{w|100}}}px; height: {{{h|100}}}px;"
>[[File:{{{1}}}|{{{w|100}}}x{{{h|100}}}px|{{{2}}}|link={{{link|}}}]]</div>
>[[File:{{{1}}}|{{{w|100}}}x{{{h|100}}}px|{{{2}}}|link={{{link|}}}]]</div>
<div class="bg3wiki-imagetext-text" style="width: {{{w|100}}}px; text-align: center; {{#if: {{{font size|}}} | font-size: {{{font size}}}; }}"
<div class="bg3wiki-imagetext-text" style="width: {{{w|100}}}px; text-align: center; {{#if: {{{font size|}}} | font-size: {{{font size}}}; }}"
>{{#if: {{{link|}}} | [[{{{link}}}|{{{2}}}]] | {{{2}}} }}</div>
>{{#if: {{{link|}}} | [[{{{link}}}|{{{2}}}]] | {{{2}}} }}</div>
</div>
</div></includeonly><noinclude>
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.
 
----
 
Standard width/height is 100:
 
<pre>
{{ImageText | America.png | USA }}
</pre>
 
Result:
 
{{ImageText | America.png | USA }}
 
----
 
<pre>
{{ImageText | America.png | USA | w = 80 | h = 80 | font size = 80% }}
</pre>
 
Result:
 
{{ImageText | America.png | USA | w = 80 | h = 80 | font size = 80% }}
 
</noinclude>

Revision as of 15:54, 3 April 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.


Standard width/height is 100:

{{ImageText | America.png | USA }}

Result:

USA
USA

{{ImageText | America.png | USA | w = 80 | h = 80 | font size = 80% }}

Result:

USA
USA