Difference between revisions of "Template:Infobox"
From LFS Manual
Jump to navigationJump to searchm |
m |
||
Line 61: | Line 61: | ||
<td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data2}}}</td> | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data2}}}</td> | ||
| <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> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header3|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header3style|{{{headerstyle}}}}}}">{{{header3}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data3|}}}| | ||
+ | {{#if:{{{label3|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label3}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data3}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data3}}}</td> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header4|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header4style|{{{headerstyle}}}}}}">{{{header4}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data4|}}}| | ||
+ | {{#if:{{{label4|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label4}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data4}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data4}}}</td> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header5|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header5style|{{{headerstyle}}}}}}">{{{header5}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data5|}}}| | ||
+ | {{#if:{{{label5|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label5}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data5}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data5}}}</td> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header6|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header6style|{{{headerstyle}}}}}}">{{{header6}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data6|}}}| | ||
+ | {{#if:{{{label6|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label6}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data6}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data6}}}</td> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header7|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header7style|{{{headerstyle}}}}}}">{{{header7}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data7|}}}| | ||
+ | {{#if:{{{label7|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label7}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data7}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data7}}}</td> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header8|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header8style|{{{headerstyle}}}}}}">{{{header8}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data8|}}}| | ||
+ | {{#if:{{{label8|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label8}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data8}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data8}}}</td> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header9|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header9style|{{{headerstyle}}}}}}">{{{header9}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data9|}}}| | ||
+ | {{#if:{{{label9|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label9}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data9}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data9}}}</td> | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#if:{{{header10|}}}| | ||
+ | <tr> | ||
+ | <th colspan="2" style="text-align: center; {{{header10style|{{{headerstyle}}}}}}">{{{header10}}}</th> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if:{{{data10|}}}| | ||
+ | {{#if:{{{label10|}}} | ||
+ | | <th scope="row" style="text-align: left; vertical-align: top; {{{labelstyle|}}}">{{{label10}}}</th> | ||
+ | <td scope="row" style="text-align: left; vertical-align: top; {{{datastyle|}}}">{{{data10}}}</td> | ||
+ | | <td scope="row" style="text-align: center; vertical-align: top; {{{datastyle|}}}" colspan="2">{{{data10}}}</td> | ||
}} | }} | ||
}} | }} |
Revision as of 21:42, 7 December 2023
Template documentation
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 }} |
| ||||||||||||||||
All parameters
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 }} |
| ||||||||||||
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 }} |
| ||||||||||||||