Jump to content

User:(WT-en) JanSlupski/Projects/QuickBar

From Wikivoyage

<!-- begin quick bar --> {{QBbegin}} {{QBtitle| Flag }} {{QBimage| pl-flag.png }} {{QBtitle| Quick Facts }} {{QBline| Capital | [[Warsaw]] }} {{QBline| Government | republic }} {{QBline| Currency | zloty (PLN) }} {{QBline| Area | ''total:'' 312,685 sq km <br>''water:'' 8,220 sq km <br>''land:'' 304,465 sq km }} {{QBline| Population | 38,625,478 (July 2002 est.) }} {{QBline| Language | Polish }} {{QBline| Religion | Roman Catholic 95% (about 75% practicing), Eastern Orthodox, Protestant, and other 5% }} {{QBline| Country Calling Code | +48 }} {{QBline| Internet TLD | .pl }} {{QBline| Time Zone | CET/CEST (UTC+1/+2) }} {{QBend}} <!-- end quick bar --> Extensible QuickBar with use of templates.

Why

[edit]

Why I want to reinvent the weel...

  • currently encoded (HTML) QuickBars may frighten begginers
  • Wiki style tables are cleaner, but need more space (lines) and still suffer of all style definitions mess
  • QB source should be cleaner to view (or skip)
  • QB editing should be more intuitive
  • don't loose flexibility (in opposition to predefined Template:Country_Quickbar used in User:(WT-en) Bijee/India)
  • possible to define fixed Country_Quickbar, City_Quickbar and other templates using this

How

[edit]

Creating QuickBar would be a sequence of template calls. Titles & images would have one parameter. Ordinary lines two.

Why this doesn't work

[edit]

Example source

[edit]

Source of QuickBar shown at right would look like:


<!-- begin quick bar -->
{{QBbegin}}
{{QBtitle| Flag }}
{{QBimage| pl-flag.png }}
{{QBtitle| Quick Facts }}
{{QBline| Capital              | [[Warsaw]] }}
{{QBline| Government           | republic }}
{{QBline| Currency             | zloty (PLN) }}
{{QBline| Area                 | ''total:'' 312,685 sq km <br>''water:'' 8,220 sq km <br>''land:'' 304,465 sq km }}
{{QBline| Population           | 38,625,478 (July 2002 est.) }}
{{QBline| Language             | Polish }}
{{QBline| Religion             | Roman Catholic 95% (about 75% practicing), Eastern Orthodox, Protestant, and other 5% }}
{{QBline| Country Calling Code | +48 }}
{{QBline| Internet TLD         | .pl }}
{{QBline| Time Zone            | CET/CEST (UTC+1/+2) }}
{{QBend}}
<!-- end quick bar -->

Templates used

[edit]
  • Template:QBbegin
  • Template:QBtitle
  • Template:QBimage
  • Template:QBline
  • Template:QBend