Difference between revisions of "Template:Infobox rock/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Fuhghettaboutit
m (moved Template:Infobox Rock/sandbox to Template:Infobox rock/sandbox: Capitalization standardization)
imported>WOSlinker
(sync)
Line 1: Line 1:
{| class="infobox vcard" style="text-align:left;width:200px;"
+
{{infobox
|-
+
| title          = {{{name|<includeonly>{{PAGENAME}}</includeonly>}}}{{#if:{{{alternative_name|}}}|<br /><small>{{{alternative_name}}}</small>}}
| colspan="2" align="center" style="width:100%; white-space: nowrap;" |'''<big>{{#if:{{{name|}}}|{{{name}}}|''Unnamed Rock''}}</big>'''{{#if:{{{alternative_name|}}}|<br /><span class="font-size:80%">{{{alternative_name}}}</span>}}</td>
+
| subheaderstyle = background-color: #cddeff
|-
+
| subheader      = {{#if:{{{type|}}}|[[{{{type_link|{{{type}}}}}}|{{{type}}} rock]]}}
{{#if:{{both|{{{name|}}}|{{{type|}}}}}|
+
| headerstyle    = background-color: #ccc
{{!}} colspan="2" style="text-align:center;background:#cddeff;" {{!}} &mdash;&nbsp;&nbsp;'''[[{{{type_link|{{{type}}}}}}|{{{type}}} Rock]]'''&nbsp;&nbsp;&mdash;
+
| image          = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|alt={{{alt|{{{image_alt|}}}}}}}}
}}
+
| caption        = {{{caption|{{{image_caption|}}}}}}
|-
+
 
{{#if:{{{image|}}}|
+
| label1        = Coordinates
{{!}} colspan="2" style="text-align:center;" {{!}} [[Image:{{{image}}}|{{{image_size|200px}}}|{{{name|Unnamed Rock}}} Image]]{{#if:{{{image_caption|}}}|<br /><small>{{{image_caption}}}</small> }}
+
| data1          = {{{coordinates|}}}
}}
+
 
|-
+
| header2        = {{#if:{{{composition|}}}|Composition}}
{{#if:{{{composition|}}}|
+
 
{{!}} colspan="2" style="background:#ccc;" {{!}} '''Composition'''
+
| label3        = {{#if:{{{composition_secondary|}}}|Primary}}
{{!}}-
+
| data3          = {{{composition|}}}
{{#if:{{{composition_secondary|}}}|
+
 
{{!}} colspan="1" valign="top" {{!}} Primary
+
| label4        = Secondary
{{!}} colspan="1" {{!}} {{{composition}}}  
+
| data4          = {{{composition_secondary|}}}
{{!}}-
+
 
{{!}} colspan="1" valign="top" {{!}} Secondary
+
}}<noinclude>{{documentation}}<!-- place category and language links on the /doc page, not here --></noinclude>
{{!}} colspan="1" {{!}} {{{composition_secondary}}}  
 
|
 
{{!}} colspan="2" {{!}} {{{composition}}}
 
}}
 
}}
 
|}
 

Revision as of 13:10, 27 February 2015

50px Template documentation[view] [edit] [history] [purge]

Usage

This template provides an infobox for rocks (contrast with the infobox for minerals). The default is 220px wide but can be made wider by setting the image_size parameter.

Basalt
Igneous rock
File:BasaltUSGOV.jpg
Composition
Mafic: amphibole and pyroxene, sometimes plagioclase, feldspathoids, and/or olivine.
{{Infobox rock
|name=
|type=
|coordinates=
|image=
|alt=
|caption=
}}
{{Infobox rock
|name=
|alternative_name=
|type=
|type_link=
|image=
|image_size=
|alt=
|caption=
|coordinates=
|composition=
|composition_secondary=
}}