Difference between revisions of "Template:Infobox"

From
Jump to: navigation, search
(Created page, cloned content from the Wikipedia template of the same name.)
(Syntax)
 
(82 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox
+
=Function=
|name        = Infobox
 
|bodystyle    =  
 
  
|titlestyle  =
+
A succinct infobox to be used at the very top of individual pages. Meant to give the reader a quick context summary of the page. The full metadata is then given at the bottom of the page using [[Template:DocumentMetadata]].
|abovestyle  = background:#cfc;
 
|subheaderstyle =
 
|title        = Test Infobox
 
|above        = Above text
 
|subheader    = Subheader above image
 
|subheader2  = Second subheader
 
  
|imagestyle  =  
+
=Syntax=
|captionstyle =  
 
|  image      = [[File:Example-serious.jpg|200px|alt=Example alt text]]
 
|caption      = Caption displayed below Example-serious.jpg
 
  
  |headerstyle  = background:#ccf;
+
Parameters. Copy-paste to the top of your page (or immediately below the first heading) and fill in the balnks:
|labelstyle  = background:#ddf;
+
  <nowiki>
|datastyle    =  
+
{{Infobox
 +
| project = (Plain text. Should match an existing category)
 +
| image = (Wikilink. Looks for the project logo, and if nothing is found, defaults to ENVRI Community logo)
 +
| deliverable-nr = (Any format, eg. D1.2.)
 +
| submission-date = (ISO 8601 format, ie. YYYY-MM-DD)
 +
| type = (Plain text. Should match an existing category.)
 +
| url = (Wikilink to copy of PDF file on the wiki.)
 +
| zenodo = (Plain URL to Zenodo page.)
 +
}}
 +
</nowiki>
  
|header1 = Header defined alone
+
=Wikitext=
| label1 =  
+
''Transcluded content starts here.''
| data1 =  
+
<onlyinclude>
|header2 =
+
<div class="infobox">
| label2 = Label defined alone does not display (needs data, or is suppressed)
+
<div class="infobox-title">{{#if:{{{deliverable-nr|}}} | {{{deliverable-nr}}} {{PAGENAME}} | {{PAGENAME}} }}</div>
| data2 =
+
<div class="infobox-image">{{#if:{{{image|}}} | [[File:{{{image}}}|200px]] |
|header3 =
+
{{#ifexist:[[File:{{{project}}}_logo.jpg]]|[[File:{{{project}}}_logo.jpg]]|[[File:ENVRI-community-logo.jpg|200px]]}} }}</div>
| label3 =
+
<table>
| data3 = Data defined alone
+
{{#if:{{{project|}}} |
|header4 = All three defined (header, label, data, all with same number)
+
<tr>
| label4 = does not display (same number as a header)
+
    <th>Project</th>
| data4 = does not display (same number as a header)
+
    <td>[[:Category:{{{project}}}{{!}}{{{project}}}]]</td>
|header5 =
+
</tr>|}}
| label5 = Label and data defined (label)
+
{{#if:{{{deliverable-nr|}}} |
| data5 = Label and data defined (data)
+
<tr>
 
+
    <th>Deliverable nr</th>
|belowstyle = background:#ddf;
+
    <td>{{{deliverable-nr}}}</td>
|below      = Below text
+
</tr>|}}
}}
+
{{#if:{{{submission-date|}}} |
 +
<tr>
 +
    <th>Submission date</th>
 +
    <td>{{{submission-date}}}</td>
 +
</tr>}}
 +
{{#if:{{{type|}}} |
 +
<tr>
 +
    <th>Type</th>
 +
    <td>[[:Category:{{ucfirst:{{lc:{{{type}}}}}}}|{{ucfirst:{{lc:{{{type}}}}}}}]]</td>
 +
</tr>|}}
 +
</table>
 +
<p align="center"><strong>
 +
    {{#if:{{{url|}}}|[{{{url}}} PDF]| PDF}} |
 +
    {{#if:{{{zenodo|}}}| [{{{zenodo}}} Zenodo]| Zenodo}}
 +
</strong></p>
 +
<p align="center">[[#metadata|Document metadata]]</p>
 +
</div>
 +
</onlyinclude>

Latest revision as of 14:04, 12 April 2021

Function[edit]

A succinct infobox to be used at the very top of individual pages. Meant to give the reader a quick context summary of the page. The full metadata is then given at the bottom of the page using Template:DocumentMetadata.

Syntax[edit]

Parameters. Copy-paste to the top of your page (or immediately below the first heading) and fill in the balnks:

{{Infobox
| project = (Plain text. Should match an existing category)
| image = (Wikilink. Looks for the project logo, and if nothing is found, defaults to ENVRI Community logo)
| deliverable-nr = (Any format, eg. D1.2.)
| submission-date = (ISO 8601 format, ie. YYYY-MM-DD)
| type = (Plain text. Should match an existing category.)
| url = (Wikilink to copy of PDF file on the wiki.)
| zenodo = (Plain URL to Zenodo page.)
}}

Wikitext[edit]

Transcluded content starts here.

Infobox
ENVRI-community-logo.jpg

PDF | Zenodo

Document metadata