Template:Infobox service: Difference between revisions
Template page
More actions
Create an infobox for services provided by Neodyland |
Use an Extension-style layout with service-specific fields |
||
| Line 1: | Line 1: | ||
<templatestyles src="Template:Infobox service/styles.css" /> | |||
{{Infobox | {{Infobox | ||
| | | bodyclass = infobox-service infobox-service-status-{{#switch:{{lc:{{{status|unknown}}}}} | ||
| | | planned = planned | ||
| | | experimental = experimental | ||
| alpha = alpha | |||
| beta = beta | |||
| stable = stable | |||
| maintenance = maintenance | |||
| unstable = unstable | |||
| deprecated = deprecated | |||
| unmaintained = unmaintained | |||
| discontinued = discontinued | |||
| unknown = unknown | |||
| #default = unknown | |||
}} | |||
| bodystyle = width:280px; | |||
| title = '''[[Template:Infobox service|Neodyland services]]''' | |||
| titleclass = infobox-service-caption | |||
| above = <div class="infobox-service-header__inner">{{#if:{{{logo|}}}|<span class="infobox-service-header__logo">[[File:{{{logo}}}|{{{logo_size|40px}}}|alt={{{logo_alt|{{{name|{{PAGENAME}}}}} logo}}}]]</span>}}<span class="infobox-service-header__copy"><span class="infobox-service-header__name">{{{name|{{PAGENAME}}}}}</span><span class="infobox-service-header__status">[[Template:Infobox Release status|Release status:]] {{Infobox Release status|{{{status|unknown}}}}}</span></span></div> | |||
| aboveclass = infobox-header infobox-service-header notheme | |||
| subheader = {{{tagline|}}} | | subheader = {{{tagline|}}} | ||
| subheaderclass = infobox-service-tagline | |||
| | | label1 = [[Template:Infobox service#Parameters|Service type]] | ||
| data1 = {{{type|}}} | |||
| data1 = {{ | |||
| | | label2 = [[Template:Infobox service#Parameters|Description]] | ||
| data2 = {{{description|}}} | |||
| | | label3 = [[Template:Infobox service#Parameters|Provided by]] | ||
| | | data3 = {{{provider|Neodyland}}} | ||
| | | label4 = [[Template:Infobox service#Parameters|Developer(s)]] | ||
| | | data4 = {{{developer|}}} | ||
| | | label5 = [[Template:Infobox service#Parameters|Maintainer(s)]] | ||
| | | data5 = {{{maintainer|}}} | ||
| | | label6 = [[Template:Infobox service#Parameters|Initial release]] | ||
| | | data6 = {{{released|}}} | ||
| | | label7 = [[Template:Infobox service#Parameters|Latest version]] | ||
| | | data7 = {{#if:{{{version|}}} | ||
| {{{version}}}{{#if:{{{updated|}}}| | | {{{version}}}{{#if:{{{updated|}}}| ({{{updated}}})}} | ||
}} | }} | ||
| | | label8 = [[Template:Infobox service#Parameters|Platform]] | ||
| data8 = {{{platform|}}} | |||
| | |||
| | |||
| | | label9 = [[Template:Infobox service#Parameters|Availability]] | ||
| | | data9 = {{{availability|}}} | ||
| | | label10 = [[Template:Infobox service#Parameters|Languages]] | ||
| | | data10 = {{{languages|}}} | ||
| | | label11 = [[Template:Infobox service#Parameters|Access]] | ||
| | | data11 = {{{access|}}} | ||
| | | label12 = [[Template:Infobox service#Parameters|Licence]] | ||
| | | data12 = {{{license|}}} | ||
| | | label13 = [[Template:Infobox service#Parameters|Website]] | ||
| data13 = {{{website|}}} | |||
| | | label14 = [[Template:Infobox service#Parameters|Service status]] | ||
| | | data14 = {{{status_page|}}} | ||
| | | label15 = [[Template:Infobox service#Parameters|Documentation]] | ||
| | | data15 = {{{documentation|}}} | ||
| | | label16 = [[Template:Infobox service#Parameters|Source code]] | ||
| | | data16 = {{{source|}}} | ||
| | | label17 = [[Template:Infobox service#Parameters|Support]] | ||
| data17 = {{{support|}}} | |||
| | |||
}} | }} | ||
{{#if:{{{nocat|}}}||{{#ifeq:{{NAMESPACE}}|Template|| | {{#if:{{{nocat|}}}||{{#ifeq:{{NAMESPACE}}|Template|| | ||
| Line 100: | Line 104: | ||
| logo_size = | | logo_size = | ||
| logo_alt = | | logo_alt = | ||
| status = | | status = | ||
| type = | | type = | ||
| Line 124: | Line 127: | ||
The <code>status</code> parameter accepts the values documented at {{tl|Infobox Release status}}. Article transclusions are automatically placed in [[:Category:Neodyland services]] and the corresponding release-status category. Set <code>nocat=1</code> in examples and test transclusions. | The <code>status</code> parameter accepts the values documented at {{tl|Infobox Release status}}. Article transclusions are automatically placed in [[:Category:Neodyland services]] and the corresponding release-status category. Set <code>nocat=1</code> in examples and test transclusions. | ||
== Parameters == | |||
All fields except <code>status</code> are optional. The infobox displays only rows whose values are provided. The parameters describe service ownership, lifecycle, availability, implementation platform, and relevant operational links; they do not expose MediaWiki-extension-specific fields such as hooks or PHP requirements. | |||
== Example == | == Example == | ||
| Line 166: | Line 172: | ||
"label": "Logo size", | "label": "Logo size", | ||
"type": "string", | "type": "string", | ||
"default": " | "default": "40px" | ||
}, | }, | ||
"logo_alt": { | "logo_alt": { | ||
"label": "Logo alternative text", | "label": "Logo alternative text", | ||
"type": "string" | "type": "string" | ||
}, | }, | ||