« MediaWiki:Common.css » : différence entre les versions

Ange (discussion | contributions)
Aucun résumé des modifications
Balise : wikieditor
Bénédicte (discussion | contributions)
Aucun résumé des modifications
 
(7 versions intermédiaires par un autre utilisateur non affichées)
Ligne 1 : Ligne 1 :
/* Le CSS placé ici sera appliqué à tous les habillages. */
/* Kolleggram – masquage RC des pages privées pour les visiteurs */
window.kgmHideRC = (function () {
  var groups = mw.config.get('wgUserGroups') || [];
  var isAdmin = groups.indexOf('sysop') !== -1;
  if (isAdmin) return; // les admins voient tout


/* ***** ***** TimelineTable ***** ***** */
  var canon = mw.config.get('wgCanonicalSpecialPageName') || '';
table.tl_table{
  var onList = ['Recentchanges','Recentchangeslinked','Watchlist','Newpages'].indexOf(canon) !== -1;
        border-width: thin;
  if (!onList) return;
        border-spacing: 2px;
        border-style: outset;
        border-color: black;
        border-collapse: separate;
        background-color: white;
        border-radius: 9px;
}


th.tl_title{
  var targets = [
        text-transform: uppercase
    'Espace_administratrice',        // DBkey
        text-align: center;
    'Espace administratrice',        // titre humain
        border-width: 1px;
    'Admini'
        padding: 1px;
  ];
        border-style: outset;
        border-color: blue;
        background-color: rgb(243, 248, 252);
        border-radius: 9px;
}


th.tl_years{
  function isTargetLink(a) {
        text-align: center;
    var href = (a.getAttribute('href') || '').toLowerCase();
        font-style: italic;
    var text = (a.textContent || '').toLowerCase();
        border-width: 1px;
    return targets.some(function (t) {
        padding: 1px;
      t = t.toLowerCase();
        border-style: outset;
      return href.indexOf(t) !== -1 || href.indexOf(encodeURIComponent(t)) !== -1 || text.indexOf(t) !== -1;
        border-color: blue;
    });
        background-color: rgb(223, 228, 252);
  }
        border-radius: 4px;
}


th.tl_months{
  function removeRowForLink(a) {
        text-align: center;
    var row = a.closest('li, tr, .mw-changeslist-line, .mw-newpages-page'); // gère plusieurs skins
        border-width: 1px;
    if (row) row.remove();
        padding: 1px;
  }
        border-style: outset;
        border-color: blue;
        background-color: rgb(243, 248, 252);
        border-radius: 2px;
}


th.tl_days{
  function sweep() {
        text-align: center;
    // Liens de titre dans les RC (plusieurs variantes selon skin/extensions)
        border-width: 1px;
    var sel = [
        padding: 1px;
      '.mw-changeslist a.mw-changeslist-title',
        border-style: outset;
      '.mw-changeslist .mw-title a',
        border-color: blue;
      'a.mw-newpages-pagename',
        background-color: rgb(243, 248, 252);
      'a[title]' // filet de sécurité
        border-radius: 2px;
    ].join(', ');
}
    document.querySelectorAll(sel).forEach(function (a) {
      if (isTargetLink(a)) removeRowForLink(a);
    });
  }


th.tl_weeks{
  // Premier passage + pour les mises à jour en direct
        text-align: center;
  sweep();
        border-width: 1px;
  mw.hook('wikipage.content').add(sweep);
        padding: 1px;
        border-style: outset;
        border-color: blue;
        background-color: rgb(243, 248, 252);
        border-radius: 2px;
}


td.tl_freetime{
  // Et si RC Live réinvente le DOM, on observe aussi
        background-color: rgb(187, 210, 236);
  var obs = new MutationObserver(function () { sweep(); });
        border-width: 1px;
  obs.observe(document.body, {childList: true, subtree: true});
        border-color: black;
        border-style: inset;
        border-radius: 7px;
}


td.tl_event{
  // Marqueur debug
        text-align: center;
  console.log('kgmHideRC actif');
        padding: 1px;
})();
        background-color: rgb(61, 114, 194);
        border-width: 1px;
        border-color: white;
        border-style: inset;
        color: white;
        border-radius: 7px;
        white-space: normal
}
 
td.tl_foot{
        text-align: center;
        padding: 1px;
        background-color: rgb(243, 248, 252);
        border-width: 1px;
        border-color: blue;
        border-style: ridge;
        color: gray;
        border-radius: 9px;
}
 
thead.tl_header{}
tbody.tl_body{}
tfoot.tl_footer{}
 
a.bulle {
position:relative;
color:#C800F0;
text-decoration:none;
font-family:arial, verdana, sans-serif;
text-align:center;
}
 
a.bulle:hover {
background: none;
z-index: 50;
}
 
a.bulle span {
display: none;
}
 
a.bulle:hover span {
display: block;
position: absolute;
top: -40px;
left: 0px;
font-family:arial, verdana, sans-serif;
text-align:left;
font-size:17px;
color:#0CBFA7;
font-weight:normal;
width:200px;
background: white;
padding: 5px;
border: #62c0f4 solid 1px ;
text-indent: 0;
}
 
a.bulle-ovale {
position:relative;
color:#C800F0;
text-decoration:none;
font-family:arial, verdana, sans-serif;
text-align:center;
}
 
a.bulle-ovale:hover {
background: none;
z-index: 50;
}
 
a.bulle-ovale span {
display: none;
}
 
a.bulle-ovale:hover span {
display: block;
position: absolute;
top: -100px;
left: -10px;
font-family:chalkboard,verdana, sans-serif;
text-align:center;
font-size:17px;
color:#F9EC00;
font-weight:normal;
background: #A2B6F1;
padding: 5px;
width: 150px;
height: 75px;
border-style: 1;
    -webkit-border-radius: 75px / 40px;
    -moz-border-radius:    75px / 40px;
    border-radius:        75px / 40px;
    box-shadow:20px 20px 10px #182856;
    border:#0843EF solid 1px;
text-indent: 0;
}
body {
    background-position: center center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background: rgba(255, 255, 255, 0.5);
    color: #565656;
}
/* Changer la couleur de fond des articles */
.ns-0 * #content, .ns-0 * #p-cactions li, .ns-0 * #p-cactions li a {
    background:#FFEEEE; /* couleur rose comme les pages de discussion */
}
/* Afficher les liens déjà visités en vert */
a:visited {
    color:green;
}
.ns-0 #content { text-align: justify; } /* texte justifié dans les articles */
#column-content { margin: 0 0 .6em 0; }
#content { margin: 2.8em 0 0 0; }
#p-logo, .generated-sidebar, #p-lang, #p-tb, #p-search { display:none; }
#p-cactions { left: .1em; }

Dernière version du 27 octobre 2025 à 11:53

/* Kolleggram – masquage RC des pages privées pour les visiteurs */
window.kgmHideRC = (function () {
  var groups = mw.config.get('wgUserGroups') || [];
  var isAdmin = groups.indexOf('sysop') !== -1;
  if (isAdmin) return; // les admins voient tout

  var canon = mw.config.get('wgCanonicalSpecialPageName') || '';
  var onList = ['Recentchanges','Recentchangeslinked','Watchlist','Newpages'].indexOf(canon) !== -1;
  if (!onList) return;

  var targets = [
    'Espace_administratrice',        // DBkey
    'Espace administratrice',        // titre humain
    'Admini'
  ];

  function isTargetLink(a) {
    var href = (a.getAttribute('href') || '').toLowerCase();
    var text = (a.textContent || '').toLowerCase();
    return targets.some(function (t) {
      t = t.toLowerCase();
      return href.indexOf(t) !== -1 || href.indexOf(encodeURIComponent(t)) !== -1 || text.indexOf(t) !== -1;
    });
  }

  function removeRowForLink(a) {
    var row = a.closest('li, tr, .mw-changeslist-line, .mw-newpages-page'); // gère plusieurs skins
    if (row) row.remove();
  }

  function sweep() {
    // Liens de titre dans les RC (plusieurs variantes selon skin/extensions)
    var sel = [
      '.mw-changeslist a.mw-changeslist-title',
      '.mw-changeslist .mw-title a',
      'a.mw-newpages-pagename',
      'a[title]' // filet de sécurité
    ].join(', ');
    document.querySelectorAll(sel).forEach(function (a) {
      if (isTargetLink(a)) removeRowForLink(a);
    });
  }

  // Premier passage + pour les mises à jour en direct
  sweep();
  mw.hook('wikipage.content').add(sweep);

  // Et si RC Live réinvente le DOM, on observe aussi
  var obs = new MutationObserver(function () { sweep(); });
  obs.observe(document.body, {childList: true, subtree: true});

  // Marqueur debug
  console.log('kgmHideRC actif');
})();