Difference between revisions of "Template:Infobox"

From TransitWiki
Jump to navigation Jump to search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<includeonly>
 
{|style="float:right; margin-left: 10px; border-spacing: 2px; border: 1px solid darkgray; background: #f9f9f9; padding: 5px; width: 5%; text-align:left"  
 
{|style="float:right; margin-left: 10px; border-spacing: 2px; border: 1px solid darkgray; background: #f9f9f9; padding: 5px; width: 5%; text-align:left"  
 
|+  
 
|+  
{{#if: {{{title|}}}|=== {{{title}}} ===|}}
+
{{#if: {{{title|}}}|'''{{{title}}}'''|}}
 
|-
 
|-
|colspan="2" style="padding-bottom:20px"|{{#if: {{{image|}}}|[[File:{{{image}}}|center|200px]]|}}
+
|{{#if: {{{image|}}}|colspan="2" style="padding-bottom:20px"|}}|{{#if: {{{image|}}}|[[File:{{{image}}}|center|{{#if: {{{image_size|}}}|{{{image_size}}}|200px}}]]|}}
 
|-
 
|-
 
!style="vertical-align: top; padding-right:20px;"|{{#if: {{{vendor|}}}|Vendor|}}
 
!style="vertical-align: top; padding-right:20px;"|{{#if: {{{vendor|}}}|Vendor|}}
Line 10: Line 11:
 
!style="vertical-align: top; padding-right:20px"| {{#if: {{{license|}}}|License|}}
 
!style="vertical-align: top; padding-right:20px"| {{#if: {{{license|}}}|License|}}
 
|{{#if: {{{license|}}}|{{{license}}}|}}
 
|{{#if: {{{license|}}}|{{{license}}}|}}
 +
|-
 +
!style="vertical-align: top; padding-right:20px"| {{#if: {{{documentation|}}}|Documentation|}}
 +
|{{#if: {{{documentation|}}}|{{{documentation}}}|}}
 +
|-
 +
!style="vertical-align: top; padding-right:20px"| {{#if: {{{data_in|}}}|Data Input|}}
 +
|{{#if: {{{data_in|}}}|{{{data_in}}}|}}
 +
|-
 +
!style="vertical-align: top; padding-right:20px"| {{#if: {{{data_out|}}}|Data Output|}}
 +
|{{#if: {{{data_out|}}}|{{{data_out}}}|}}
 
|-
 
|-
 
!style="vertical-align: top; padding-right:20px"| {{#if: {{{website|}}}|Website|}}
 
!style="vertical-align: top; padding-right:20px"| {{#if: {{{website|}}}|Website|}}
 
|{{#if: {{{website|}}}|{{{website}}}|}}
 
|{{#if: {{{website|}}}|{{{website}}}|}}
 
|}
 
|}
 +
</includeonly>
 +
 +
<noinclude>
 +
{|style="float:right; margin-left: 10px; border-spacing: 2px; border: 1px solid darkgray; background: #f9f9f9; padding: 5px; width: 5%; text-align:left"
 +
|+
 +
'''Infobox'''
 +
|-
 +
|colspan="2" style="padding-bottom:20px"|[[File:Info.png|center|100px]]
 +
|-
 +
!style="vertical-align: top; padding-right:20px;"|Vendor
 +
|[[User:Leeor| Leeor]]
 +
|-
 +
!style="vertical-align: top; padding-right:20px;"|License
 +
|Not licensed
 +
|-
 +
!style="vertical-align: top; padding-right:20px;"|Documentation
 +
|All in the code
 +
|-
 +
!style="vertical-align: top; padding-right:20px;"|Data Input
 +
|Parameters
 +
|-
 +
!style="vertical-align: top; padding-right:20px;"|Data Output
 +
|An infobox
 +
|-
 +
!style="vertical-align: top; padding-right:20px"|Website
 +
|[http://www.transitwiki.org/TransitWiki/index.php/Template:Infobox Template:Infobox]
 +
|}
 +
This template is used to display an infobox on the top right hand side of a page like the example on this page.
 +
To use this template in a page, copy and paste the text below, substituting the appropriate parameter values. It is not necessary to include all parameters. Also beware that parameters are case sensitive. All parameters are lowercase for this template. Parameters can be added in any order but will always appear in this order.
 +
 +
{|class="wikitable"
 +
|-
 +
|<nowiki>{{infobox</nowiki><br>
 +
<nowiki>|title=</nowiki> <br>
 +
<nowiki>|image=</nowiki> <br>
 +
<nowiki>|image_size=</nowiki> <br>
 +
<nowiki>|vendor=</nowiki> <br>
 +
<nowiki>|license=</nowiki> <br>
 +
<nowiki>|documentation=</nowiki> <br>
 +
<nowiki>|data_in=</nowiki> <br>
 +
<nowiki>|data_out=</nowiki> <br>
 +
<nowiki>|website=</nowiki> <br>
 +
<nowiki>}}</nowiki>
 +
|}
 +
 +
The parameter inputs and defaults are listed in the table below
 +
{|class="wikitable"
 +
|-
 +
!Parameter
 +
!Input
 +
!Default
 +
|-
 +
!title
 +
|infobox title
 +
|none
 +
|-
 +
!image
 +
|image file name (only the image name is needed, not the <nowiki>[[File:]]</nowiki>)
 +
|none
 +
|-
 +
!image_size
 +
|width of image in pixels
 +
|200px
 +
|-
 +
!vendor
 +
|application vendor or creator
 +
|none
 +
|-
 +
!license
 +
|application license
 +
|none
 +
|-
 +
!documentation
 +
|a link to the application documentation
 +
|none
 +
|-
 +
!data_in
 +
|data inputs for the application or device
 +
|none
 +
|-
 +
!data_out
 +
|data outputs for the application or device
 +
|none
 +
|-
 +
!website
 +
|<nowiki>[http://officialappwebsite.com tag for the website]</nowiki> (the square brackets are required for this parameter)
 +
|none
 +
|}
 +
</noinclude>

Latest revision as of 23:31, 1 April 2017


Infobox
Info.png
Vendor Leeor
License Not licensed
Documentation All in the code
Data Input Parameters
Data Output An infobox
Website Template:Infobox

This template is used to display an infobox on the top right hand side of a page like the example on this page. To use this template in a page, copy and paste the text below, substituting the appropriate parameter values. It is not necessary to include all parameters. Also beware that parameters are case sensitive. All parameters are lowercase for this template. Parameters can be added in any order but will always appear in this order.

{{infobox

|title=
|image=
|image_size=
|vendor=
|license=
|documentation=
|data_in=
|data_out=
|website=
}}

The parameter inputs and defaults are listed in the table below

Parameter Input Default
title infobox title none
image image file name (only the image name is needed, not the [[File:]]) none
image_size width of image in pixels 200px
vendor application vendor or creator none
license application license none
documentation a link to the application documentation none
data_in data inputs for the application or device none
data_out data outputs for the application or device none
website [http://officialappwebsite.com tag for the website] (the square brackets are required for this parameter) none