Difference between revisions of "Template:Archive"

From Wikitech-static
Jump to navigation Jump to search
imported>BryanDavis
m (9 revisions imported from mw:Template:Archive)
imported>Krinkle
(Implement note parameter. Add docs for note and reason parameters)
Line 1: Line 1:
{{Warn
{{Warn
|content='''This page contains historical information'''. {{{reason|It is probably no longer true.}}}{{#if:{{{date|}}}
|content='''This page contains historical information'''. {{{reason|It is probably no longer true.}}}{{#if:{{{note|}}}|<hr>{{{note}}}}}{{#if:{{{date|}}}
|<i style="display: inline-block; vertical-align: middle; padding: .5em 0; font-size: 2em;">&nbsp;</i><span style="display: inline-block; float: right; margin: /*negate mbox-text padding */-0.125em -0.45em; padding: .5em 2em; font-weight: bold; font-size: 2em; text-align: center; line-height: 2; letter-spacing: -1px; background-color: #111; background-image: linear-gradient(to right, /*rainbow*/ rgba(255, 0, 0, 0.3), rgba(255, 255, 0, 0.3), rgba(0, 255, 0, 0.3), rgba(0, 255, 255, 0.3), rgba(0, 0, 255, 0.3), rgba(255, 0, 255, 0.3), rgba(255, 0, 0, 0.3)); color: #fff; text-shadow: 0 0 20px deepskyblue, 0 0 20px deepskyblue, 0 0 20px deepskyblue, 0 0 30px deepskyblue, 0 0 45px deepskyblue, 0 0 50px deepskyblue, 0 0 55px deepskyblue, 0 0 60px deepskyblue, 0 0 70px deepskyblue;" title="This page was last updated around {{{date}}}. {{#invoke:Archive-timeline|get_line|{{{date}}}}}">{{{date}}}</span>
|<i style="display: inline-block; vertical-align: middle; padding: .5em 0; font-size: 2em;">&nbsp;</i><span style="display: inline-block; float: right; margin: /*negate mbox-text padding */-0.125em -0.45em; padding: .5em 2em; font-weight: bold; font-size: 2em; text-align: center; line-height: 2; letter-spacing: -1px; background-color: #111; background-image: linear-gradient(to right, /*rainbow*/ rgba(255, 0, 0, 0.3), rgba(255, 255, 0, 0.3), rgba(0, 255, 0, 0.3), rgba(0, 255, 255, 0.3), rgba(0, 0, 255, 0.3), rgba(255, 0, 255, 0.3), rgba(255, 0, 0, 0.3)); color: #fff; text-shadow: 0 0 20px deepskyblue, 0 0 20px deepskyblue, 0 0 20px deepskyblue, 0 0 30px deepskyblue, 0 0 45px deepskyblue, 0 0 50px deepskyblue, 0 0 55px deepskyblue, 0 0 60px deepskyblue, 0 0 70px deepskyblue;" title="This page was last updated around {{{date}}}. {{#invoke:Archive-timeline|get_line|{{{date}}}}}">{{{date}}}</span>
}}
}}
Line 20: Line 20:
"type": "string",
"type": "string",
"description": "Optional parameter with a rough date indication for the reader's context (e.g. July 2012, 2010, 1980s, etc.)"
"description": "Optional parameter with a rough date indication for the reader's context (e.g. July 2012, 2010, 1980s, etc.)"
},
"reason": {
"label": "Reason",
"description": "Optional reason why it is archived (default: Historical)",
"type": "string"
},
"note": {
"label": "Note",
"description": "Extra content to display on the second line",
"type": "content"
}
}
}
},
"paramOrder": [
"reason",
"note",
"date"
],
"format": "inline"
}
}
</templatedata>
</templatedata>

Revision as of 03:21, 11 November 2020

Usage

This template categorizes the host page in Category:Archive.
{{Archive}}
{{Archive|date=1950s}}

Parameters

<templatedata> { "params": { "date": { "label": "Date", "type": "string", "description": "Optional parameter with a rough date indication for the reader's context (e.g. July 2012, 2010, 1980s, etc.)" }, "reason": { "label": "Reason", "description": "Optional reason why it is archived (default: Historical)", "type": "string" }, "note": { "label": "Note", "description": "Extra content to display on the second line", "type": "content" } }, "paramOrder": [ "reason", "note", "date" ], "format": "inline" } </templatedata>

See also