Jump to content

Template:Feature: Difference between revisions

From postmarketOS Wiki
Exkc (talk | contribs)
No edit summary
Knuxify (talk | contribs)
add styling to "No data" fallback (todo: this should be in MediaWiki:Common.css, or we should add TemplateStyles and move those styles under the template)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- The argument should be a string of P/Y/N/- possibly followed
by a colon and a page link or section link for more info. Examples:
{{Feature|Y:See [[OnePlus 6#GPS]]}}
{{Feature|N:See [[HardPhone#Why nothing works]]}}
{{Feature|P:See [[#Issues with boot]]}}
-->
{{#switch:{{#sub:{{{1|}}}|0|1}}
{{#switch:{{#sub:{{{1|}}}|0|1}}
     |P=<div style="background: #e7fc05 !important;" class="feature feature-partial">{{#if:{{#sub:{{{1|}}}|2}}
     |P=<div class="feature feature-partial">Partial</div>  
        |<abbr title="{{#sub:{{{1|}}}|2}}"> Partial* </abbr>
     |Y=<div class="feature feature-yes">Works</div>  
        |Partial
     |N=<div class="feature feature-no">Broken</div>  
    }}</div>  
     |-=<div class="feature feature-unavailable">Unavailable</div>  
     |Y=<div style="background: #41c161 !important;"  class="feature feature-yes">{{#if:{{#sub:{{{1|}}}|2}}
     |=<div class="feature feature-no-data" style="font-style: italic; opacity: 0.6;">No data</div>
        |<abbr title="{{#sub:{{{1|}}}|2}}"> Works* </abbr>
        |Works
    }}</div>  
     |N=<div style="background: #e84a4a !important;"  class="feature feature-no">{{#if:{{#sub:{{{1|}}}|2}}
        | <abbr title="{{#sub:{{{1|}}}|2}}"> Broken*  </abbr>
        |Broken
    }}</div>  
     |-=<div style="background: #776f6f !important;"  class="feature feature-unavailable">{{#if:{{#sub:{{{1|}}}|2}}
        |<abbr title="{{#sub:{{{1|}}}|2}}"> Unavailable*  </abbr>
        |Unavailable
    }}</div>  
     | <div></div>
}}
}}

Latest revision as of 12:09, 8 March 2025

No data