Template:Argbox: Difference between revisions
Jump to navigation
Jump to search
Experimental Argbox Style V2 |
|||
| Line 1: | Line 1: | ||
{| class="wikitable" style="float:{{{float|right}}}; clear:{{{clear|right}}}; | {| class="wikitable" style="float:{{{float|right}}}; clear:{{{clear|right}}};" width="22.5%" | ||
! | !colspan="2"|{{#set:argName={{FULLPAGENAME}}}}{{{name|{{PAGENAME}}}}} {{#set:argFloat={{{float|right}}}}} {{#set:argClear={{{clear|right}}}}} | ||
[[{{#if:{{{image}}}|{{#setmainimage:{{{image|Image:Example.png}}}}}|{{#setmainimage:Image:Example.png}}}}|{{{imagewidth|250}}}px]]<br/>{{#set:argImage={{{image|Image:Example.png}}}}} {{#set:argImageWidth={{{imagewidth|250}}}}} | |||
|- | |||
|style="font-size:10px; text-align:center; background-color:#eeeeee" colspan="2"|{{#if:{{{description|}}}|''{{#set:argDescription={{{description}}}|template=BySetTemplateSimpleValueOutput}}''}} | |||
|- | |||
{{!}}- style="background-color:#eeeeee" | |||
{{!}}- style="background-color:# | |||
{{#if:{{{creator|}}}| | {{#if:{{{creator|}}}| | ||
{{!}}Creator | |||
{{!}}style="text-align:center;"{{!}}{{#set:argCreator={{{creator}}}|template=BySetTemplateSimpleValueOutput}}}} {{#if:{{{creator2|}}}| & {{#set:argCreator2={{{creator2}}}|template=BySetTemplateSimpleValueOutput}}}} {{#if:{{{creator3|}}}| & {{#set:argCreator3={{{creator3}}}|template=BySetTemplateSimpleValueOutput}}}} | {{!}}style="text-align:center;"{{!}}{{#set:argCreator={{{creator}}}|template=BySetTemplateSimpleValueOutput}}}} {{#if:{{{creator2|}}}| & {{#set:argCreator2={{{creator2}}}|template=BySetTemplateSimpleValueOutput}}}} {{#if:{{{creator3|}}}| & {{#set:argCreator3={{{creator3}}}|template=BySetTemplateSimpleValueOutput}}}} | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
{{#if:{{{type|}}}| | {{#if:{{{type|}}}| | ||
{{!}}Type | {{!}}Type | ||
{{!}}style="text-align:center;"{{!}}[[List_of_Investigations#{{#set:argType={{{type}}}|template=BySetTemplateSimpleValueOutput}}|{{{type}}}]] | {{!}}style="text-align:center;"{{!}}[[List_of_Investigations#{{#set:argType={{{type}}}|template=BySetTemplateSimpleValueOutput}}|{{{type}}}]] | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
}} | |||
{{#if:{{{status|}}}| | |||
{{!}}Status | |||
{{!}}{{#switch:{{{status}}}|Completed=style="text-align:center; background-color: #aaffaa"|Active=style="text-align:center; background-color: #5ac3ec"|Discontinued=style="text-align:center; background-color: #fb5757"|On Hold=style="text-align:center; background-color: #F37338"|style="text-align:center;"}}{{!}}{{#set:argStatus={{{status}}}|template=BySetTemplateSimpleValueOutput}} | |||
{{!}}- style="background-color:#eeeeee" | |||
}} | }} | ||
{{#if:{{{discovered|}}}| | {{#if:{{{discovered|}}}| | ||
{{!}}Discovered | {{!}}Discovered | ||
{{!}}style="text-align:center;"{{!}}{{#set:argDiscoverDate={{{discovered}}}|template=BySetTemplateSimpleValueOutput}} | {{!}}style="text-align:center;"{{!}}{{#set:argDiscoverDate={{{discovered}}}|template=BySetTemplateSimpleValueOutput}} | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
}} | }} | ||
{{#if:{{{completed|}}}| | {{#if:{{{completed|}}}| | ||
{{!}}Completed | {{!}}Completed | ||
{{!}}style="text-align:center;"{{!}}{{#set:argCompleteDate={{{completed}}}|template=BySetTemplateSimpleValueOutput}} | {{!}}style="text-align:center;"{{!}}{{#set:argCompleteDate={{{completed}}}|template=BySetTemplateSimpleValueOutput}} | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
}} | }} | ||
{{#if:{{{closed|}}}| | {{#if:{{{closed|}}}| | ||
{{!}}Closed | {{!}}Closed | ||
{{!}}style="text-align:center;"{{!}}{{#set:argCloseDate={{{closed}}}|template=BySetTemplateSimpleValueOutput}} | {{!}}style="text-align:center;"{{!}}{{#set:argCloseDate={{{closed}}}|template=BySetTemplateSimpleValueOutput}} | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
}} | }} | ||
{{#if:{{{reopened|}}}| | {{#if:{{{reopened|}}}| | ||
{{!}}Reopened | {{!}}Reopened | ||
{{!}}style="text-align:center;"{{!}}{{#set:argReopenDate={{{reopened}}}|template=BySetTemplateSimpleValueOutput}} | {{!}}style="text-align:center;"{{!}}{{#set:argReopenDate={{{reopened}}}|template=BySetTemplateSimpleValueOutput}} | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
}} | }} | ||
{{#if:{{{timeline|}}}| | {{#if:{{{timeline|}}}| | ||
{{!}}Timeline | {{!}}Timeline | ||
{{!}}style="text-align:center;"{{!}}{{#set:argTimeline={{{timeline}}}|template=BySetTemplateSimpleValueOutput}} | {{!}}style="text-align:center;"{{!}}{{#set:argTimeline={{{timeline}}}|template=BySetTemplateSimpleValueOutput}} | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
}} | }} | ||
{{#ifeq:{{{halloffame|}}}|true| | {{#ifeq:{{{halloffame|}}}|true| | ||
{{!}}Hall of Fame | {{!}}Hall of Fame | ||
{{!}}style="text-align:center;"{{!}}[[{{ROOTPAGENAME}}/Hall of Fame|Hall of Fame]] {{#set:argHallOfFame={{{halloffame|false}}}}} | {{!}}style="text-align:center;"{{!}}[[{{ROOTPAGENAME}}/Hall of Fame|Hall of Fame]] {{#set:argHallOfFame={{{halloffame|false}}}}} | ||
{{!}}- style="background-color:# | {{!}}- style="background-color:#eeeeee" | ||
}} | }} | ||
|} | |} | ||
Revision as of 18:38, 4 July 2018
| {{#set:argName=Template:Argbox}}Argbox {{#set:argFloat=right}} {{#set:argClear=right}}
| |
|---|---|
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
- Description
This is the {{argbox}} or ARG Info Box meta-template. This template is used to create an arg infobox on a given page, as well as assign the page to a category determined by the root page name.
- Syntax
Type {{argbox}} somewhere, with parameters as shown below.
- Sample output
{{argbox
| float = left
| name = Valve ARG
| image = File:NewExample3.png
| imagewidth = 400
| description = This it the description of an arg, I somehow forgot about it
| creator = [[Valve]]
| creator2 = [[Valve]]
| type = Official
| status = Active
| discovered = 1970-01-31
| completed = 1971-01-31
| closed = 1971-01-31
| reopened = 1972-01-31
| timeline = [[Valve]]
}}
Results in...
| {{#set:argName=Template:Argbox}}Valve ARG {{#set:argFloat=left}} {{#set:argClear=right}}
| |
|---|---|
| {{#set:argDescription=This it the description of an arg, I somehow forgot about it|template=BySetTemplateSimpleValueOutput}} | |
| Creator | {{#set:argCreator=Valve|template=BySetTemplateSimpleValueOutput}} & {{#set:argCreator2=Valve|template=BySetTemplateSimpleValueOutput}} |
| Type | [[List_of_Investigations#{{#set:argType=OfficialExample|template=BySetTemplateSimpleValueOutput}}|OfficialExample]] |
| Status | {{#set:argStatus=Active|template=BySetTemplateSimpleValueOutput}} |
| Discovered | {{#set:argDiscoverDate=1970-01-31|template=BySetTemplateSimpleValueOutput}} |
| Completed | {{#set:argCompleteDate=1971-01-31|template=BySetTemplateSimpleValueOutput}} |
| Closed | {{#set:argCloseDate=1971-01-31|template=BySetTemplateSimpleValueOutput}} |
| Reopened | {{#set:argReopenDate=1972-01-31|template=BySetTemplateSimpleValueOutput}} |
| Timeline | {{#set:argTimeline=Valve|template=BySetTemplateSimpleValueOutput}} |
- Parameters
| Parameter | Description | Default | Accepted Values | Type | Status |
|---|---|---|---|---|---|
| float | box is aligned to the the left or the right. | right
|
left or right
|
String | Optional |
| clear | content is delayed until just the right or left column is complete. | right
|
left or right
|
String | Optional |
| name | The name of the ARG infobox | Title of the current page | String | Optional | |
| image | The thumb of the ARG infobox | Image:Example.png
|
any valid link from local source or external | String | Optional |
| imagewidth | Width of the thumb image of the ARG info box. Also controls the width of the argbox itself. | 400
|
any valid integer | Int | Optional |
| description | Short description of the ARG | String | Optional | ||
| creator | A creator of the ARG | String | Optional | ||
| creator2 | A second creator of the ARG | String | Optional | ||
| creator3 | A third creator of the ARG | String | Optional | ||
| type | The type of the ARG | Official, Unofficial, Investigation
|
String | Optional | |
| status | Status of the ARG | Active, On Hold, Completed or Discontinued
|
String | Optional | |
| discovered | Date of the ARG discovery, YYYY-MM-DD | Date | Optional | ||
| completed | Date of the ARG completion, YYYY-MM-DD | Date | Optional | ||
| closed | Date of the ARG closing, YYYY-MM-DD | Date | Optional | ||
| reopened | Date of the ARG reopening, YYYY-MM-DD | Date | Optional | ||
| timeline | Wikilink to the timeline article of the ARG | String | Optional | ||
| halloffame | Whether to render a link to a Hall of Fame | true or emtpy
|
Boolean | Optional | |
| popupContent | Manual override for given arg's investigation list dialog popup | Any string including parsable wikitext (no HTML) | String | Optional |
