Difference between revisions of "User:Evolena"
(Testing Templates - Infobox) |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
{{HeaderTemplate | {{HeaderTemplate | ||
| welcome = | | welcome = Header Template ("welcome" parameter) | ||
| blurb = | | blurb = "blurb" parameter | ||
}} | }} | ||
Line 15: | Line 15: | ||
{{SectionTemplate | {{SectionTemplate | ||
| title = | | title = Section Template ("title" parameter) | ||
| content = Content ("content" parameter) | | content = Content ("content" parameter) | ||
within a "div" element with the class " | |||
This Section Template is within a "div" element with the class "middle" | |||
}} | }} | ||
</div> | </div> | ||
= | <div class="middle"> | ||
{{SectionTemplate | |||
| title = Another Section Template within a "div" element with the same class "middle" | |||
| content = No problem having several sections with the same class without the grid-container | |||
| content = | |||
}} | }} | ||
</div> | </div> | ||
{{SectionTemplate | {{SectionTemplate | ||
| title = Section Template without a div element | |||
| content = Not even need the div and class outside of a grid-container | |||
}} | }} | ||
<div class=" | == Grid == | ||
<div class="grid-container"> | |||
<div class="header"> | |||
{{SectionTemplate | {{SectionTemplate | ||
| title = | | title = Header Section (not Template) | ||
| content = Content with the class " | | content = Content of a Section Template with the class "header", into a grid-container | ||
}} | }} | ||
</div> | </div> | ||
<div class=" | <div class="left"> | ||
{{SectionTemplate | {{SectionTemplate | ||
| title = | | title = Left Section | ||
| content = Content with the class " | | content = Content with the class "left", into a grid-container | ||
Will go between the "middle2" and "middle3" sections if the screen width is less than 600px | |||
}} | }} | ||
</div> | </div> | ||
Line 69: | Line 68: | ||
| content = Content with the class "middle", into a grid-container - again | | content = Content with the class "middle", into a grid-container - again | ||
Without incrementing the class name, the sections | Without incrementing the class name, the sections overlap when in a grid-container | ||
}} | }} | ||
</div> | |||
<div class="middle2"> | <div class="middle2"> | ||
Line 79: | Line 79: | ||
Incrementing the class name prevents overlaping | Incrementing the class name prevents overlaping | ||
}} | }} | ||
</div> | |||
<div class="middle2"> | |||
{{SectionTemplate | |||
| title = Middle 2 Section bis | |||
| content = Content with the class "middle2", into a grid-container - again | |||
Incrementing the class name prevents overlaping, but still can't have several "middle#" sections | |||
}} | |||
</div> | |||
<div class="middle3"> | <div class="middle3"> | ||
Line 87: | Line 97: | ||
</div> | </div> | ||
</div> < | <div class="middle3"> | ||
{{SectionTemplate | |||
| title = Middle 3 Section bis | |||
| content = Content with the class "middle3", into a grid-container - overlap again | |||
}} | |||
</div> | |||
<div class="middle4"> | |||
{{SectionTemplate | |||
| title = Middle 4 Section bis | |||
| content = Content with the class "middle4", into a grid-container | |||
Unknown classes are displayed below left of the header in large width, and below 1200px in an additionnal "column" just right of the header (WTF?) between the header/middle/footer sections and the right section (which is still below the footer) | |||
}} | |||
</div> | |||
<div class="right"> | |||
{{SectionTemplate | |||
| title = Right Section | |||
| content = Content with the class "right", into a grid-container | |||
Is forgotten in the less than 1200px and 600px width CSS, so will go below and right of the footer... so not really usable | |||
}} | |||
</div> | |||
<div class="footer"> | |||
{{SectionTemplate | |||
| title = Footer Section | |||
| content = Content with the class "footer", into a grid-container | |||
}} | |||
</div> | |||
</div> | |||
=== Without "left" and "right" grid areas === | |||
Some space is still reserved for the missing grid areas | |||
<div class="grid-container"> | |||
<div class="header"> | |||
{{SectionTemplate | |||
| title = A Grid without "left" and "right" grid areas | |||
| content = Content of a Section Template with the class "header", into a grid-container without "left" and "right" grid areas | |||
}} | |||
</div> | |||
<div class="middle"> | |||
{{SectionTemplate | |||
| title = Middle Section | |||
| content = Content with the class "middle", into a grid-container without "left" and "right" grid areas | |||
}} | |||
</div> | |||
<div class="middle2"> | |||
{{SectionTemplate | |||
| title = Middle 2 Section | |||
| content = Content with the class "middle2", into a grid-container without "left" and "right" grid areas | |||
}} | |||
</div> | |||
<div class="middle3"> | |||
{{SectionTemplate | |||
| title = Middle 3 Section | |||
| content = Content with the class "middle3", into a grid-container without "left" and "right" grid areas | |||
}} | |||
</div> | |||
<div class="footer"> | |||
{{SectionTemplate | |||
| title = Footer Section | |||
| content = Content with the class "footer", into a grid-container without "left" and "right" grid areas | |||
}} | |||
</div> | |||
</div> | |||
= Formatting = | = Formatting = | ||
Line 97: | Line 181: | ||
= Transclusion = | = Transclusion = | ||
{{Turn off victory points}} | <nowiki>{{Turn off victory points}}</nowiki> | ||
Add a leading colon to adress the Main namespace instead of the Templates: | Add a leading colon to adress the Main namespace instead of the Templates: | ||
<nowiki>{{:Turn off victory points}}</nowiki> | |||
{{:Turn off victory points}} | {{:Turn off victory points}} | ||
Line 114: | Line 200: | ||
= Icons = | = Icons = | ||
== "icon" == | |||
* Uppercase, no space: {{icon|Civics}} | * Uppercase, no space: {{icon|Civics}} | ||
Line 132: | Line 220: | ||
* File 28px: [[File:Civics.png|28px|link=Laws]] (28x29) | * File 28px: [[File:Civics.png|28px|link=Laws]] (28x29) | ||
-> size taken into account | -> size taken into account | ||
== "Icon/x" == | |||
<nowiki>{{icon/t | training}}</nowiki> | |||
{{icon/t | training}} | |||
* links to the page "Resources" | |||
* only for parameters listed under the letter, otherwise displays an error message | |||
* 28px | |||
<nowiki>{{icon | training}}</nowiki> | |||
{{icon | training}} | |||
* links to the page "Training" | |||
* whatever the parameter is - if the image doesn't exist (only jpg and png), then displays "No Icon Found" | |||
* 16px | |||
= Other Templates = | = Other Templates = | ||
Line 140: | Line 246: | ||
| title = "title" parameter - or title of the current page | | title = "title" parameter - or title of the current page | ||
| name = "name" parameter - no | | name = "name" parameter - no | ||
| image = | | image = | ||
| section1 = "section1" parameter - no | | section1 = "section1" parameter - no | ||
| info1 = "info1" parameter - no | | info1 = "info1" parameter - no | ||
Line 153: | Line 259: | ||
| param6 = "param6" parameter - no | | param6 = "param6" parameter - no | ||
}} | }} | ||
An image can go between the title and the parameters table. | |||
Need to be duplicated to customize the Parameter 1/2/3/4/5 names? | |||
The style is quite plain too. | |||
The infobox used on the "Old World" page assume to be using a template with the same name, but different parameters (name, section1, info1, info1value, with at least 8 info possible) | |||
== Ambox == | |||
{{ambox | |||
| type = notice | |||
| text = "text" parameter with 'notice' as the type - default | |||
}} | |||
{{ambox | |||
| type = speedy | |||
| text = "text" parameter with 'speedy' as the type | |||
}} | |||
Only "Templates Information icon.png" exists in this wiki files for the different supported types: | |||
* speedy = Ambox warning pn.png | |||
* delete = Ambox warning pn.png | |||
* content = Ambox content.png | |||
* style = Edit-clear.png | |||
* move = Ambox move.png | |||
* protection = Ambox protection.png | |||
* other = Ambox warning blue.png | |||
* notice = Templates Information icon.png |
Latest revision as of 10:02, 26 February 2023
Sections[edit]
So, SectionTemplate (but not HeaderTemplate) is considered a level 2 title for the Table of Content.
Syntax[edit]
Header Template ("welcome" parameter)
|
"blurb" parameter |
Section Template ("title" parameter)
Content ("content" parameter)
This Section Template is within a "div" element with the class "middle"
Another Section Template within a "div" element with the same class "middle"
No problem having several sections with the same class without the grid-container
Section Template without a div element
Not even need the div and class outside of a grid-container
Grid[edit]
Header Section (not Template)
Content of a Section Template with the class "header", into a grid-container
Left Section
Content with the class "left", into a grid-container
Will go between the "middle2" and "middle3" sections if the screen width is less than 600px
Middle Section
Content with the class "middle", into a grid-container
Middle Section bis
Content with the class "middle", into a grid-container - again
Without incrementing the class name, the sections overlap when in a grid-container
Middle 2 Section
Content with the class "middle2", into a grid-container
Incrementing the class name prevents overlaping
Middle 2 Section bis
Content with the class "middle2", into a grid-container - again
Incrementing the class name prevents overlaping, but still can't have several "middle#" sections
Middle 3 Section
Content with the class "middle3", into a grid-container
Middle 3 Section bis
Content with the class "middle3", into a grid-container - overlap again
Middle 4 Section bis
Content with the class "middle4", into a grid-container
Unknown classes are displayed below left of the header in large width, and below 1200px in an additionnal "column" just right of the header (WTF?) between the header/middle/footer sections and the right section (which is still below the footer)
Right Section
Content with the class "right", into a grid-container
Is forgotten in the less than 1200px and 600px width CSS, so will go below and right of the footer... so not really usable
Without "left" and "right" grid areas[edit]
Some space is still reserved for the missing grid areas
A Grid without "left" and "right" grid areas
Content of a Section Template with the class "header", into a grid-container without "left" and "right" grid areas
Middle Section
Content with the class "middle", into a grid-container without "left" and "right" grid areas
Middle 2 Section
Content with the class "middle2", into a grid-container without "left" and "right" grid areas
Middle 3 Section
Content with the class "middle3", into a grid-container without "left" and "right" grid areas
Formatting[edit]
Start with a whitespace for code block
Transclusion[edit]
{{Turn off victory points}}
Add a leading colon to adress the Main namespace instead of the Templates:
{{:Turn off victory points}}
how to turn off victory points to extend game
Partial transclusion[edit]
-- From the Wikimedia documentation
The partial inclusion is defined from the transcluded page, not the transcluding one. Use the "noinclude", "includeonly" or "onlyinclude" (seriously ??) tags in the source page:
- "noinclude" -> visible in the source page, not transcluded in the target page
- "includeonly" -> invisible in the source page, transcluded in the target page
- "onlyinclude" -> visible on both pages (/!\ no matter the 2 other tags, especially "includeonly" will be ignored - also, this one is still wikified even into a "nowiki" tag)
Icons[edit]
"icon"[edit]
-> no effect in the syntax, nor the linked page
-> no effect (16x17 for civics for a 40x42 file / 16x22 for training for a 31x42 file)
-> size taken into account
"Icon/x"[edit]
{{icon/t | training}}
- links to the page "Resources"
- only for parameters listed under the letter, otherwise displays an error message
- 28px
{{icon | training}}
- links to the page "Training"
- whatever the parameter is - if the image doesn't exist (only jpg and png), then displays "No Icon Found"
- 16px
Other Templates[edit]
Infobox[edit]
Parameter 1 | "param1" parameter |
---|---|
Parameter 2 | "param2" parameter |
Parameter 3 | "param3" parameter |
Parameter 4 | "param4" parameter |
Parameter 5 | "param5" parameter |
An image can go between the title and the parameters table.
Need to be duplicated to customize the Parameter 1/2/3/4/5 names?
The style is quite plain too.
The infobox used on the "Old World" page assume to be using a template with the same name, but different parameters (name, section1, info1, info1value, with at least 8 info possible)
Ambox[edit]
"text" parameter with 'notice' as the type - default |
"text" parameter with 'speedy' as the type |
Only "Templates Information icon.png" exists in this wiki files for the different supported types:
- speedy = Ambox warning pn.png
- delete = Ambox warning pn.png
- content = Ambox content.png
- style = Edit-clear.png
- move = Ambox move.png
- protection = Ambox protection.png
- other = Ambox warning blue.png
- notice = Templates Information icon.png