Vorlage:Tableau GroupeComm/dev
aus Wikipedia, der freien Enzyklopädie
Template | Sub-template | User Guide | Development Note
Inhaltsverzeichnis |
[Bearbeiten] Main Note
The use of a sub-table able :
- to define the spaces between lines and cells differently in the two table (cellspacing, cellpadding, padding,..).
- to not having to modify every line of the template to change the colors or the alignments.
[Bearbeiten] Optionals sections
If you want to had a new section, please :
- put it optional to not bother other wiki users,
- make the change too in the user guide,
- inform the other wikipedians for example with a note on the main table,
- if that section is for serving only once, we ask you to create instead two generic variables like "title1" and "data1" which you'll fill only in your article.
[Bearbeiten] Functioning
We use function If ... then ... else ... see : Vorlage:If.
Beispiel: {{if |test={{{siteweb|}}} |then={{Tableau GroupeComm/subtab | [[World Wide Web|Site(s) Web]] | {{{siteweb|}}} }} }}
To be read as : If the variable "siteweb" exists, then post the sub-table (value1: title of the section, value2: the data).
So only the lines that directly call the sub-table always appears.
[Bearbeiten] Main template
the whole table
- align="right" : in the right of the page
- cellpadding="0" : height of line minimum
- cellspacing="0" : no space between cells (is at "1" in the sub-table)
- margin: 0 0 1em 1em : margins top:0 right:0 bottom:1 left:1
- border: 1px solid #999 : border of 1 pixel in style "solid #999".
- font-size: 95% : font at 95% of the standard size (just to be different from the main part of the article)
- padding:5px : space of 5 pixels around the table in the inside
- background-color: #FFCB8F : background color for the whole table
- width:300px : width of the table 300 pixels
empties lines
some lines are left empty voluntarily with just parameters to manage spaces between "nom" and "dept,..", around "images", between the end of the table and "imagesfin".
Functioning
- as the main table is only of one column, it manages the sections that need all the width of the table :
- nom
- images
- imagesfin
- all the others lines call the sub-table with the title as value1 and data as value2.
[Bearbeiten] Sub-template
It's a table of 2 columns :
- value1 :
- width:100px : width of the column 100 pixels
- align="top"
- value2 :
- width:190px : width of the column 190 pixels
- align="center"
- bgcolor=#FFE2BF : background color of the cells (lighter)
- the whole sub-table :
- font-size: 95% : the same as the main table
- background-color: #FFCB8F : background color same as the main table (darker)
- cellpadding="0" : minimum height of line
- cellspacing="1" : space between cells at 1 (that makes appearing lines in the same color as the background).