Template:spec

Table of contents
No headers
/* parameters: */
/* $0 = link to specification */
/* $1 = link text (optional) */
/* $2 = status of specification (optional). Possible values: ED, WD, LC, CR, PR, REC. */

var status = $2;
var title = "";
var color = "";
var bgcolor = "";

switch(status) {
  case 'ED':
    let color = "#fff";
    let bgcolor = "#e61919";
    let title = "Editor's Draft (unofficial)";
    break;
  case 'WD':
    let color = "#fff";
    let bgcolor = "#e66e33";
    let title = "Working Draft";
    break;
  case 'LC':
    let color = "#333";
    let bgcolor = "#e2a669";
    let title = "Last Call";
    break;
  case 'CR':
    let color = "#333";
    let bgcolor = "#cfd510";
    let title = "Candidate Recommendation";
    break;
  case 'PR':
    let color = "#fff";
    let bgcolor = "#72ac35";
    let title = "Proposed Recommendation";
    break;
  case 'REC':
    let color = "#fff";
    let bgcolor = "#309c40";
    let title = "Recommendation";
    break;
}

web.link( $0, ($1 ?? $0) );

if ($2) {
   <span title=(title) style=('color:' .. color .. '; background-color:' .. bgcolor.. '; display: inline-block; font-size: x-small; margin-left: 6px; white-space: nowrap; padding: 2px 5px;')>(status)</span>
}

Tags (0)

Edit tags
  • No tags

Attachments (0)

 

Attach file