Changes

Jump to navigation Jump to search
3,155 bytes removed ,  13:37, 9 August 2020
m
Reverted edits by Ianbirtwistle (talk) to last revision by [[User:newcastle>Traveler100|newcastle>Traveler100]]
Line 1: Line 1: −
{{documentation subpage}}
+
<templatestyles src="Pagebanner/styles.css"/>
 
+
<includeonly>{{#ifeq: {{NAMESPACE}} | {{ns:User}} | {{Userpagebanner}} }}<!--
This template places a banner and horizontal Table of Contents at the top of travel guide pages. This template is a wrapper around the [[mw:Extension:WikidataPageBanner]] extension and should be used instead of invoking the extension directly. For more information about page banner usage on Wikivoyage, see [[Wikivoyage:Banner Expedition]].
+
-->{{CountryData2HTML}}{{GPX indicator}}{{PAGEBANNER:{{#switch: {{{1|}}}
 
+
  | none
'''Basic usage:''' <nowiki>{{pagebanner | </nowiki>''image name'' }}
+
  | Europe
 
+
  | North America
* To use the default banner, which inserts the page name and TOC on top of generic image, simply type <nowiki>{{pagebanner}}</nowiki>
+
  | Pagebanner default.jpg
*''image name'': Enter the name of the image to use in the banner (excluding "File:"). Images should have a width-to-height ratio of 7:1, preferably 2100 x 300 pixels, and be at least 1800 pixels wide.  
+
  | Pagebanner_default.jpg
 
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Pagebanner default.jpg }}
'''Customizing the banner:''' <nowiki>{{pagebanner | </nowiki>''image name'' | ''caption text'' | ''page name'' | ''disambiguation'' | ''star'' | ''DotM'' | ''OtBP'' | ''Ftt'' | ''TOC box'' }}
+
  | Middle East
 
+
  | ME
The template has the following options:
+
  | North Africa
 
+
  | Asia
*''caption text'': Recommended. Enter ''caption=description'' to display a description of the picture when a mouse pointer is placed over the banner image.
+
  | Mena-asia default banner.jpg
*''page name'': Optional. Enter ''pgname=name'' to display in the banner. Only enter a name if you want it to be different than the formal name of the page. 
+
  | Mena-asia_default_banner.jpg
*''disambiguation:'' Optional. Displays a disambiguation icon in the banner (a question mark) and the disambiguation hatnote after the banner. Enter ''disambig=yes'' if the name of the disambiguation page is ''page name (disambiguation)''. Enter ''disambig=disambiguation page name'' if the disambiguation page name is different from the current page name.
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Mena-asia_default_banner.jpg }}
*''star'': Optional. Enter ''star=yes'' if the guide is a [[Star articles|Star article]]. This displays the Star article symbol in the top right corner.
+
  | South America
*''DotM'': Optional. Enter ''dotm=yes'' if the guide is a [[Previous Destinations of the month|previous Destination of the month]]. This displays the DotM symbol in the top right corner and adds [[:Category:Previous Destinations of the month|a category]].
+
  | SA
*''OtBP'': Optional. Enter ''otbp=yes'' if the guide has been featured on [[Previously Off the beaten path|Off the beaten path]]. This displays the OtBP symbol in the top right corner and adds [[:Category:Previously Off the beaten path|a category]].
+
  | Africa
*''Ftt'': Optional. Enter ''ftt=yes'' if the guide has been a [[Previous Featured travel topics|Featured travel topic]]. This displays the Ftt symbol in the top right corner and adds [[:Category:Previous Featured travel topics|a category]].
+
  | S-amer africa default banner.jpg
*''unesco'': Optional. Enter ''unesco=yes'' if the guide is or describes a site on the [[UNESCO World Heritage list]]. Only the lowest level guides in the hierarchy should be tagged (ie, [[Sydney/City Centre]] for the Opera House, not [[Sydney]]). This displays the World Heritage symbol in the top right corner and adds [[:Category:UNESCO World Heritage Sites|a category]].
+
  | S-amer_africa_default_banner.jpg
*''TOC box'': Optional. Enter ''box=black'' for the TOC to appear in a translucent black box with white type. Enter ''box=white'' for the TOC to appear in a translucent white box with black type. Enter nothing for the default solid grey box with black type.
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | S-amer africa default banner.jpg }}
*''notoc'': Optional. Enter ''notoc=true'' to stop the TOC being included in the banner and for the entire TOC to be shown within the article instead. Mainly to be used on articles with lots of sections.
+
  | Caribbean
*''index'': Optional. Enter ''index=yes'' for banners on title/index pages or pages in other main namespace article categories which do not always get banners.
+
  | Caribbean default banner.jpg
*''fop'': Optional. Enter ''fop=yes'' for freedom-of-panorama banners which are not allowed on Commons, to remove them from applicable maintenance categories
+
  | Caribbean_default_banner.jpg
* ''origin'': Optional. Use this parameter to define the focal area of the image. This is used to crop the banner appropriately on small screens. The value of the parameter should consist of an x and a y coordinate separated by a comma. Each coordinate represents the distance from the center of the image as a value from -1 to 1. For example, origin=1,1 is the top right corner and origin=-1,1 is the top left corner. There is a graphic [https://phabricator.wikimedia.org/T108785 here] that shows this information visually.
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Caribbean default banner.jpg }}
 
+
  | Australia
<includeonly>
+
  | Oceania
[[Category:Templates]]
+
  | Australia-oceania default banner.jpg
</includeonly>
+
  | Australia-oceania_default_banner.jpg
<templatedata>
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Australia-oceania default banner.jpg }}
{
+
  | New Zealand
"params": {
+
  | NZ
"1": {
+
  | NZ default banner.jpg
"label": "Image link",
+
  | NZ_default_banner.jpg
"suggested": true,
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | NZ default banner.jpg }}
"description": "Banner illustrating the article",
+
  | Travel topic
"example": "File:Vue panoramique Parlement de Bretagne.jpg",
+
  | Topic
"type": "wiki-file-name"
+
  | TT
},
+
  | TT Banner.jpg
"pgname": {
+
  | TT_Banner.jpg
"label": "Page name",
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | TT Banner.jpg }}
"description": "Enter a name to display in the banner, only if it is different than the formal name of the page.",
+
  | Flying
"type": "string"
+
  | Generic flying banner.jpg
},
+
  | Generic_flying_banner.jpg
"origin": {
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Generic flying banner.jpg }}
"label": "Focal area of the image",
+
  | Dive guide
"description": "Use this parameter to define the focal area of the image. This is used to crop the banner appropriately on small screens. The value of the parameter should consist of an x and a y coordinate separated by a comma. Each coordinate represents the distance from the center of the image as a value from -1 to 1. For example, origin=1,1 is the top left corner and origin=-1,1 is the bottom left corner. There is a graphic here that shows this information visually."
+
  | Dive
},
+
  | Diving
"unesco": {
+
  | Default Scuba diving banner.JPG
"label": "UNESCO World Heritage list element",
+
  | Default_Scuba_diving_banner.JPG
"description": " Enter \"yes\" if the guide is or describes a site on the UNESCO World Heritage list. Only the lowest level guides in the hierarchy should be tagged (ie, Sydney/City Centre for the Opera House, not Sydney). This displays the World Heritage symbol in the top right corner and adds a category.",
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Default Scuba diving banner.JPG }}
"type": "boolean"
+
  | Itinerary
},
+
  | Itinerary banner.jpg
"star": {
+
  | Itinerary_banner.jpg
"label": "Star article",
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Itinerary banner.jpg }}
"description": " Enter \"yes\" if the guide is a Star article. This displays the Star article symbol in the top right corner.",
+
  | Phrasebook
"type": "boolean"
+
  | Welcome banner.jpg
},
+
  | Welcome_banner.jpg
"otbp": {
+
  | = {{#if: {{#property:P948}} | {{#property:P948}} | Welcome banner.jpg }}
"label": "Destination of the month",
+
  | Disambiguation page
"description": " Enter \"yes\" if the guide is has been a  Off the beaten path. This displays the OtBP symbol in the top right corner.",
+
  | Disambiguation banner.png
"type": "boolean"
+
  | Disambiguation_banner.png
},
+
  | = Disambiguation banner.png
"dotm": {
+
  | #default = {{{1|}}}
"label": "Destination of the month",
+
  }}
"description": " Enter \"yes\" if the guide is has been a Destination of the month. This displays the DOtM symbol in the top right corner.",
+
| {{#if: {{{caption|}}} | tooltip={{{caption|}}} }}
"type": "boolean"
+
| {{#if: {{{pgname|}}} | pgname={{{pgname|}}} }}
},
+
| {{#if: {{{origin|}}} | origin={{{origin|}}} }}
"ftt": {
+
| {{#if: {{{unesco|}}} | icon-unesco=UNESCO_World_Heritage_List }}
"label": " Featured travel topic",
+
| {{#if: {{{star|}}} | icon-star=Star_article }}
"description": " Enter \"yes\" if the guide is has been a Featured travel topic. This displays the FFT symbol in the top right corner.",
+
| {{#if: {{{otbp|}}} | icon-otbp=Previously_Off_the_beaten_path }}
"type": "boolean"
+
| {{#if: {{{dotm|}}} | icon-dotm=Previous_Destinations_of_the_month }}
},
+
| {{#if: {{{ftt|}}} | icon-ftt=Previous_Featured_travel_topics }}
"notoc": {
+
| toc={{#ifeq: {{{notoc|}}} | true | no | yes }}
"description": "Enter \"true\" to stop the TOC being included in the banner and for the entire TOC to be shown within the article instead. Mainly to be used on articles with lots of sections.",
+
}}<!--
"label": "No table of contents"
+
-->{{#if: {{{disambig|}}}
},
+
| {{#switch: {{{disambig|}}}
"disambig": {
+
  | yes={{other uses}}
"label": "Disambiguation",
+
  | #default ={{other uses|{{{disambig}}}}}
"description": "Enter \"yes\" if the name of the disambiguation page is page name (disambiguation). Enter disambiguation's page name if the disambiguation page name is different from the current page name. It displays a disambiguation icon in the banner (a question mark) and the disambiguation hatnote after the banner. ",
+
  }}
"type": "string"
+
|
},
+
}}<!-- Banner categories
"index": {
+
-->{{#if: {{{unesco|}}} | [[Category:UNESCO World Heritage Sites]] }} {{#if: {{{otbp|}}} | [[Category:Previously Off the beaten path]] }} {{#if: {{{dotm|}}} | [[Category:Previous Destinations of the month]] }} {{#if: {{{ftt|}}} | [[Category:Previous Featured travel topics]] }}<!--
"label": "Index pages",
+
-->{{#ifeq:{{NAMESPACE}}|{{NS:0}}|{{#if:{{#invoke:Wikidata|getSiteLink|enwiki}}||[[Category:Articles without Wikipedia links (via Wikidata)]]}}}}<!--
"description": "Enter \"yes\" for banners on title/index pages or pages in other main namespace article categories which do not always get banners."
+
-->{{#ifeq: {{{1|}}} | Disambiguation banner.png
},
+
| {{#ifeq: {{NAMESPACE}}
"fop": {
+
  | {{NS:0}}
"label": "Freedom of panorama",
+
  | [[Category:Has standard banner]]
"description": "Enter \"yes\" for freedom-of-panorama banners which are not allowed on Commons, to remove them from applicable maintenance categories"
+
  }}
},
+
| {{#if: {{#property:P948}}
"TOC box": {
+
  | {{#ifeq: {{{index|}}} | yes
"label": "TOC box color",
+
    |
"description": "Enter box=black for the TOC to appear in a translucent black box with white type. Enter box=white for the TOC to appear in a translucent white box with black type. Enter nothing for the default solid grey box with black type."
+
    | [[Category:Has custom banner]]
},
+
    }}
"caption": {
+
  | {{#ifeq: {{NAMESPACE}} | {{ns:}}
"label": "Caption text",
+
    | {{#switch: {{{1|}}}
"description": "Will display a description of the picture when a mouse pointer is placed over the banner image.",
+
      | = {{#ifeq: {{{index|}}} | yes
"type": "string",
+
        |
"suggested": true
+
        | [[Category:Has default banner]]
}
+
        }}
},
+
      | Pagebanner default.jpg
"description": "This template places a banner and horizontal Table of Contents at the top of travel guide pages, with many other information.",
+
      | Pagebanner_default.jpg
"paramOrder": [
+
      | Mena-asia default banner.jpg
"1",
+
      | Mena-asia_default_banner.jpg
"caption",
+
      | S-amer africa default banner.jpg
"pgname",
+
      | S-amer_africa_default_banner.jpg
"disambig",
+
      | Caribbean default banner.jpg
"star",
+
      | Caribbean_default_banner.jpg
"otbp",
+
      | Australia-oceania default banner.jpg
"dotm",
+
      | Australia-oceania_default_banner.jpg
"ftt",
+
      | TT Banner.jpg
"unesco",
+
      | TT_Banner.jpg
"TOC box",
+
      | Generic flying banner.jpg
"notoc",
+
      | Generic_flying_banner.jpg
"index",
+
      | Default Scuba diving banner.JPG
"fop",
+
      | Default_Scuba_diving_banner.JPG
"origin"
+
      | Itinerary banner.jpg
],
+
      | Itinerary_banner.jpg
"format": "inline"
+
      | Welcome_banner.jpg
}
+
      | Welcome banner.jpg
</templatedata>
+
      | Europe
 +
      | North America
 +
      | Middle East
 +
      | ME
 +
      | North Africa
 +
      | Asia
 +
      | South America
 +
      | SA
 +
      | Africa
 +
      | Caribbean
 +
      | Australia
 +
      | Oceania
 +
      | New Zealand
 +
      | NZ
 +
      | Travel topic
 +
      | Topic
 +
      | TT
 +
      | Flying
 +
      | Dive guide
 +
      | Dive
 +
      | Diving
 +
      | Itinerary
 +
      | Phrasebook
 +
      | NZ default banner.jpg
 +
      | = {{#ifeq: {{{index|}}} | yes
 +
        |
 +
        | [[Category:Has default banner]]
 +
        }}
 +
      | #default = {{#ifeq: {{{index|}}} | yes
 +
        |
 +
        | [[Category:Has custom banner]]
 +
        }}
 +
        {{#ifeq: {{NAMESPACE}} | {{ns:0}}
 +
        | {{#ifeq: {{{fop|}}} | yes
 +
          |
 +
          | [[Category:Banner missing from Wikidata]]
 +
          }}
 +
        }}
 +
      }}
 +
    }}
 +
  }}
 +
}}</includeonly><noinclude>{{documentation}}</noinclude>

Navigation menu