Help Wikitravel grow by contributing to an article! Learn how.

Difference between revisions of "Template:Quickbar"

From Wikitravel
Jump to: navigation, search
(RDF to define a country)
m (typo(s))
(14 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
<!-- begin quick bar -->
 
<!-- begin quick bar -->
<div style="float: right; margin: 0 0 1em 1em">
+
<div id="quickbar" style="float: right; margin: 0 0 1em 1em">
{| cellpadding="2" cellspacing="0" style="border: 1px solid #9866FF; background-color: #f3f3ff" width="250"
+
{| cellpadding="2" cellspacing="0" style="border: 1px solid #9866FF; font-size:85%; background-color: #f3f3ff" width="250"
{{if|test={{{image|}}}|then={{quickbar topimage|image={{{image|}}}}}}}
+
{{ #if: {{{image|}}} | {{quickbar topimage|image={{{image|}}}}} }}
{{if|test={{{location|}}}|then={{quickbar image|heading=Location|image={{{location|}}}}}}}
+
{{ #if: {{{location|}}} | {{quickbar image|heading=Location|image={{{location|}}}}} }}
{{if|test={{{flag|}}}|then={{quickbar image|heading=Flag|image={{{flag|}}}}}}}
+
{{ #if: {{{flag|}}} | {{quickbar image|heading=Flag|image={{{flag|}}}}} }}
 
|-
 
|-
 
| colspan="2" style="text-align: center; border-bottom: 1px solid #C9AFFF; border-top: 1px solid #C9AFFF; background-color: #ddddff" | '''Quick Facts'''
 
| colspan="2" style="text-align: center; border-bottom: 1px solid #C9AFFF; border-top: 1px solid #C9AFFF; background-color: #ddddff" | '''Quick Facts'''
{{if|test={{{capital|}}}|then={{quickbar item|heading=Capital|value={{{capital|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{capital|}}} | {{quickbar item|heading=Capital|value={{{capital|}}}}} | {{quickbar empty}} }}
{{if|test={{{government|}}}|then={{quickbar item|heading=Government|value={{{government|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{government|}}} | {{quickbar item|heading=Government|value={{{government|}}}}} | {{quickbar empty}} }}
{{if|test={{{currency|}}}|then={{quickbar item|heading=Currency|value={{{currency|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{currency|}}} | {{quickbar item|heading=Currency|value={{{currency|}}}}} | {{quickbar empty}} }}
{{if|test={{{area|}}}|then={{quickbar item|heading=Area|value={{{area|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{area|}}} | {{quickbar item|heading=Area|value={{{area|}}}}} | {{quickbar empty}} }}
{{if|test={{{population|}}}|then={{quickbar item|heading=Population|value={{{population|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{population|}}} | {{quickbar item|heading=Population|value={{{population|}}}}} | {{quickbar empty}} }}
{{if|test={{{language|}}}|then={{quickbar item|heading=Language|value={{{language|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{language|}}} | {{quickbar item|heading=Language|value={{{language|}}}}} | {{quickbar empty}} }}
{{if|test={{{religion|}}}|then={{quickbar item|heading=Religion|value={{{religion|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{religion|}}} | {{quickbar item|heading=Religion|value={{{religion|}}}}} | {{quickbar empty}} }}
{{if|test={{{electricity|}}}|then={{quickbar item|heading=[[Electrical systems|Electricity]]|value={{{electricity|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{electricity|}}} | {{quickbar item|heading=[[Electrical systems|Electricity]]|value={{{electricity|}}}}} | {{quickbar empty}} }}
{{if|test={{{callingcode|}}}|then={{quickbar item|heading=[[List of country calling codes|Calling Code]]|value={{{callingcode|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{callingcode|}}} | {{quickbar item|heading=[[List of country calling codes|Calling Code]]|value={{{callingcode|}}}}} | {{quickbar empty}} }}
{{if|test={{{tld|}}}|then={{quickbar item|heading=Internet TLD|value={{{tld|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{tld|}}} | {{quickbar item|heading=Internet TLD|value={{{tld|}}}}} | {{quickbar empty}} }}
{{if|test={{{timezone|}}}|then={{quickbar item|heading=[[Time zones|Time Zone]]|value={{{timezone|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{timezone|}}} | {{quickbar item|heading=[[Time zones|Time Zone]]|value={{{timezone|}}}}} | {{quickbar empty}} }}
 
|}
 
|}
 
</div><rdf>
 
</div><rdf>
Line 25: Line 25:
 
<!-- end quick bar --><noinclude>
 
<!-- end quick bar --><noinclude>
  
This template replaces the HTML quickbars previously used in country templates.  Note that per current consensus, quickbars should ONLY be used for country articles - please discuss on the [[Template talk:Quickbar]] page if you feel that quickbars should be used for cities or other article types.
+
This template places a consistently-formatted summary of standard information at the top of every country article.  Note that per current consensus, quickbars should ONLY be used for articles about sovereign '''countries''' and their separately-administered '''territories''' (generally speaking, places with their own 2-character ISO country code and Internet Top-Level Domain).  It should not be used for U.S. states, Canadian provinces, or any other article type.  Please discuss on the [[Template talk:Quickbar]] page if you feel that quickbars should be used for other article types.
  
To implement use the following format (note that the location, flag, and main images MUST NOT be wider than 250px):
+
It uses the following format (note that the lead and location images MUST NOT be wider than 250px, and the flag image should be 108px to match those we got from the CIA factbook):
  
 
<pre><nowiki>
 
<pre><nowiki>
 
{{quickbar
 
{{quickbar
 
| image=[[Image:image|noframe|250px]]
 
| image=[[Image:image|noframe|250px]]
| flag=[[Image:flag]]
+
| flag=[[Image:flag|noframe|108px]]
 
| location=[[Image:location|noframe|250px]]
 
| location=[[Image:location|noframe|250px]]
 
| capital=[[Capital]]
 
| capital=[[Capital]]
| government=Type of government
+
| government=type of government
| currency=Currency used
+
| currency=currency used
| area=Country area
+
| area=land area
| population=Population
+
| population=recent population estimate
 
| language=[[Language1]], [[Language2]], Language3, ...
 
| language=[[Language1]], [[Language2]], Language3, ...
| religion=Religion(s)
+
| religion=common religion(s)
| electricity=Electrical voltage and current
+
| electricity=electrical voltage and current (plug type)
| callingcode=Calling code
+
| callingcode=calling code
| tld=Internet top level domain
+
| tld=internet top level domain
| timezone=Time zone(s) in relation to UTC
+
| timezone=time zone(s) in relation to UTC
 
}}
 
}}
 
</nowiki></pre>
 
</nowiki></pre>
  
 +
[[Category:Templates|Quickbar]]
 
</noinclude>
 
</noinclude>

Revision as of 18:48, 18 May 2011

Quick Facts


This template places a consistently-formatted summary of standard information at the top of every country article. Note that per current consensus, quickbars should ONLY be used for articles about sovereign countries and their separately-administered territories (generally speaking, places with their own 2-character ISO country code and Internet Top-Level Domain). It should not be used for U.S. states, Canadian provinces, or any other article type. Please discuss on the Template talk:Quickbar page if you feel that quickbars should be used for other article types.

It uses the following format (note that the lead and location images MUST NOT be wider than 250px, and the flag image should be 108px to match those we got from the CIA factbook):

{{quickbar
| image=[[Image:image|noframe|250px]]
| flag=[[Image:flag|noframe|108px]]
| location=[[Image:location|noframe|250px]]
| capital=[[Capital]]
| government=type of government
| currency=currency used
| area=land area
| population=recent population estimate
| language=[[Language1]], [[Language2]], Language3, ...
| religion=common religion(s)
| electricity=electrical voltage and current (plug type)
| callingcode=calling code
| tld=internet top level domain
| timezone=time zone(s) in relation to UTC
}}

Variants

Actions

Destination Docents

In other languages