Difference between revisions of "User:White In Sky/Template"

From Paradise Station Wiki
Jump to navigation Jump to search
(fix last minor error, [if ... do this] instead of [if ... else do this])
(move name to header position, move code to remove/apply linebreaks, remove temporary fix excess linebreak fix, excess {{#if:}}s, add margin-top/bottom of 1em)
Line 1: Line 1:
{| style="border: 1px solid {{{bgcolor2|#bbbbbb}}};" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|width="100%"|}} cellspacing="0" cellpadding="2"
{| style="border: 1px solid {{{bgcolor2|#bbbbbb}}}; margin: 1em 0em;" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}{{{description|}}}{{{contents|}}}|width="100%"|}} cellspacing="0" cellpadding="2"
| align="center" width="150" style="background-color: {{{bgcolor1|#cccccc}}};" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}||colspan=2}} | [[File:{{{image|{{{name|NPA}}}.png}}}|64px]]<br />'''{{{name|Item}}}'''
{{#if:{{{name|}}}|! colspan="2" style="background-color: {{{bgcolor2|#bbbbbb}}};" {{!}} {{{name}}}
{{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|{{!}}|{{!}} style="padding: 0;" {{!}}}}
{{!}}-
{{#if:{{{foundin|}}}|'''Found in:''' {{{foundin}}}<br />|}}{{#if:{{{usedfor|}}}|'''Used for:''' {{{usedfor}}}<br />|}}{{#if:{{{strategy|}}}|'''Strategy:''' {{{strategy}}}<br />|}}
|}}| align="center" width="150" style="background-color: {{{bgcolor1|#cccccc}}};" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}||colspan=2}} | [[File:{{{image|{{{name|NPA}}}.png}}}|64px]]
{{#if:{{{description|}}}|{{!}}- align="center" style="background-color: {{{bgcolor2|#bbbbbb}}};"|}}
{{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|{{!}} {{#if:{{{foundin|}}}|'''Found in:''' {{{foundin}}}
{{#if:{{{description|}}}|{{!}} colspan=2 {{!}} '''Description'''|}}
|}}{{#if:{{{usedfor|}}}| '''Used for:''' {{{usedfor}}}
{{#if:{{{description|}}}|{{!}}- align="center" style="background-color: {{{bgcolor1|#cccccc}}};" valign="top"|}}
|}}{{#if:{{{strategy|}}}| '''Strategy:''' {{{strategy}}}
{{#if:{{{description|}}}|{{!}} colspan=2 {{!}} {{{description}}}|}}
|}}|}}{{#if:{{{description|}}}|
{{#if:{{{contents|}}}|{{!}}- align="center" style="background-color: {{{bgcolor2|#bbbbbb}}};"|}}
{{!}}- style="background-color: {{{bgcolor2|#bbbbbb}}};"
{{#if:{{{contents|}}}|{{!}} colspan=2 {{!}} '''Contents'''|}}
{{!}} colspan="2" {{!}} '''Description'''
{{#if:{{{contents|}}}|{{!}}- align="center" style="background-color: {{{bgcolor1|#cccccc}}};" valign="top"|}}
{{!}}- align="center" style="background-color: {{{bgcolor1|#cccccc}}};" valign="top"
{{#if:{{{contents|}}}|{{!}} colspan=2  {{!}} {{{contents}}}|}}
{{!}} colspan="2" {{!}}
{{{description}}}|}}{{#if:{{{contents|}}}|
{{!}}- align="center" style="background-color: {{{bgcolor2|#bbbbbb}}};"
{{!}} colspan="2" {{!}} '''Contents'''
{{!}}- align="center" style="background-color: {{{bgcolor1|#cccccc}}};" valign="top"
{{!}} colspan="2" {{!}}
{{{contents}}}|}}
|}<noinclude>
|}<noinclude>


== Usage ==
== Usage ==
Line 59: Line 64:
| name = Emergency Toolbox
| name = Emergency Toolbox
| image = Red Toolbox.png
| image = Red Toolbox.png
| foundin = emergency lockers and storage areas
| foundin = Emergency lockers and storage areas.
| usedfor = Contains tools which are useful in emergencies
| usedfor = Contains tools which are useful in emergencies.
| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful, as well as a crowbar.
| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
Line 67: Line 72:


=== Container items ===
=== Container items ===
If the <code>contents</code> parameter is set, this template will thow:
If the <code>contents</code> parameter is set, this template will show:


   <nowiki>{{Item</nowiki>
   <nowiki>{{Item</nowiki>
Line 74: Line 79:
   <nowiki>| name = Emergency Toolbox</nowiki>
   <nowiki>| name = Emergency Toolbox</nowiki>
   <nowiki>| image = Red Toolbox.png</nowiki>
   <nowiki>| image = Red Toolbox.png</nowiki>
   <nowiki>| foundin = emergency lockers and storage areas</nowiki>
   <nowiki>| foundin = Emergency lockers and storage areas.</nowiki>
   <nowiki>| usedfor = Contains tools which are useful in emergencies</nowiki>
   <nowiki>| usedfor = Contains tools which are useful in emergencies.</nowiki>
   <nowiki>| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
   <nowiki>| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful, as well as a crowbar.</nowiki>
   <nowiki>| contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welder.png|link=Welding Tool]] [[File:Crowbar.png|link=Crowbar]][[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]] </nowiki>
   <nowiki>| contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welder.png|link=Welding Tool]] [[File:Crowbar.png|link=Crowbar]][[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]] </nowiki>
   <nowiki>| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.</nowiki>
   <nowiki>| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.</nowiki>
Line 87: Line 92:
| name = Emergency Toolbox
| name = Emergency Toolbox
| image = Red Toolbox.png
| image = Red Toolbox.png
| foundin = emergency lockers and storage areas
| foundin = Emergency lockers and storage areas.
| usedfor = Contains tools which are useful in emergencies
| usedfor = Contains tools which are useful in emergencies.
| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful, as well as a crowbar.
| contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welderon.gif|link=Welding Tool]] [[File:Crowbar.png|link=Crowbar]] [[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]]  
| contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welderon.gif|link=Welding Tool]] [[File:Crowbar.png|link=Crowbar]] [[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]]  
| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.

Revision as of 03:26, 1 November 2014

NPA.png

Usage

This template is intended to help list item descriptions in a consistent fashion across articles.

With no parameters

 {{Item}}
NPA.png

With minimal parameters

The bare minimum is with the name parameter:

 {{Item
 | name = Test Item
 | bgcolor1 = #FFEE88
 | bgcolor2 = #FFDD66
 | image = Red Toolbox.png
 }}
Test Item

Typical item

If the description parameter is set, this template will show:

 {{Item
 | bgcolor1 = #FFEE88
 | bgcolor2 = #FFDD66
 | name = Emergency Toolbox
 | image = Red Toolbox.png
 | foundin = emergency lockers and storage areas
 | usedfor = Contains tools which are useful in emergencies
 | strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
 | description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
 Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
 }}
Emergency Toolbox
- style="background-color: #FFDD66;" Description

The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency. Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.

Container items

If the contents parameter is set, this template will show:

 {{Item
 | bgcolor1 = #FFEE88
 | bgcolor2 = #FFDD66
 | name = Emergency Toolbox
 | image = Red Toolbox.png
 | foundin = Emergency lockers and storage areas.
 | usedfor = Contains tools which are useful in emergencies.
 | strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful, as well as a crowbar.
 | contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welder.png|link=Welding Tool]] [[File:Crowbar.png|link=Crowbar]][[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]] 
 | description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
 Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
 }}
Emergency Toolbox
- style="background-color: #FFDD66;" Description

The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency. Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.|- align="center" style="background-color: #FFDD66;"

Contents

Screwdriver tool.png Wrench.png Welderon.gif Crowbar.png Analyzer.png Wirecutters.png