Timeline Item – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template doc updated.)
(Use CSS)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>|-
<includeonly>|-
|style="border-bottom: 1px dotted gray; border-top:{{{start|0}}}px solid #ababab; border-right: 1px dotted gray; padding-left: 0.5em; padding-right: 0.7em; font-size:120%; background-color:#444;"|<div style="width:0;height:0;font-size:0;">{{{1|}}}{{{2|}}}</div>{{Icon|{{{1}}}}}
| class="timeline-item-icon"{{#if:{{{start|}}}|<nowiki/> style="border-top: {{{start}}}px"}} | {{#if:{{{1|}}}|{{Icon|{{{1}}}}}|{{Icon|unknown}}}}
|style="border-bottom: 1px dotted gray; padding-left: 0.5em; padding-right: 1.5em; font-size:120%; background-color:{{{6|white}}};"|'''{{{3|}}}'''&nbsp;/&nbsp;{{{4|}}}
| class="timeline-item-date"{{#if:{{{6|}}}|<nowiki/> style="background-color:{{{6}}}"}} | '''{{{3|?}}}'''&nbsp;/&nbsp;{{{4|approx.}}}
|style="border-bottom: 1px dotted gray; padding: 0.1em 0.5em 0.1em 0.5em; vertical-align:middle; background-color:{{{6|white}}};"|
| class="timeline-item-text"{{#if:{{{6|}}}|<nowiki/> style="background-color:{{{6}}}"}} |
{{{5|}}}</includeonly><noinclude>
{{{5|-no text provided!-{{TemplateCase||[[Category:Timeline Item template usage error]]}}}}}</includeonly><noinclude>
Displays an [[Armaverse Timeline]] item - a line in the big table of Time.
Displays an [[Armaverse Timeline]] item - a line in the big table of Time.


== Usage ==
== Usage ==
{{<nowiki/>Timeline_item|'''''type'''''|'''''metadata'''''|'''''year'''''|'''''date'''''|'''''description'''''|'''''bgColor'''''}}
{{<nowiki/>Timeline_Item|'''''type'''''|'''''metadata'''''|'''''year'''''|'''''date'''''|'''''description'''''|'''''bgColor'''''}}
* type: See [[Template:Icon|icon template]]
* type: (Optional, default {{hl|unknown}}) See [[Template:Icon|icon template]]
* metadata: more information, usually the mentioned person's name (not displayed, hidden by {{Wikipedia|Cascading_Style_Sheets|CSS}})
* metadata: obsolete, unused
* year: a number
* year: (Optional, default "?") a year number
* date: a more precise date if available, to format <tt>'''MM'''&amp;nbsp;/&amp;nbsp;'''DD'''</tt> ("approx" if no more information)
* date: (Optional, default "approx.") a more precise date if available, to format {{hl|'''MM'''&amp;nbsp;/&amp;nbsp;'''DD'''}}
* description: text describing the event. Use html <tt>&lt;h4&gt;&lt;/h4&gt;</tt> tags to name an event (usually the mission name), <tt>&lt;h3&gt;&lt;/h3&gt;</tt> for a title.
* description: text describing the event. Use html {{hl|&lt;h4&gt;&lt;/h4&gt;}} tags to name an event (usually the mission name), {{hl|&lt;h3&gt;&lt;/h3&gt;}} for a title.
* bgColor: background color - (Optional, default "white") use <tt>LightSteelBlue</tt> for title
* bgColor: (Optional) background color - use {{hl|LightSteelBlue}} for title


; Named parameters:
; Named parameters:
* start: defines the top border's thickness (in px). e.g: <tt>|start=2</tt>
* start: defines the top border's thickness (in px). e.g: {{hl|c= {{!}}start=2}}


{|class="wikitable"
The template adds the page to the [[:Category:Timeline Item template usage error|Timeline Item template usage error]] category in case ''description'' is not provided.
 
{| class="wikitable"
|+ Examples
|+ Examples
! Code
! Code
! Result (put in an additional table)
! Result (put in an additional table)
|-
|-
| <code><nowiki>{{Timeline_Item
| <syntaxhighlight lang="handlebars">{{Timeline_Item}}</syntaxhighlight>
|
{| class="wikitable"
! colspan="3" | Existing table
{{Timeline_Item}}
|}
|-
| <syntaxhighlight lang="handlebars">{{Timeline_Item
|ARMA3|
|2035|08&amp;nbsp;/&amp;nbsp;02|
<h4>Within Reach</h4>
Kerry joins a small team bound for Stratis.
}}</syntaxhighlight>
|
{| class="wikitable"
! colspan="3" | Existing table
{{Timeline_Item
|ARMA3|
|2035|08&nbsp;/&nbsp;02|
<h4>Within Reach</h4>
Kerry joins a small team bound for Stratis.
}}
|}
|-
| <syntaxhighlight lang="handlebars">{{Timeline_Item
|ARMA3|
|ARMA3|
|2035|08&amp;nbsp;/&amp;nbsp;02|
|2035|08&amp;nbsp;/&amp;nbsp;02|
<h4>Within Reach</h4>
<h4>Within Reach</h4>
Kerry joins a small team bound for Stratis.
Kerry joins a small team bound for Stratis.
}}</nowiki></code>
|start= 10
}}</syntaxhighlight>
|
|
{| class="bikitable"
{| class="wikitable"
! colspan="3" | Existing table
! colspan="3" | Existing table
{{Timeline_Item
{{Timeline_Item
Line 37: Line 64:
<h4>Within Reach</h4>
<h4>Within Reach</h4>
Kerry joins a small team bound for Stratis.
Kerry joins a small team bound for Stratis.
|start= 10
}}
}}
|}
|}

Latest revision as of 10:45, 16 February 2024

Displays an Armaverse Timeline item - a line in the big table of Time.

Usage

{{Timeline_Item|type|metadata|year|date|description|bgColor}}

  • type: (Optional, default unknown) See icon template
  • metadata: obsolete, unused
  • year: (Optional, default "?") a year number
  • date: (Optional, default "approx.") a more precise date if available, to format MM&nbsp;/&nbsp;DD
  • description: text describing the event. Use html <h4></h4> tags to name an event (usually the mission name), <h3></h3> for a title.
  • bgColor: (Optional) background color - use LightSteelBlue for title
Named parameters
  • start: defines the top border's thickness (in px). e.g: |start=2

The template adds the page to the Timeline Item template usage error category in case description is not provided.

Examples
Code Result (put in an additional table)
{{Timeline_Item}}
Existing table
Unknown ? / approx.

-no text provided!-

{{Timeline_Item
|ARMA3|
|2035|08&amp;nbsp;/&amp;nbsp;02|
<h4>Within Reach</h4>
Kerry joins a small team bound for Stratis.
}}
Existing table
Arma 3 2035 / 08 / 02

Within Reach

Kerry joins a small team bound for Stratis.

{{Timeline_Item
|ARMA3|
|2035|08&amp;nbsp;/&amp;nbsp;02|
<h4>Within Reach</h4>
Kerry joins a small team bound for Stratis.
|start= 10
}}
Existing table
Arma 3 2035 / 08 / 02

Within Reach

Kerry joins a small team bound for Stratis.