MediaWiki:Common.css: Difference between revisions

From Red Faction Wiki
(New page: →‎CSS placed here will be applied to all skins: // ============================================================ // BEGIN collapsible tables // This script is from Wikipedia. For author ...)
 
No edit summary
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* **************************************************************** */
// ============================================================
/* CSS for navboxes. */
// BEGIN collapsible tables
/* Used in Template:Navbox, for example. */
// This script is from Wikipedia. For author attribution, please see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history
/* **************************************************************** */
// ============================================================


/* Test if an element has a certain class **************************************
table.fallout_navbox_box {
*
  padding: 0px;
* Description: Uses regular expressions and caching for better performance.
  border: 1px solid #aaa;
* Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]]
  text-align: center;
*/
  border-collapse: separate;
  font-size: 100%;
}


var hasClass = (function () {
table.nb_bottom + table.nb_bottom {
    var reCache = {};
  border-top-style: none;
    return function (element, className) {
  border-top-style: hidden;
        return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
}
    };
})();


/** Collapsible tables *********************************************************
th.fallout_navbox_innertable_title,
*
th.fallout_navbox_box_title {
*  Description: Allows tables to be collapsed, showing only the header. See
  padding: 2px;
*              [[Wikipedia:NavFrame]].
  font-weight: normal;
*  Maintainers: [[User:R. Koot]]
  color:white;
*/
  font-size: 80%;
/* customized for Fallout wiki */
}


var autoCollapse = 2;
th.fallout_navbox_box_title {
var collapseCaption = "hide";
  background: url(http://img246.imageshack.us/img246/3619/rfgscanlines.jpg);
var expandCaption = "show";
  background-color: #000000;
  border: 3px solid white;
}


function collapseTable( tableIndex )
th.fallout_navbox_innertable_title {
{
  background: url;
    var Button = document.getElementById( "collapseButton" + tableIndex );
  background-color: #aa0000;
    var Table = document.getElementById( "collapsibleTable" + tableIndex );
  border-top: 0;
  border-bottom: 2px solid white;
  border-left: 3px solid white;
  border-right: 3px solid white;
}


    if ( !Table || !Button ) {
th.fallout_navbox_box_title span.fallout_navbox_maintitle {
        return false;
  font-weight: bold;
    }
  font-size: 115%;
}


    var Rows = Table.rows;
th.fallout_navbox_innertable_title span.fallout_navbox_maintitle {
  font-weight: bold;
  font-size: 125%;
}


    if ( Button.firstChild.data == collapseCaption ) {
td.fallout_navbox_cont {
        for ( var i = 1; i < Rows.length; i++ ) {
  padding: 0px;
            Rows[i].style.display = "none";
  border: 0px;
        }
        Button.firstChild.data = expandCaption;
    } else {
        for ( var i = 1; i < Rows.length; i++ ) {
            Rows[i].style.display = Rows[0].style.display;
        }
        Button.firstChild.data = collapseCaption;
    }
}
}


function createCollapseButtons()
table.fallout_navbox_innertable,
{
table.fallout_navbox {
    var tableIndex = 0;
  margin: 0px;  
    var collapseIndex = 0;
  padding: 0px;
    var NavigationBoxes = new Object();
  border-collapse:separate;
    var Tables = document.getElementsByTagName( "table" );
  empty-cells:show;
}


    for ( var i = 0; i < Tables.length; i++ ) {
table.fallout_navbox {
        if ( hasClass( Tables[i], "collapsible" ) ) {
  font-size: 85%;
  border-bottom: 1px solid white;
}


            /* only add button and increment count if there is a header row to work with */
table.fallout_navbox_innertable {
            var HeaderRow = Tables[i].getElementsByTagName( "tr" )[0];
  font-size: 100%;
            if (!HeaderRow) continue;
}
            var Header = HeaderRow.getElementsByTagName( "th" )[0];
            if (!Header) continue;


            NavigationBoxes[ tableIndex ] = Tables[i];
td.fallout_navbox_header, td.fallout_navbox_footer,
            Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );
td.fallout_navbox_cell, td.fallout_navbox_groupcell,
td.fallout_navbox_group, td.fallout_navbox_subgroup {
  border-top: 0;
  border-bottom: 2px solid white;
  border-left: 3px solid white;
}


            var Button    = document.createElement( "span" );
td.fallout_navbox_header, td.fallout_navbox_footer,
            var ButtonLink = document.createElement( "a" );
td.fallout_navbox_cell, td.fallout_navbox_groupcell {
            var ButtonText = document.createTextNode( collapseCaption );
  border-right: 3px solid white;
}


            Button.style.styleFloat = "right";
td.fallout_navbox_header, td.fallout_navbox_footer {
            Button.style.cssFloat = "right";
  padding: 2px;
            Button.style.fontWeight = "normal";
  background: url(http://images3.wikia.nocookie.net/fallout/images//d/d3/ConcreteBackground.jpg?1);
            Button.style.textAlign = "right";
  background-color: #565B45;
            Button.style.width = "6em";
  color:white;
            Button.className = "t_show_hide";
  text-align: center;
}


            ButtonLink.style.color = Header.style.color;
td.fallout_navbox_header {
            ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );
  font-weight: bold;
            ButtonLink.setAttribute( "href", "javascript:collapseTable(" + tableIndex + ");" );
}
            ButtonLink.appendChild( ButtonText );


            Button.appendChild( document.createTextNode( "[" ) );
td.fallout_navbox_footer {
            Button.appendChild( ButtonLink );
  font-size: 90%;
            Button.appendChild( document.createTextNode( "]" ) );
}


            Header.insertBefore( Button, Header.childNodes[0] );
td.fallout_navbox_subgroup, td.fallout_navbox_group {
  padding: 2px;
  text-align: center;
  white-space: nowrap;
  border-right: 0;
  font-weight: bold;
}


            if ( !hasClass( Tables[i], "nocount" ) ) {
td.fallout_navbox_group {
collapseIndex++;
  background: url;
    }
  background-color: #bb0000;
            tableIndex++;
}
        }
    }


    for ( var i = 0;  i < tableIndex; i++ ) {
td.fallout_navbox_subgroup {
        if ( hasClass( NavigationBoxes[i], "collapsed" ) || ( collapseIndex >= autoCollapse && hasClass( NavigationBoxes[i], "autocollapse" ) ) ) {
  background-color: #DDDDDD;
            collapseTable( i );
        }
        else if ( hasClass( NavigationBoxes[i], "innercollapse" ) ) {
            var element = NavigationBoxes[i];
            while (element = element.parentNode) {
                if ( hasClass( element, "outercollapse" ) ) {
                    collapseTable ( i );
                    break;
                }
            }
        }
    }
}
}


addOnloadHook( createCollapseButtons );
td.fallout_navbox_groupcell, td.fallout_navbox_cell {
  padding: 2px;
  background-color: #DDDDDD;
}


// ============================================================
td.fallout_navbox_groupcell {
// END collapsible tables
  text-align: left;
// This script is from Wikipedia. For author attribution, please see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history
}
// ============================================================


td.fallout_navbox_cell {
  text-align: center;
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////
/* do not wrap links in content fields if nowraplinks is set */
table.fallout_navbox_nowraplinks td.fallout_navbox_cell a,
table.fallout_navbox_nowraplinks td.fallout_navbox_groupcell a {
  white-space:nowrap;
}


// ADVANCED AJAX AUTO-REFRESHING ARTICLES
/* header bar needs brighter links */
// Code courtesy of "pcj" of WoWWiki.
table.fallout_navbox_box th a:link {
  color: #AFA000;
}
table.fallout_navbox_box th a:active {
  color: #fff;
}
table.fallout_navbox_box th a:visited {
  color: #B6A700;
}
table.fallout_navbox_box th a:hover {
  color: #fff;
}
table.fallout_navbox_box th a.new {
  color: #f11 !important;
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////
/* headers and footer need brighter links */
td.fallout_navbox_header a:link,
td.fallout_navbox_footer a:link {
  color: #cfc000;
}
td.fallout_navbox_header a:active ,
td.fallout_navbox_footer a:active {
  color: #fff;
}
td.fallout_navbox_header a:visited ,
td.fallout_navbox_footer a:visited {
  color: #B6A700;
}
td.fallout_navbox_header a:hover ,
td.fallout_navbox_footer a:hover {
  color: #fff;
}
 
@media print {
  table.fallout_navbox_box {
      display: none;
  }
}


ajaxPages = new Array("Special:RecentChanges", "Special:Watchlist", "Special:Log");
/* end Navboxes */


function setCookie(c_name,value,expiredays) {
 
var exdate=new Date()
/***** CSS placed here will be applied to all skins on the entire site. *****/
exdate.setDate(exdate.getDate()+expiredays)
 
document.cookie=c_name+ "=" +escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
/* Mark redirects in Special:Allpages and Special:Watchlist */
.allpagesredirect {
  font-style: italic;
}
.allpagesredirect:after {
  color: #808080; content: " (redirect)"
}
.watchlistredir {
  font-style: italic;
}
}


function getCookie(c_name) {
/* Giving headers and TOC a little extra space */
if (document.cookie.length>0) {
h2 {
c_start=document.cookie.indexOf(c_name + "=")
  margin-top: 20px;
if (c_start!=-1) {
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end))
}
}
}
return ""
.toc {
  margin-top: 20px;
}
}


function getXmlHttpRequestObject() {
/* Infobox template style */
if (window.XMLHttpRequest) {
.infobox {
return new XMLHttpRequest(); //Not Internet Explorer
  border: 1px solid #aaaaaa;
} else if(window.ActiveXObject) {
  background-color: #f9f9f9;
return new ActiveXObject("Microsoft.XMLHTTP"); //Internet Explorer
  color: black;
} else {
  margin-bottom: 0.5em;
//fail silently
  margin-left: 1em;
  padding: 0.2em;
  float: right;
  clear: right;
}
.infobox td,
.infobox th {
  vertical-align: top;
}
.infobox caption {
  font-size: larger;
  margin-left: inherit;
}
}
.infobox.bordered {
  border-collapse: collapse;
}
}
getRCDataRO = getXmlHttpRequestObject();
.infobox.bordered td,
var cr = new RegExp("\r", "gm");
.infobox.bordered th {
var lf = new RegExp("\n", "gm");
  border: 1px solid #aaaaaa;
var endText = new RegExp('</div>[\t\s]*?<!-- end content -->[\t\s]*?<div class="visualClear">', "mi");
var rcTimer;
var rcRefresh = 60000;
function preloadAJAXRC() {
if (skin == "monaco") {
s = 1;
} else {
s = 0;
}
}
ajaxRCCookie = (getCookie("ajaxload-"+wgPageName)=="on") ? true:false;
.infobox.bordered .borderless td,
document.getElementsByTagName("h1")[0].innerHTML += ' <span style="font-size: xx-small; border-bottom: 1px dotted; cursor:help;" title="Enable auto-refreshing page loads">AJAX:</span><input type="checkbox" id="ajaxRCtoggle" onClick="toggleRC();">';
.infobox.bordered .borderless th {
document.getElementById("ajaxRCtoggle").checked = ajaxRCCookie;
  border: 0;
if (getCookie("ajaxload-"+wgPageName)=="on") loadRCData();
}
}


function toggleRC() {
/* Forum formatting (by -Algorithm & -Splaka) */
if (document.getElementById("ajaxRCtoggle").checked == true) {
.forumheader {
setCookie("ajaxload-"+wgPageName, "on", 30);
  border: 1px solid #aaa;
loadRCData();
  margin-top: 1em;
} else {
  padding: 12px;
setCookie("ajaxload-"+wgPageName, "off", 30);
}
clearTimeout(rcTimer);
.forumlist td.forum_edited a {
  color: black;
  text-decoration: none;
}
}
.forumlist td.forum_title a {
  padding-left: 20px;
}
.forumlist td.forum_title a.forum_new {
  font-weight: bold;
  background: url(/images/4/4e/Forum_new.gif) center left no-repeat;
  padding-left: 20px;
}
.forumlist td.forum_title a.forum_new:visited {
  font-weight: normal;
  background: none;
  padding-left: 20px;
}
.forumlist th.forum_title {
  padding-left: 20px;
}
}


function loadRCData() {
/* Recent changes byte indicators */
if (getRCDataRO.readyState == 4 || getRCDataRO.readyState == 0) {
.mw-plusminus-pos {
if (location.href.indexOf("/wiki/")) {
  color: #006500;
rcURL = "http://" + location.hostname + "/wiki/" + wgPageName + location.search;
} else {
rcURL = "http://" + location.hostname + "/" + wgPageName + location.search;
}
}
getRCDataRO.open("GET", rcURL, true);
.mw-plusminus-neg {
getRCDataRO.onreadystatechange = parseRCdata;
  color: #8B0000;
getRCDataRO.send(null);
}
}
/* Image frame fix */
div.tright, div.tleft {
  border: 1px solid silver;
}
}


function parseRCdata() {
div.thumbinner {
if (getRCDataRO.readyState == 4) {
  background: inherit;
textFilter = new RegExp('<div id="bodyContent">.*?</div>[\t\s]*?<!-- end content -->[\t\s]*?<div class="visualClear">', "i");
  border: none;
rawRCdata = getRCDataRO.responseText.replace(cr, "").replace(lf, "");
  color: inherit;
filteredRCdata = textFilter.exec(rawRCdata);
updatedText = filteredRCdata[0].replace('<div id="bodyContent">', "").replace(endText, "");
document.getElementById("bodyContent").innerHTML = updatedText;
rcTimer = setTimeout("loadRCData();", rcRefresh);
}
}
#article div.thumb {
  color:inherit;
}
}


for (x in ajaxPages) {
/* === Babel === */
if (wgPageName == ajaxPages[x]) addOnloadHook(preloadAJAXRC);
 
div.babelbox {
  float: right;
  margin-left: 1em;
  margin-bottom: 0.5em;
  width: 246px;
  border: 1px solid #99B3FF;
  padding: 2px 0 2px 0;
}
.lang-blockN, .lang-block0, .lang-block1, .lang-block2, .lang-block3 {
  margin: 2px 4px 2px 4px; /* t, l, b, r */
  width:238px;
  border-collapse: collapse;
}
td.lang-codeN, td.lang-code0, td.lang-code1, td.lang-code2, td.lang-code3 {
  text-align:center;
  font-size:14pt;
  width:45px;
  height:45px;
}
td.lang-descriptionN, td.lang-description0, td.lang-description1,
td.lang-description2, td.lang-description3 {
  font-size:8pt;
  padding:4pt;
  line-height:1.25em;
}
}


.lang-block0 {
  border:1px solid #FFB3B3;
}
td.lang-code0 {
  background-color: #FFB3B3;
  color: black;
}
td.lang-description0 {
  background-color: #FFE0E8;
  color: black;
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////
.lang-block1,  .lang-block2, .lang-block3  {
  border:1px solid #99B3FF;
}
td.lang-code1, td.lang-code2, td.lang-code3 {
  background-color: #99B3FF;
  color: black;
}
td.lang-description1,  td.lang-description2, td.lang-description3 {
  background-color: #E0E8FF;
  color: black;
}


// END OF AJAX AUTO-REFRESH
.lang-blockN {
 
  border:1px solid #6EF7A7;
///////////////////////////////////////////////////////////////////////////////////////////////////////////
}
td.lang-codeN {
  background-color: #6EF7A7;
  color: black;
}
td.lang-descriptionN {
  background-color: #C5FCDC;
  color: black;
}

Revision as of 19:08, 6 July 2009

/* **************************************************************** */
/* CSS for navboxes. */
/* Used in Template:Navbox, for example. */
/* **************************************************************** */

table.fallout_navbox_box {
   padding: 0px;
   border: 1px solid #aaa;
   text-align: center;
   border-collapse: separate;
   font-size: 100%;
}

table.nb_bottom + table.nb_bottom {
   border-top-style: none;
   border-top-style: hidden;
}

th.fallout_navbox_innertable_title,
th.fallout_navbox_box_title {
   padding: 2px;
   font-weight: normal;
   color:white;
   font-size: 80%;
}

th.fallout_navbox_box_title {
   background: url(http://img246.imageshack.us/img246/3619/rfgscanlines.jpg);
   background-color: #000000;
   border: 3px solid white;
}

th.fallout_navbox_innertable_title {
   background: url;
   background-color: #aa0000;
   border-top: 0;
   border-bottom: 2px solid white;
   border-left: 3px solid white;
   border-right: 3px solid white;
}

th.fallout_navbox_box_title span.fallout_navbox_maintitle {
   font-weight: bold;
   font-size: 115%;
}

th.fallout_navbox_innertable_title span.fallout_navbox_maintitle {
   font-weight: bold;
   font-size: 125%;
}

td.fallout_navbox_cont {
   padding: 0px;
   border: 0px;
}

table.fallout_navbox_innertable, 
table.fallout_navbox {
   margin: 0px; 
   padding: 0px;
   border-collapse:separate;
   empty-cells:show;
}

table.fallout_navbox {
   font-size: 85%;
   border-bottom: 1px solid white;
}

table.fallout_navbox_innertable {
   font-size: 100%;
}

td.fallout_navbox_header, td.fallout_navbox_footer, 
td.fallout_navbox_cell, td.fallout_navbox_groupcell,
td.fallout_navbox_group, td.fallout_navbox_subgroup {
   border-top: 0;
   border-bottom: 2px solid white;
   border-left: 3px solid white;
}

td.fallout_navbox_header, td.fallout_navbox_footer, 
td.fallout_navbox_cell, td.fallout_navbox_groupcell {
   border-right: 3px solid white;
}

td.fallout_navbox_header, td.fallout_navbox_footer {
   padding: 2px;
   background: url(http://images3.wikia.nocookie.net/fallout/images//d/d3/ConcreteBackground.jpg?1);
   background-color: #565B45;
   color:white;
   text-align: center;
}

td.fallout_navbox_header {
   font-weight: bold;
}

td.fallout_navbox_footer {
   font-size: 90%;
}

td.fallout_navbox_subgroup, td.fallout_navbox_group {
   padding: 2px;
   text-align: center;
   white-space: nowrap;
   border-right: 0;
   font-weight: bold;
}

td.fallout_navbox_group {
   background: url;
   background-color: #bb0000;
}

td.fallout_navbox_subgroup {
   background-color: #DDDDDD;
}

td.fallout_navbox_groupcell, td.fallout_navbox_cell {
   padding: 2px;
   background-color: #DDDDDD;
}

td.fallout_navbox_groupcell {
   text-align: left;
}

td.fallout_navbox_cell {
   text-align: center;
}

/* do not wrap links in content fields if nowraplinks is set */
table.fallout_navbox_nowraplinks td.fallout_navbox_cell a,
table.fallout_navbox_nowraplinks td.fallout_navbox_groupcell a {
   white-space:nowrap;
}

/* header bar needs brighter links */
table.fallout_navbox_box th a:link { 
   color: #AFA000;
}
table.fallout_navbox_box th a:active { 
   color: #fff;
}
table.fallout_navbox_box th a:visited { 
   color: #B6A700;
}
table.fallout_navbox_box th a:hover { 
   color: #fff;
}
table.fallout_navbox_box th a.new {
   color: #f11 !important;
}

/* headers and footer need brighter links */
td.fallout_navbox_header a:link, 
td.fallout_navbox_footer a:link { 
   color: #cfc000;
}
td.fallout_navbox_header a:active , 
td.fallout_navbox_footer a:active { 
   color: #fff;
}
td.fallout_navbox_header a:visited , 
td.fallout_navbox_footer a:visited { 
   color: #B6A700;
}
td.fallout_navbox_header a:hover , 
td.fallout_navbox_footer a:hover { 
   color: #fff;
}

@media print {
   table.fallout_navbox_box {
       display: none;
   }
}

/* end Navboxes */


/***** CSS placed here will be applied to all skins on the entire site. *****/

/* Mark redirects in Special:Allpages and Special:Watchlist */
.allpagesredirect {
   font-style: italic;
}
.allpagesredirect:after {
   color: #808080; content: " (redirect)"
}
.watchlistredir {
   font-style: italic;
}

/* Giving headers and TOC a little extra space */
h2 {
   margin-top: 20px;
}
.toc {
   margin-top: 20px;
}

/* Infobox template style */
.infobox {
   border: 1px solid #aaaaaa;
   background-color: #f9f9f9;
   color: black;
   margin-bottom: 0.5em;
   margin-left: 1em;
   padding: 0.2em;
   float: right;
   clear: right;
}
.infobox td,
.infobox th {
   vertical-align: top;
}
.infobox caption {
   font-size: larger;
   margin-left: inherit;
}
.infobox.bordered {
   border-collapse: collapse;
}
.infobox.bordered td,
.infobox.bordered th {
   border: 1px solid #aaaaaa;
}
.infobox.bordered .borderless td,
.infobox.bordered .borderless th {
   border: 0;
}

/* Forum formatting (by -Algorithm & -Splaka) */
.forumheader {
   border: 1px solid #aaa;
   margin-top: 1em;
   padding: 12px;
}
.forumlist td.forum_edited a {
   color: black;
   text-decoration: none;
}
.forumlist td.forum_title a {
   padding-left: 20px;
}
.forumlist td.forum_title a.forum_new {
   font-weight: bold;
   background: url(/images/4/4e/Forum_new.gif) center left no-repeat;
   padding-left: 20px;
}
.forumlist td.forum_title a.forum_new:visited {
   font-weight: normal;
   background: none;
   padding-left: 20px;
}
.forumlist th.forum_title {
   padding-left: 20px;
}

/* Recent changes byte indicators */
.mw-plusminus-pos {
   color: #006500;
}
.mw-plusminus-neg {
   color: #8B0000;
}

/* Image frame fix */
div.tright, div.tleft {
   border: 1px solid silver;
}

div.thumbinner {
   background: inherit;
   border: none;
   color: inherit;
}
#article div.thumb {
   color:inherit;
}

/* === Babel === */

div.babelbox {
   float: right;
   margin-left: 1em;
   margin-bottom: 0.5em;
   width: 246px;
   border: 1px solid #99B3FF;
   padding: 2px 0 2px 0;
}
.lang-blockN, .lang-block0, .lang-block1, .lang-block2, .lang-block3 {
   margin: 2px 4px 2px 4px; /* t, l, b, r */
   width:238px;
   border-collapse: collapse;
}
td.lang-codeN, td.lang-code0, td.lang-code1, td.lang-code2, td.lang-code3 {
   text-align:center;
   font-size:14pt;
   width:45px;
   height:45px;
}
td.lang-descriptionN, td.lang-description0, td.lang-description1,
td.lang-description2, td.lang-description3 {
  font-size:8pt;
  padding:4pt;
  line-height:1.25em;
}

.lang-block0 {
   border:1px solid #FFB3B3;
}
td.lang-code0 {
  background-color: #FFB3B3;
  color: black;
}
td.lang-description0 {
  background-color: #FFE0E8;
  color: black;
}

.lang-block1,  .lang-block2, .lang-block3  {
   border:1px solid #99B3FF;
}
td.lang-code1, td.lang-code2, td.lang-code3 {
  background-color: #99B3FF;
  color: black;
}
td.lang-description1,  td.lang-description2, td.lang-description3 {
  background-color: #E0E8FF;
  color: black;
}

.lang-blockN {
   border:1px solid #6EF7A7;
}
td.lang-codeN {
  background-color: #6EF7A7;
  color: black;
}
td.lang-descriptionN {
  background-color: #C5FCDC;
  color: black;
}