Template:DevDerbyPromoHeader

  • Revision slug: Template:DevDerbyPromoHeader
  • Revision title: Template:DevDerbyPromoHeader
  • Revision id: 76939
  • Created:
  • Creator: jswisher
  • Is current revision? No
  • Comment 3 words added, 58 words removed

Revision Content

var u = uri.parts(Page.uri);
var lang = string.tolower(u.path[0]);
if (string.contains(lang, "project") || string.contains(lang, "Project")) {
  lang = string.substr(lang, 8);
}
/* fall back to page.language on a user page */
else if (string.StartsWith(lang, "user:")) {
 lang = page.language;
}

var sentence1 = "";
var sentence2 = "After reading about it, head over the Dev Derby and show the world what you can do.";

switch(lang) {
  default:
    sentence1 = "Interested in " + $0 + "?" ;
    break;
}

(sentence1)

(sentence2)

Revision Source

<pre class="script">
var u = uri.parts(Page.uri);
var lang = string.tolower(u.path[0]);
if (string.contains(lang, "project") || string.contains(lang, "Project")) {
  lang = string.substr(lang, 8);
}
/* fall back to page.language on a user page */
else if (string.StartsWith(lang, "user:")) {
 lang = page.language;
}

var sentence1 = "";
var sentence2 = "After reading about it, head over the Dev Derby and show the world what you can do.";

switch(lang) {
  default:
    sentence1 = "Interested in " + $0 + "?" ;
    break;
}
<div class="DevDerbyPromoHeaderTemplate" style="border:solid 1px maroon; overflow:hidden; margin: 10px 0px; padding: 0px 10px; background-color: rgb(255, 225, 190); font-weight: bold; text-align: center;"><p style="margin: 4px 0px;">(sentence1)</p> <p style="margin: 4px 0px;">(sentence2)</p></div>
</pre>
Revert to this revision