YOU CAN EDIT THIS PAGE! Just click any blue "Edit" link and start writing!

Difference between revisions of "Template:Quickbar"

From Wikitravel
Jump to: navigation, search
(done)
 
(23 intermediate revisions by 15 users not shown)
Line 1: Line 1:
<!-- begin quick bar -->
+
<!-- begin quick bar --><div id="quickbar" style="float: right; margin: 0 0 1em 1em">
<div style="float: right; margin: 0 0 1em 1em">
+
{| cellpadding="2" cellspacing="0" style="border: 1px solid #9866FF; font-size:85%; background-color: #f3f3ff" width="250"
{| cellpadding="2" cellspacing="0" style="border: 1px solid #9866FF; background-color: #f3f3ff" width="250"
+
{{ #if: {{{image|}}} | {{!}}-
{{if|test={{{image|}}}|then={{quickbar topimage|image={{{image|}}}}}}}
+
{{!}} colspan="2" style="text-align: center; padding: 2px" {{!}} [[File:{{{image|}}}|{{{imagewidth|250px}}}|frameless|{{{caption|{{PAGENAME}}}}}]] }}
{{if|test={{{location|}}}|then={{quickbar image|heading=स्थान निर्धारण|image={{{location|}}}}}}}
+
{{ #if: {{{location|}}} | {{!}}-
{{if|test={{{flag|}}}|then={{quickbar image|heading=झण्डा|image={{{flag|}}}}}}}
+
{{!}} colspan="2" style="text-align: center; border-bottom: 1px solid #C9AFFF; border-top: 1px solid #C9AFFF; background-color: #ddddff" {{!}} '''Location'''
 +
{{!}}-
 +
{{!}} colspan="2" style="text-align: center; padding: 2px" {{!}} [[File:{{{location|}}}|{{{locationwidth|250px}}}|frameless]] }}
 +
{{ #if: {{{flag|}}} | {{!}}-
 +
{{!}} colspan="2" style="text-align: center; border-bottom: 1px solid #C9AFFF; border-top: 1px solid #C9AFFF; background-color: #ddddff" {{!}} '''Flag'''
 +
{{!}}-
 +
{{!}} colspan="2" style="text-align: center; padding: 2px" {{!}} [[File:{{{flag|}}}|{{{flagwidth|108px}}}|frameless]] }}
 
|-
 
|-
 
| 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=राजधानी|value={{{capital|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{capital|}}} | {{quickbar item|heading=Capital|value={{{capital|}}}}} | {{quickbar empty}} }}
{{if|test={{{government|}}}|then={{quickbar item|heading=सरकार|value={{{government|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{government|}}} | {{quickbar item|heading=Government|value={{{government|}}}}} | {{quickbar empty}} }}
{{if|test={{{currency|}}}|then={{quickbar item|heading=मुद्रा|value={{{currency|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{currency|}}} | {{quickbar item|heading=Currency|value={{{currency|}}}}} | {{quickbar empty}} }}
{{if|test={{{area|}}}|then={{quickbar item|heading=क्षेत्रफल|value={{{area|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{area|}}} | {{quickbar item|heading=Area|value={{{area|}}}}} | {{quickbar empty}} }}
{{if|test={{{population|}}}|then={{quickbar item|heading=जनसंख्या|value={{{population|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{population|}}} | {{quickbar item|heading=Population|value={{{population|}}}}} | {{quickbar empty}} }}
{{if|test={{{language|}}}|then={{quickbar item|heading=भाषा|value={{{language|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{language|}}} | {{quickbar item|heading=Language|value={{{language|}}}}} | {{quickbar empty}} }}
{{if|test={{{religion|}}}|then={{quickbar item|heading=धर्म|value={{{religion|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{religion|}}} | {{quickbar item|heading=Religion|value={{{religion|}}}}} | {{quickbar empty}} }}
{{if|test={{{electricity|}}}|then={{quickbar item|heading=बिजली|value={{{electricity|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{electricity|}}} | {{quickbar item|heading=[[Electrical systems|Electricity]]|value={{{electricity|}}}}} | {{quickbar empty}} }}
{{if|test={{{callingcode|}}}|then={{quickbar item|heading=दूरभाष|value={{{callingcode|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{callingcode|}}} | {{quickbar item|heading=[[List of country calling codes|Country code]]|value={{{callingcode|}}}}} | {{quickbar empty}} }}
{{if|test={{{tld|}}}|then={{quickbar item|heading=इंटरनेट टी एल डी|value={{{tld|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{tld|}}} | {{quickbar item|heading=Internet TLD|value={{{tld|}}}}} | {{quickbar empty}} }}
{{if|test={{{timezone|}}}|then={{quickbar item|heading=समय मण्डल|value={{{timezone|}}}}}|else={{quickbar empty}}}}
+
{{ #if: {{{timezone|}}} | {{quickbar item|heading=[[Time zones|Time Zone]]|value={{{timezone|}}}}} | {{quickbar empty}} }}
 +
{{ #if: {{{emergencies|}}} | {{quickbar item|heading=Emergencies|value={{{emergencies|}}}}} | {{quickbar empty}} }}
 
|}
 
|}
</div>
+
</div><rdf>
<!-- end quick bar --><noinclude>
+
<http://wikitravel.org/en/{{PAGENAMEE}}> dcterms:spatial <urn:x-wikitravel:en:{{PAGENAMEE}}> .
 +
<urn:x-wikitravel:en:{{PAGENAMEE}}> a wts:Country .
 +
</rdf><!-- 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. Other destinations may also use a quick bar providing relevant information is available. 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):
+
Note that the lead and location images MUST NOT be wider than 250px, and the flag image '''should be 108px'''; if the width fields are not set, it will default to this. Remember, DO NOT add the <code><nowiki>[[File:  |noframe|250px]]</nowiki></code> to any of the images, just the image name with the type suffix. The template uses the following format:
  
 
<pre><nowiki>
 
<pre><nowiki>
 
{{quickbar
 
{{quickbar
| image=[[Image:image|noframe|250px]]
+
| image=image file name
| flag=[[Image:flag]]
+
| imagewidth=optionally set the lead image's size; defaults to 250px
| location=[[Image:location|noframe|250px]]
+
| caption=shows a caption when the image is hovered over
 +
| flag=flag.svg
 +
| flagwidth=optional and sparingly used for flags such as [[Nepal|Nepal's]]; defaults to 108px
 +
| location=location.png
 +
| locationwidth=optionally set the size of the map; defaults to 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=Country calling code preceded by +
| 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
 +
| emergencies=emergency phone number(s) to dial for ambulance, fire, police, etc
 
}}
 
}}
 
</nowiki></pre>
 
</nowiki></pre>
  
 +
[[Category:Formatting templates|Quickbar]]
 
</noinclude>
 
</noinclude>

Latest revision as of 19:49, 17 November 2014

Quick Facts

This template places a consistently-formatted summary of standard information at the top of every country article. Other destinations may also use a quick bar providing relevant information is available. Please discuss on the Template talk:Quickbar page if you feel that quickbars should be used for other article types.

Note that the lead and location images MUST NOT be wider than 250px, and the flag image should be 108px; if the width fields are not set, it will default to this. Remember, DO NOT add the [[File: |noframe|250px]] to any of the images, just the image name with the type suffix. The template uses the following format:

{{quickbar
| image=image file name
| imagewidth=optionally set the lead image's size; defaults to 250px
| caption=shows a caption when the image is hovered over
| flag=flag.svg
| flagwidth=optional and sparingly used for flags such as [[Nepal|Nepal's]]; defaults to 108px
| location=location.png
| locationwidth=optionally set the size of the map; defaults to 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=Country calling code preceded by +
| tld=internet top level domain
| timezone=time zone(s) in relation to UTC
| emergencies=emergency phone number(s) to dial for ambulance, fire, police, etc
}}