Usuari:Mcapdevila/a/doc
Aquesta plantilla utilitza una crida a un mòdul de tipus Lua, nom que li ve del llenguatge Lua que utilitza. Per tant, si volguéssiu modificar-la, abans hauríeu d'estar familiaritzats amb aquest llenguatge i les funcions de l'extensió Scribunto. Vegeu com fer proves de plantilles.
Aquesta plantilla utilitza el següent mòdul: |
Aquest plantilla utilitza TemplateStyles: |
This template is used to create navbox in the form of a timeline.
Usage
[modifica]Please remove the parameters that are left blank.
{{Timeline | name = {{subst:PAGENAME}} | title = | state = {{{state|}}} | image = | above = | row1 = | item1 = | date1 = | style1 = | item2 = | date2 = | style2 = <!-- ... --> | below = }}
Parameters
[modifica]Content parameters
[modifica]These parameters are used to change the content of the timeline portion of the navbox.
rown
- Defines a row with a optional label.spann
- Sets how many rows tall the label for row n should be. Any labels for rows that fall inside the label will be discarded.itemn
- Defines an item to show in the navbox. The item is shown in the last defined row. If an item exists without a row of the same number, it is either added to the previous row or a new row is created.daten
- Defines the start and end year for item n in the formatstart-end
. If end is omitted, the current year is omitted, so generally the items at the end of the timeline should use the formatstart-
.decades
- Set tono
to remove the decade row and to show the full year.footer
- Set toyes
to show the date rows at the bottom of the timeline as well.label
- Include to show a label column with the content of therown
parameters beneath the value of thelabel
parameter.
Navbox parameters
[modifica]These parameters are that are used to change the navbox.
name
- The name of the template.title
- Text to add to the title bar, for example Honda road car timeline.above
- Text to add above the "content" of the navbox.below
- Text to add below the "content" of the navbox.state
- Weather the navbar is expanded, collapsed, or not collapsible.navbar
- Set toplain
oroff
to remove the V • T • E links on the left side of the title of the navbar, it is recommended you don't do this to maintain consistency between navboxes.border
or1
- Set tochild
orsubgroup
to use this navbox as a borderless navbox that can fit snugly in another navbox. Set tonone
to remove the border and thenavbox
class.image
- An image to be displayed in a cell below the title and to the right of the body.imageleft
- An image to be displayed in a cell below the title and to the left of the body.
Time parameters
[modifica]These parameters adjust the length of the timeline
startoffset
- Set to a number to extend the start of the timeline that number of years backstartyear
- Set to a year to set the start of the timeline to that year if the content of the navbox doesn't go beyond that yearendoffset
- Set to a number to extend the end of the timeline that number of years forwardendyear
- Set to a year to set the end of the timeline to that year if the content of the navbox doesn't go beyond that year
Content style parameters
[modifica]These parameters apply style to the "content" of the navbox.
stylen
- CSS to apply to the cell of item n.labelstylen
- CSS to apply to the label of row n.itemstyle
- CSS to apply to item cells.blankstyle
- CSS to apply to blank cells.labelstyle
- CSS to apply to label cells.datestyle
- CSS to apply to year and decade cells.decadestyle
- CSS to apply to decade cells.yearstyle
- CSS to apply to year cells.
Navbox style parameters
[modifica]These parameters apply style to the parts of the navbox outside of the "content" of the navbox.
style
orbodystyle
- CSS to apply to the body of the navbox.basestyle
- CSS to apply to the title, above, and below.titlestyle
- CSS to apply to the title.abovestyle
- CSS to apply to the above.belowstyle
- CSS to apply to the below.imagestyle
- CSS to apply to the cell containingimage
imageleftstyle
- CSS to apply to the cell containingimageleft
Class parameters
[modifica]These parameters add classes to parts of the navbox.
titleclass
- Classes to add to the title of the navbox.aboveclass
- Classes to add to the above of the navbox.bodyclass
- Classes to add to the body of the navbox.belowclass
- Classes to add to the below of the navbox.imageclass
- Classes to add to both the right and left images of the navbox.
Examples
[modifica]Basic
[modifica]This is a basic example of this template.
label
[modifica]When you specify the |label=
parameter, the contents of the |rown=
parameters are shown on the left underneath the |label=
parameter.
decades
[modifica]When |decades=no
is set, the decade row is removed and the year row contains the full years.
footer
[modifica]When |footer=yes
is set, the decade and year rows at the top of the template are shown again at the bottom. This is useful for very large timelines.
Item and label style
[modifica]The |stylen=
parameters can be used to style items and the |labelstylen=
can be used to style rows.
above and below
[modifica]start and end
[modifica]|startoffset=
and |endoffset=
can be used to extend the start and end of the timeline.
Alternatively, |startyear=
and |endyear=
can be used to extends the start and end of the timeline to those years of the content of the timeline doesn't go beyond those years.
Inside another navbox
[modifica]This template can be used to inside another navbox by calling it using {{Timeline|child|...}}
.
image and imageleft
[modifica]The |image=
and |imageleft=
can be used to add content (preferably images) to the right and left of the navbox respectively.