Difference between revisions of "Template:ListFlag"

From blackwiki
Jump to navigation Jump to search
imported>Great Brightstar
(Limit the flag size to 100 × 100 square area)
imported>Great Brightstar
(Add some parameters)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{checker|}}}|<templatestyles src="ListFlag/styles.css" />}}<span class="noresize{{#if:{{{checker|}}}|&#32;checkered}}">[[File:{{{1|Flag of None.svg}}}|{{{2|100x100px}}}{{#if:{{{border|}}}||{{!}}border}}]]</span></includeonly><noinclude>
+
<includeonly>{{#if:{{{checker|{{{c|}}}}}}|<templatestyles src="ListFlag/styles.css" />}}<span class="noresize{{#if:{{{checker|{{{c|}}}}}}|&#32;checkered}}">[[File:{{{1|Flag of None.svg}}}|{{{2|100x100px}}}{{#if:{{{border|{{{b|}}}}}}||{{!}}border}}{{#if:{{{alt|{{{a|}}}}}}|{{!}}alt={{{alt|{{{a|}}}}}}}}{{#if:{{{title|{{{t|}}}}}}|{{!}}{{{title|{{{t|}}}}}}}}]]</span></includeonly><noinclude>
 
{{doc}}
 
{{doc}}
 
</noinclude>
 
</noinclude>

Latest revision as of 16:07, 8 October 2020

Template documentation[view] [edit] [history] [purge]

Script error: No such module "Uses TemplateStyles". This template is used to display a flag in a table, especially for flag lists, and improve the display of flag where standard image syntax is either not possible. On mobile devices, this template will prevent the image from being resized to smaller size.

Syntax

{{ListFlag|flag name|size|border=|checker=|alt=}}

The first parameter should be any flag file name without File: prefix (default: Flag of None.svg), the second parameter is used to specify image size (default: 100x100px), the |border= (or |b=) parameter can be used to cancel the border, the |checker= (or |c=) parameter can be used to generate a checkered background to indicate transparency, which appears when the cursor is hovered over the image, or long press the image on touch screen.

The alternative text can be added with |alt= parameter or |title= parameter (with a tooltip).

Examples

{|
|{{ListFlag|Flag of Denmark.svg}}
|{{ListFlag|Flag of Ohio.svg|120px|border=no}}
|{{ListFlag|Bowman Flag.svg|150px|border=no|checker=yes}}
|}
Flag of Denmark.svg Flag of Ohio.svg Bowman Flag.svg