Template:Flag: Difference between revisions

From Geometry Dash Expanded Wiki
Jump to navigation Jump to search
geometrydash.wiki.gg>Jamasto
mNo edit summary
geometrydash.wiki.gg>Jamasto
mNo edit summary
Line 1: Line 1:
<span class="country-flag" title="{{{2|}}}">{{#if:{{{1|}}}|[[File:Flag {{{1|}}}.svg|x20px|link=]] | }}</span><noinclude>
<span class="country-flag" title="{{{2|}}}">{{#if:{{{1|}}}|[[File:Flag {{{1|}}}.svg|x20px|link=]] | }}</span><noinclude>
<!--
This formatting template allows you to display country flags inline.


--><div class="documentation"><!--
Available country flags can be seen in [[dev:Category:Country_flags|our Commons Wiki]].
--><div class="documentation-header"><!--
== Usage ==
-->[[File:Template-{{#ifexist:{{#vardefineecho:docpage|Template:{{#replace:{{PAGENAME}}/doc|Template:|}}<!-- end vde -->}}|{{#if:|bad}}|no}}info.svg|50px|link=]] <!--
The template can be used with the following formatting: <code><nowiki>{{flag|code|Legend}}</nowiki></code>, where:
--><span style="font-weight: bold; font-size: 125%; margin-right: 10px;">Documentation</span> <!--
* <code>code</code> is the [[wikipedia:ISO 3166-1 alpha-2|ISO 3166-1 alpha-2]] code for the country flag.
-->{{#ifeq:{{SUBPAGENAME}}|doc|<!--nothing-->|<!--
* <code>Legend</code> is the legend displayed on hover (optional).
-->{{#ifexist:{{#var:docpage}}|<!--
== Examples ==
--><span style="font-size: 90%; font-style: italic;"><!--
{| class="wikitable"
-->[{{fullurl:{{#var:docpage}}|action=edit}} Edit] this documentation at [{{fullurl:{{#var:docpage}}|redirect=no}} {{FULLPAGENAMEE:{{#var:docpage}}}}].<!--
! Code !! Result
--></span><!--
|-
-->}}<!--
| <code><nowiki>{{flag|ca|Canada}}</nowiki></code> || {{flag|ca|Canada}}
-->}}<!--
|}
--><div style="text-align: right; margin-left: 5px;"><!--
-->([{{fullurl:{{FULLPAGENAMEE}}/doc|action=edit}} edit] • [{{fullurl:{{FULLPAGENAMEE}}/doc|action=history}} history] • [{{fullurl:{{FULLPAGENAMEE}}|action=purge}} purge])<!--
--></div><!--
--></div><!--
<!-- leave line break here -->
{{#if:|{{UsesLua|{{{lua}}} }} }}
<!-- documentation text/error box begins here -->
<div style="border-radius: 5px; border: 2px solid var(--wiki-content-border-color); margin: 0.5em auto 1em; padding: 0.8em 1.2em; background: var(--wiki-content-background-color--secondary);">
<!--
-->{{#ifexist:{{#var:docpage}}|<!--
 
 
If there is documentation
 
-->
{{ {{#var:docpage}} }}
<!--
 
 
Else
 
-->|<!--
-->No documentation subpage exists yet for this template. [{{fullurl:{{FULLPAGENAMEE:Template:{{PAGENAME}}}}/doc|action=edit&preload=Template:Documentation/preload}} Create one now].<!--
-->[[Category:Templates with no documentation]]<!--
-->}}<!-- leave line break here -->
<!-- documentation text/error box ends here -->
</div>
<!-- -->{{#ifeq:{{SUBPAGENAME}}|doc|<!--
-->{{#ifeq:{{BASEPAGENAME}}|Doc|<!--nothing-->|<!-- only if page is not Template:Documentation
-->This is the documentation page, it should be transcluded into the main template page. See {{tlx|doc}} for more information. <!--
-->[[Category:Template documentation]]<!--
-->}}<!--
-->}}<!--
--></div><!--
 
--><!--
 
-->
[[Category:General templates]]</noinclude>
[[Category:General templates]]</noinclude>

Revision as of 10:09, 25 June 2025

This formatting template allows you to display country flags inline.

Available country flags can be seen in our Commons Wiki.

Usage

The template can be used with the following formatting: {{flag|code|Legend}}, where:

  • code is the ISO 3166-1 alpha-2 code for the country flag.
  • Legend is the legend displayed on hover (optional).

Examples

Code Result
{{flag|ca|Canada}}