MediaWiki:Common.css : Différence entre versions

De Logilys
Aller à : navigation, rechercher
 
(11 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
 
/* Le CSS placé ici sera appliqué à tous les habillages. */
 
/* Le CSS placé ici sera appliqué à tous les habillages. */
 
#ca-talk { display: none !important; }
 
#ca-talk { display: none !important; }
 +
body h1.firstHeading { display:none; }
 +
#p-search {display:none;}
 +
#p-tb {display:none;}
  
function ModifySidebar(action, section, name, link) {
+
/* Créer par Christian pour dans les cas ou on ne veut pas que la wikitable s'ajoute automatiquement */
<?php echo 'test'?>
+
table.noclass {
    try {
 
        switch (section) {
 
          case "languages":
 
            var target = "p-lang";
 
            break;
 
          case "toolbox":
 
            var target = "p-tb";
 
            break;
 
          case "navigation":
 
            var target = "p-navigation";
 
            break;
 
          default:
 
            var target = "p-" + section;
 
            break;
 
        }
 
 
        if (action == "add") {
 
            var node = document.getElementById(target)
 
                              .getElementsByTagName('div')[0]
 
                              .getElementsByTagName('ul')[0];
 
 
            var aNode = document.createElement('a');
 
            var liNode = document.createElement('li');
 
 
            aNode.appendChild(document.createTextNode(name));
 
            aNode.setAttribute('href', link);
 
            liNode.appendChild(aNode);
 
            liNode.className='plainlinks';
 
            node.appendChild(liNode);
 
        }
 
 
        if (action == "remove") {
 
            var list = document.getElementById(target)
 
                              .getElementsByTagName('div')[0]
 
                              .getElementsByTagName('ul')[0];
 
 
            var listelements = list.getElementsByTagName('li');
 
 
            for (var i = 0; i < listelements.length; i++) {
 
                if (listelements[i].getElementsByTagName('a')[0].innerHTML == name ||
 
                    listelements[i].getElementsByTagName('a')[0].href == link) {
 
 
                    list.removeChild(listelements[i]);
 
                }
 
            }
 
        }
 
 
    } catch(e) {
 
      // lets just ignore what's happened
 
      return;
 
    }
 
 
}
 
}
+
 
function CustomizeModificationsOfSidebar() {
+
/* Wikitable (Prettytable) class for skinning normal tables */
    //adds [[Special:CategoryTree]] to toolbox
+
table.wikitable,
    ModifySidebar("add", "toolbox", "CategoryTree", "http://en.wikipedia.org/wiki/Special:CategoryTree");
+
table.prettytable {
    //removes [[Special:Upload]] from toolbox
+
margin: 1em 1em 1em 0;
    ModifySidebar("remove", "toolbox", "Upload file", "http://en.wikipedia.org/wiki/Special:Upload");
+
background: #f9f9f9;
 +
border: 1px #aaaaaa solid;
 +
border-collapse: collapse;
 +
empty-cells: show;
 +
}
 +
table.wikitable th, table.wikitable td,
 +
table.prettytable th, table.prettytable td {
 +
border: 1px #aaaaaa solid;
 +
padding: 0.2em 0.4em;
 +
}
 +
table.wikitable th, table.wikitable td.hl3, table.wikitable th.hl3,
 +
table.prettytable th, table.prettytable td.hl3, table.wikitable th.hl3 {
 +
background: #8da7d6;
 +
text-align: center;
 +
}
 +
table.wikitable td.hl1, table.wikitable th.hl1,
 +
table.prettytable td.hl1, table.wikitable th.hl1 {
 +
background: #c5d8fc;
 +
text-align: center;
 +
}
 +
table.wikitable td.hl2, table.wikitable th.hl2,
 +
table.prettytable td.hl2, table.wikitable th.hl2 {
 +
background: #a7c1f2;
 +
text-align: center;
 +
}
 +
table.wikitable caption,
 +
table.prettytable caption {
 +
margin-left: inherit;
 +
margin-right: inherit;
 +
font-weight: bold;
 +
}
 +
 
 +
/* General purpose "pretty (data) tables" */
 +
table.datatable { background-color: transparent; }
 +
table.datatable th, table.datatable td { padding: 4px; }
 +
table.datatable th { text-align: left; background-color: #999999; }
 +
table.datatable tr { background-color: #cccccc; }
 +
table.datatable tr:hover { background-color: #ffffcc; }
 +
 
 +
.generated-sidebar portlet { color: #6893C5 }
 +
 
 +
 
 +
/* CUSTOM CSS ADDED BY JMG */
 +
.mw-body h2
 +
{
 +
  margin-top:2em;
 +
}
 +
 
 +
.mw-body h3
 +
{
 +
  margin-top:1em;
 
}
 
}
 
addOnloadHook(CustomizeModificationsOfSidebar);
 

Version actuelle datée du 2 juin 2017 à 11:02

/* Le CSS placé ici sera appliqué à tous les habillages. */
#ca-talk { display: none !important; }
body h1.firstHeading { display:none; }
#p-search {display:none;}
#p-tb {display:none;}

/* Créer par Christian pour dans les cas ou on ne veut pas que la wikitable s'ajoute automatiquement */
table.noclass {
}

/* Wikitable (Prettytable) class for skinning normal tables */
table.wikitable,
table.prettytable {
	margin: 1em 1em 1em 0;
	background: #f9f9f9;
	border: 1px #aaaaaa solid;
	border-collapse: collapse;
	empty-cells: show;
}
table.wikitable th, table.wikitable td,
table.prettytable th, table.prettytable td {
	border: 1px #aaaaaa solid;
	padding: 0.2em 0.4em;
}
table.wikitable th, table.wikitable td.hl3, table.wikitable th.hl3,
table.prettytable th, table.prettytable td.hl3, table.wikitable th.hl3 {
	background: #8da7d6;
	text-align: center;
}
table.wikitable td.hl1, table.wikitable th.hl1,
table.prettytable td.hl1, table.wikitable th.hl1 {
	background: #c5d8fc;
	text-align: center;
}
table.wikitable td.hl2, table.wikitable th.hl2,
table.prettytable td.hl2, table.wikitable th.hl2 {
	background: #a7c1f2;
	text-align: center;
}
table.wikitable caption,
table.prettytable caption {
	margin-left: inherit;
	margin-right: inherit;
	font-weight: bold;
}

/* General purpose "pretty (data) tables" */
table.datatable { background-color: transparent; }
table.datatable th, table.datatable td { padding: 4px; }
table.datatable th { text-align: left; background-color: #999999; }
table.datatable tr { background-color: #cccccc; }
table.datatable tr:hover { background-color: #ffffcc; }

.generated-sidebar portlet { color: #6893C5 }


/* CUSTOM CSS ADDED BY JMG */
.mw-body h2
{
  margin-top:2em;
}

.mw-body h3
{
  margin-top:1em;
}