Difference between revisions of "Template:Infobox"

From LFS Manual
Jump to navigationJump to search
m
m
Line 51: Line 51:
 
}}
 
}}
 
{{#if:{{{data1|}}}|
 
{{#if:{{{data1|}}}|
 +
<tr>
 
   {{#if:{{{label1|}}}
 
   {{#if:{{{label1|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label1}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label1}}}</th>
Line 56: Line 57:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data1}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data1}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 64: Line 66:
 
}}
 
}}
 
{{#if:{{{data2|}}}|
 
{{#if:{{{data2|}}}|
 +
<tr>
 
   {{#if:{{{label2|}}}
 
   {{#if:{{{label2|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label2}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label2}}}</th>
Line 69: Line 72:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data2}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data2}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 77: Line 81:
 
}}
 
}}
 
{{#if:{{{data3|}}}|
 
{{#if:{{{data3|}}}|
 +
<tr>
 
   {{#if:{{{label3|}}}
 
   {{#if:{{{label3|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label3}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label3}}}</th>
Line 82: Line 87:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data3}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data3}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 90: Line 96:
 
}}
 
}}
 
{{#if:{{{data4|}}}|
 
{{#if:{{{data4|}}}|
 +
<tr>
 
   {{#if:{{{label4|}}}
 
   {{#if:{{{label4|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label4}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label4}}}</th>
Line 95: Line 102:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data4}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data4}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 103: Line 111:
 
}}
 
}}
 
{{#if:{{{data5|}}}|
 
{{#if:{{{data5|}}}|
 +
<tr>
 
   {{#if:{{{label5|}}}
 
   {{#if:{{{label5|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label5}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label5}}}</th>
Line 108: Line 117:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data5}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data5}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 116: Line 126:
 
}}
 
}}
 
{{#if:{{{data6|}}}|
 
{{#if:{{{data6|}}}|
 +
<tr>
 
   {{#if:{{{label6|}}}
 
   {{#if:{{{label6|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label6}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label6}}}</th>
Line 121: Line 132:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data6}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data6}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 129: Line 141:
 
}}
 
}}
 
{{#if:{{{data7|}}}|
 
{{#if:{{{data7|}}}|
 +
<tr>
 
   {{#if:{{{label7|}}}
 
   {{#if:{{{label7|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label7}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label7}}}</th>
Line 134: Line 147:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data7}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data7}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 142: Line 156:
 
}}
 
}}
 
{{#if:{{{data8|}}}|
 
{{#if:{{{data8|}}}|
 +
<tr>
 
   {{#if:{{{label8|}}}
 
   {{#if:{{{label8|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label8}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label8}}}</th>
Line 148: Line 163:
 
   }}
 
   }}
 
}}
 
}}
 +
</tr>
  
 
{{#if:{{{header9|}}}|
 
{{#if:{{{header9|}}}|
Line 155: Line 171:
 
}}
 
}}
 
{{#if:{{{data9|}}}|
 
{{#if:{{{data9|}}}|
 +
<tr>
 
   {{#if:{{{label9|}}}
 
   {{#if:{{{label9|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label9}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label9}}}</th>
Line 160: Line 177:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data9}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data9}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  
Line 168: Line 186:
 
}}
 
}}
 
{{#if:{{{data10|}}}|
 
{{#if:{{{data10|}}}|
 +
<tr>
 
   {{#if:{{{label10|}}}
 
   {{#if:{{{label10|}}}
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label10}}}</th>
 
| <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label10}}}</th>
Line 173: Line 192:
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data10}}}</td>
 
| <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data10}}}</td>
 
   }}
 
   }}
 +
</tr>
 
}}
 
}}
  

Revision as of 23:26, 7 December 2023

Template Info-Icon.png

Template documentation

View - Edit

Usage

Basic

Markup Renders as
{{Infobox
| above     = Text above
| subheader = Subheader of the infobox

| header1   = Header 1 text
| label1    = Label 1
| data1     = Data 1
| header2   = Header 2 text
| label2    = Label 2
| data2     = Data 2
| header3   = Header 3 text
| data3     = Data 3
}}
Text above
Subheader of the infobox
Header 1 text
Label 1 Data 1
Header 2 text
Label 2 Data 2
Header 3 text
Data 3

All parameters

Text in caption over infobox
Text above
Subheader of the infobox
All LFS cars
Caption below image 1
All LFS cars
Caption below image 2
Header 1 text
Label 1 Data 1
Header 2 text
Label 2 Data 2
Header 3 text
Label 3 Data 3
Header 4 text
Label 4 Data 4
Header 5 text
Label 5 Data 5
Header 6 text
Label 6 Data 6
Header 7 text
Label 7 Data 7
Header 8 text
Label 8 Data 8
Header 9 text
Label 9 Data 9
Header 10 text
Label 10 Data 10
Below text


Without any parameters

Markup Renders as
{{Infobox}}


Custom styles

Markup Renders as
{{Infobox
| titlestyle = background: #ddd;
| abovestyle = background: #cfc;
| subheaderstyle = background: #ffc;
| title     = Text in caption over infobox
| above     = Text above
| subheader = Subheader of the infobox

| headerstyle = background: #ccf;
| labelstyle = background: #ddf;
| datastyle = background: #dedede;

| header1      = Header 1 text
| label1       = Label 1
| data1        = Data 1

| header2style = background: #cff;
| header2      = Header 2 text
| data2        = Data 2
}}
Text in caption over infobox
Text above
Subheader of the infobox
Header 1 text
Label 1 Data 1
Header 2 text
Data 2


Only data rows

Markup Renders as
{{Infobox
| above     = Text above
| subheader = Subheader of the infobox

| label1    = Label 1
| data1     = Data 1
| label2    = Label 2
| data2     = Data 2
| label3    = Label 3
| data3     = Data 3
| data4     = Data 4
| data5     = Data 5
}}
Text above
Subheader of the infobox
Label 1 Data 1
Label 2 Data 2
Label 3 Data 3
Data 4
Data 5