Template:Version: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
< | <noinclude>{{Version|l|show=111111}} {{Documentation}}</noinclude><includeonly><!-- | ||
| | --><templatestyles src="Version/styles.css" /><!-- | ||
| | +++ Validate params | ||
| | + Check if type parameter exists: | ||
| | -->{{#if: {{{1|}}} || <span style="font-size: 1.2em; color: var(--color-error, #bf3c2c); font-weight: bold;">[[Template:Version|Error]]: Type parameter not found</span> }}<!-- | ||
| | + Check if version parameter exists: | ||
-->{{#if: {{{1|}}} | {{#ifeq: {{{1|}}} | l || {{#ifeq: {{{1|}}} | lv || {{#ifeq: {{{1|}}} | t || {{#ifeq: {{{1|}}} | tv || {{#if: {{{2|}}} || <span style="font-size: 1.2em; color: red; font-weight: bold;">[[Template:Version|Error]]: Version parameter not found</span> }}}}}}}}}}|}}<!-- | |||
| | +++ Template | ||
-->{{#switch: {{{1}}}<!-- | |||
+ Horizontal legend | |||
| | -->| l = <div class="templateVersion l {{#ifeq: {{{orientation|}}} | vertical | version-legend-vertical | version-legend }}" style="{{{style|}}}"><!-- | ||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|5}} || display: none;}}"><span style="white-space: nowrap;">'''Legend:'''</span></div><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|4}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-unsupported"></span>{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | Old version, not maintained | Old version}}</div><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-maintained"></span>Old version, still maintained</div><!-- | |||
| | --><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|2}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-latest"></span>'''Latest version'''</div><!-- | ||
}}</ | --><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|1}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-preview"></span>Latest preview version</div><!-- | ||
{{ | --><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|0}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-future"></span>Future version</div><!-- | ||
--></div><!-- | |||
== | + Vertical legend | ||
-->| lv = <div class="templateVersion lv version-legend-vertical" style="{{{style|}}}"><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|5}} || display: none;}}"><span style="white-space: nowrap;">'''Legend:'''</span></div><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|4}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-unsupported"></span>{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | Old version, not maintained | Old version}}</div><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-maintained"></span>Old version, still maintained</div><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|2}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-latest"></span>'''Latest version'''</div><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|1}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-preview"></span>Latest preview version</div><!-- | |||
--><div style="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|0}} | display: flex; | display: none;}}" class="legend-item"><span class="swatch swatch-future"></span>Future version</div><!-- | |||
--></div><!--+ Horizontal legend, displayed as table --> | |||
| t = {{(!}} class="templateVersion t wikitable " style="text-align: center; {{{style|}}}" | |||
! style="text-align: left;" {{!}} Legend: | |||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|4}} || display: none;}}" class="swatch-unsupported" title="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | Old version, not maintained | Old version}}"{{!}} {{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | Old version, not maintained | Old version}} | |||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|3}} || display: none;}}" class="swatch-maintained" title="Old version, still maintained"{{!}} Old version, still maintained | |||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|2}} || display: none;}}" class="swatch-latest" title="Latest version"{{!}} '''Latest version''' | |||
= | {{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|1}} || display: none;}}" class="swatch-preview" title="Latest preview version"{{!}} Latest preview version | ||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|0}} || display: none;}}" class="swatch-future" title="Future version"{{!}} Future version | |||
< | {{!)}}<!-- | ||
+ Vertical legend, displayed as table | |||
-->| tv = {{(!}} class="templateVersion tv wikitable" style="text-align: left; {{{style|}}}" | |||
{{!}} Legend: | |||
{{!-}} | |||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|4}} || display: none;}}" class="swatch-unsupported" title="{{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | Old version, not maintained | Old version}}"{{!}} {{#ifexpr: {{Template:Cipher|{{{show|111111}}}|3}} | Old version, not maintained | Old version}} | |||
< | {{!-}} | ||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|3}} || display: none;}}" class="swatch-maintained" title="Old version, still maintained"{{!}} Old version, still maintained | |||
== | {{!-}} | ||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|2}} || display: none;}}" class="swatch-latest" title="Latest version"{{!}} '''Latest version''' | |||
{{!-}} | |||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|1}} || display: none;}}" class="swatch-preview" title="Latest preview version"{{!}} Latest preview version | |||
{{!-}} | |||
{{!}} style="color: var(--color-base, #202122); {{#ifexpr: {{Template:Cipher|{{{show|11111}}}|0}} || display: none;}}" class="swatch-future" title="Future version"{{!}} Future version | |||
{{!)}}<!-- | |||
+ Old version ("old version" >> o) | |||
-->| o = class="templateVersion co swatch-unsupported" {{#if: {{{2|}}} | style="color: var(--color-base, #202122); {{{style|}}}" title="Old version, not maintained" data-sort-value="{{{sortKey|{{{2|}}}}}}" {{!}} <span style="display: none;">Old version, not maintained:</span> {{{2|}}} |}}<!-- | |||
+ Current stable version of an old branch ("current old version" >> co) | |||
-->| co = class="templateVersion co swatch-maintained" {{#if: {{{2|}}} | style="color: var(--color-base, #202122); {{{style|}}}" title="Old version, still maintained" data-sort-value="{{{sortKey|{{{2|}}}}}}" {{!}} <span style="display: none;">Old version, still maintained:</span> {{{2|}}} |}}<!-- | |||
+ Latest version ("latest version" >> c) | |||
-->| c = class="templateVersion c swatch-latest" {{#if: {{{2|}}} | style="color: var(--color-base, #202122); {{{style|}}}" title="Latest version" data-sort-value="{{{sortKey|{{{2|}}}}}}" {{!}} <span style="display: none;">Latest version:</span> '''{{{2|}}}''' |}} <!-- | |||
+ Latest preview version ("current preliminary version" >> cp) | |||
-->| cp = class="templateVersion cp swatch-preview" {{#if: {{{2|}}} | style="color: var(--color-base, #202122); {{{style|}}}" title="Latest preview version" data-sort-value="{{{sortKey|{{{2|}}}}}}" {{!}} <span style="display: none;">Latest preview version:</span> {{{2|}}} |}} <!-- | |||
+ Future version ("prospective version" >> p) | |||
-->| p = class="templateVersion p swatch-future" {{#if: {{{2|}}} | style="color: var(--color-base, #202122); {{{style|}}}" title="Future version" data-sort-value="{{{sortKey|{{{2|}}}}}}" {{!}} <span style="display: none;">Future version:</span> {{{2|}}} |}}<!-- | |||
+ Unknown type parameter | |||
-->| #default = {{#if: {{{1|}}} | <span style="font-size: 1.2em; color: red; font-weight: bold;">[[Template:Version|Error]]:Unknown type parameter</span> |}}<!-- | |||
-->}}</includeonly> | |||
[[Category:Legend templates]] | |||
[[Category:Number templates]] | [[Category:Number templates]] | ||
[[Category:Pages using the JsonConfig extension]] | [[Category:Pages using the JsonConfig extension]] | ||
[[Category:Pages with TemplateStyles errors]] | [[Category:Pages with TemplateStyles errors]] |
Revision as of 17:19, 23 March 2025
Page Version/styles.css has no content.
Legend:
Old version, not maintained
Old version, still maintained
Latest version
Latest preview version
Future version