Template:spec

  • Revision slug: Template:spec
  • Revision title: Template:spec
  • Revision id: 298171
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

<% /* parameters: */ /* $0 = link to specification */ /* $1 = link text (optional) */ /* $2 = status of specification (optional). Possible values: ED, WD, LC, CR, PR, REC. */ var lang = env.locale; var status = ($2).toUpperCase(); var title = ""; var color = ""; var bgcolor = ""; switch(status) { case 'ED': color = "#fff"; bgcolor = "#e61919"; title = "Editor's Draft (unofficial)"; break; case 'WD': color = "#fff"; bgcolor = "#e66e33"; title = "Working Draft"; break; case 'LC': color = "#333"; bgcolor = "#e2a669"; title = "Last Call"; break; case 'CR': color = "#333"; bgcolor = "#cfd510"; title = "Candidate Recommendation"; break; case 'PR': color = "#fff"; bgcolor = "#72ac35"; title = "Proposed Recommendation"; break; case 'REC': color = "#fff"; bgcolor = "#309c40"; title = "Recommendation"; break; } if(lang == "zh-cn"){ switch(status) { case 'ED': title = "编辑草案(非官方)"; break; case 'WD': title = "工作草案"; break; case 'LC': title = "Last Call"; break; case 'CR': title = "候选标准"; break; case 'PR': title = "推荐标准"; break; case 'REC': title = "正式标准"; break; } } if(lang == "ja") { switch(status) { case 'ED': title = "草案(非公式)"; break; case 'WD': title = "草案"; break; case 'LC': title = "最終草案"; break; case 'CR': title = "勧告候補"; break; case 'PR': title = "勧告案"; break; case 'REC': title = "W3C 勧告"; break; } }%><%- web.link( $0, ($1 || $0) ) %> <% if ($2) { %> <%- status %> <% } %>

Revision Source

<%
/* parameters: */
/* $0 = link to specification */
/* $1 = link text (optional) */
/* $2 = status of specification (optional). Possible values: ED, WD, LC, CR, PR, REC. */
var lang = env.locale;

var status = ($2).toUpperCase();
var title = "";
var color = "";
var bgcolor = "";

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


if(lang == "zh-cn"){
    switch(status) {
        case 'ED':
            title = "编辑草案(非官方)"; break;
        case 'WD':
            title = "工作草案"; break;
        case 'LC':
            title = "Last Call"; break;
        case 'CR':
            title = "候选标准"; break;
        case 'PR':
            title = "推荐标准"; break;
        case 'REC':
            title = "正式标准"; break;
    }
}

if(lang == "ja") {
    switch(status) {
        case 'ED':
            title = "草案(非公式)"; break;
        case 'WD':
            title = "草案"; break;
        case 'LC':
            title = "最終草案"; break;
        case 'CR':
            title = "勧告候補"; break;
        case 'PR':
            title = "勧告案"; break;
        case 'REC':
            title = "W3C 勧告"; 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>
<% } %>
Revert to this revision