Basculer le menu
Changer de menu des préférences
Basculer le menu personnel
Non connecté(e)
Votre adresse IP sera visible au public si vous faites des modifications.

« Modèle:ButtonLink/styles.css » : différence entre les versions

De Nefald
Hiob (discussion | contributions)
Aucun résumé des modifications
Balise : Révoqué
Agrado (discussion | contributions)
complément pour taille responsive
Balise : Révoqué
(8 versions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
/* ============================================
  FIX: RÉINITIALISATION POUR ÉVITER CONFLITS
  ============================================ */
.button-link-image-container,
.button-link-image-container *,
.button-link-image,
.button-link-image * {
    border: none !important;
    box-sizing: border-box !important;
}
.button-link-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* ============================================
  MASQUER L'ICÔNE DE LIEN EXTERNE MEDIAWIKI
  ============================================ */
.button-link-wrapper a.external,
.button-link-wrapper a[href^="http"]::after,
.button-link-wrapper a.external::after {
    background-image: none !important;
    background: none !important;
    padding-right: 0 !important;
    content: '' !important;
}
.button-link-wrapper .mw-parser-output a.external {
    background: none !important;
    padding: 0 !important;
}
/* ============================================
  BASE DU BOUTON
  ============================================ */
.button-link-wrapper {
.button-link-wrapper {
     min-height: 100px;
     min-height: 80px;
     border-radius: 12px;
     border-radius: 12px;
     overflow: hidden;
     overflow: hidden;
Ligne 48 : Ligne 7 :
     position: relative;
     position: relative;
     background: #6c757d;
     background: #6c757d;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
    /* ✅ autorise le shrink dans une grille */
    min-width: 0;
}
}


Ligne 57 : Ligne 20 :
     box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
     box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
}
/* ============================================
  ZONE CLIQUABLE (lien invisible)
  ============================================ */
.button-link-wrapper > a {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    opacity: 0;
    overflow: hidden;
    text-indent: -9999px;
    display: block !important;
}
.button-link-clickzone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}
/* Masquer complètement l'icône et le texte du lien */
.button-link-wrapper > a > .mw-file-description,
.button-link-wrapper > a > img {
    display: none !important;
}
/* ============================================
  CONTENU DU BOUTON
  ============================================ */


.button-link-content {
.button-link-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 30px;
    position: relative;
    z-index: 10;
    pointer-events: none;
     width: 100%;
     width: 100%;
}
    text-align: center;
    padding: 1rem;


/* ============================================
    /* ✅ autorise le shrink */
  CONTENEUR IMAGE
     min-width: 0;
  ============================================ */
     box-sizing: border-box;
 
.button-link-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    padding: 0.5rem;
     min-width: 80px;
     max-width: 80px;
    min-height: 80px;
    max-height: 80px;
    background: transparent;
    margin: -0.5rem 0.75rem -0.5rem -0.5rem;
    overflow: visible; /* Changé de hidden à visible */
}
}


/* Image à droite : inverser les marges */
.button-link-content a {
.button-link--position-right .button-link-image-container {
     color: white !important;
     margin: -0.5rem -0.5rem -0.5rem 0.75rem;
    text-decoration: none !important;
}


.button-link-image-container .mw-file-description {
     display: flex;
     display: flex;
    flex-direction: column;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
    width: 100%;
    height: 100%;
}


.button-link-image-container img {
    /* ✅ prend toute la place dispo */
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
    object-fit: contain;
}
/* ============================================
  DISPOSITION PAR DÉFAUT : IMAGE CENTRÉE
  ============================================ */
.button-link--imagepos-center .button-link-content {
    flex-direction: column;
    text-align: center;
}


/* ============================================
    /* ✅ autorise le shrink */
  DISPOSITION : IMAGE À GAUCHE
     min-width: 0;
  ============================================ */
     box-sizing: border-box;
 
.button-link--imagepos-left .button-link-content {
     flex-direction: row;
     justify-content: flex-start;
    text-align: left;
}
}


/* ============================================
.button-link-content a:hover,
  DISPOSITION : IMAGE À DROITE
.button-link-content a:visited {
  ============================================ */
     color: white !important;
 
.button-link--imagepos-right .button-link-content {
     flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: right;
}
}


/* ============================================
/* ============================================
   IMAGE
   CONTENEUR D'IMAGE (corrigé: plus de largeur fixe)
   ============================================ */
   ============================================ */


.button-link-image-container {
.button-link-content .mw-file-description {
    flex-shrink: 0;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}


.button-link-image {
     width: 100%;           /* ✅ fluide */
     display: block;
     max-width: 200px;      /* ✅ conserve un rendu proche si bouton large */
    max-width: 100%;       /* Ne dépasse pas le conteneur */
    height: 50px;
     max-height: 100%;      /* Ne dépasse pas le conteneur */
}


/* ============================================
    margin: 0 auto 0.5rem;
  TEXTE
    overflow: hidden;
  ============================================ */


.button-link-text {
     /* ✅ autorise le shrink */
    color: white;
     min-width: 0;
     font-size: 1.2em;
    line-height: 1.4;
    font-weight: bold;
     text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    flex: 1;
    display: flex;
    align-items: center;
}
}


/* Centrage vertical du texte selon la position */
/* IMAGE RESPONSIVE DANS LE CONTENEUR */
.button-link--imagepos-center .button-link-text {
.button-link-content img {
     justify-content: center;
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
     filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
}


.button-link--imagepos-left .button-link-text {
/* Masquer l'icône de lien externe */
    justify-content: flex-start;
.button-link-content a.external::after {
}
     display: none !important;
 
.button-link--imagepos-right .button-link-text {
     justify-content: flex-end;
}
}


/* ============================================
/* ============================================
   COULEURS PRÉDÉFINIES (LOGOS)
   COULEURS PRÉDÉFINIES
   ============================================ */
   ============================================ */


/* RÉSEAUX SOCIAUX */
/* ========== COULEURS GÉNÉRIQUES ========== */
.button-link--danger { background: #dc3545; }
.button-link--dark { background: #343a40; }
.button-link--info { background: #17a2b8; }
.button-link--light { background: #f8f9fa; color: #000 !important; }
.button-link--primary { background: #007bff; }
.button-link--secondary { background: #6c757d; }
.button-link--success { background: #28a745; }
.button-link--warning { background: #ffc107; color: #000 !important; }
 
/* ========== RÉSEAUX SOCIAUX ========== */
.button-link--bluesky { background: #0085ff; }
.button-link--bluesky { background: #0085ff; }
.button-link--discord { background: #5865f2; }
.button-link--discord { background: #5865f2; }
.button-link--facebook { background: #1877f2; }
.button-link--facebook { background: #1877f2; }
.button-link--github { background: #24292e; }
.button-link--instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.button-link--instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.button-link--linkedin { background: #0a66c2; }
.button-link--linkedin { background: #0077b5; }
.button-link--mastodon { background: #6364ff; }
.button-link--mastodon { background: #6364ff; }
.button-link--reddit { background: #ff4500; }
.button-link--reddit { background: #ff4500; }
.button-link--signal { background: #3a76f0; }
.button-link--snapchat { background: #fffc00; color: #000 !important; }
.button-link--snapchat { background: #fffc00; }
.button-link--threads { background: #000000; }
.button-link--snapchat .button-link-text { color: #000; }
.button-link--telegram { background: #0088cc; }
.button-link--tiktok { background: #000000; }
.button-link--tiktok { background: #000000; }
.button-link--twitch { background: #9146ff; }
.button-link--twitch { background: #9146ff; }
.button-link--twitter { background: #1da1f2; }
.button-link--twitter { background: #1da1f2; }
.button-link--x { background: #000000; }
.button-link--youtube { background: #ff0000; }
.button-link--youtube { background: #ff0000; }


/* SERVICES */
/* ========== HÉBERGEMENT DE CODE ========== */
.button-link--bandcamp { background: #1da0c3; }
.button-link--github { background: #24292e; }
.button-link--deezer { background: #ff0092; }
.button-link--gitlab { background: #fc6f23; }
.button-link--gitlab { background: #fc6d26; }
.button-link--soundcloud { background: #ff5500; }
.button-link--spotify { background: #1db954; }
.button-link--steam { background: #171a21; }


/* JEUX */
/* ========== SERVICES DE DÉVELOPPEMENT ========== */
.button-link--codepen { background: #ffffff; }
.button-link--docker { background: #2496ed; }
.button-link--gradle { background: #02303a; }
.button-link--jenkins { background: #d24939; }
.button-link--kubernetes { background: #326ce5; }
.button-link--maven { background: #c71a36; }
.button-link--npm { background: #cb3837; }
.button-link--stackoverflow { background: #f48024; }
 
/* ========== MINECRAFT MODLOADERS ========== */
.button-link--fabric { background: #dbd3c8; }
.button-link--forge { background: #1e2c42; }
.button-link--minecraft { background: #62b47a; }
.button-link--neoforge { background: #ff6b35; }
.button-link--quilt { background: #8b5cf6; }
 
/* ========== PLATEFORMES DE PLUGINS ========== */
.button-link--bukkit { background: #f7931e; }
.button-link--curseforge { background: #f16436; }
.button-link--curseforge { background: #f16436; }
.button-link--minecraft { background: #62b47a; }
.button-link--github-releases { background: #238636; }
.button-link--hangar { background: #0089ff; }
.button-link--modrinth { background: #1bd96a; }
.button-link--modrinth { background: #1bd96a; }
.button-link--paper { background: #1a8cff; }
.button-link--polymart { background: #2196f3; }
.button-link--purpur { background: #a855f7; }
.button-link--spigot { background: #ed8106; }
.button-link--spigot { background: #ed8106; }


/* FINANCEMENT */
/* ========== PLATEFORMES DE FINANCEMENT ========== */
.button-link--buymeacoffee { background: #ffdd00; }
.button-link--buymeacoffee { background: #ffdd00; }
.button-link--buymeacoffee .button-link-text { color: #000; }
.button-link--helloasso { background: #4C40CF; }
.button-link--helloasso { background: #4C40CF; }
.button-link--helloasso:hover { background: #3d3fc7; }
.button-link--kofi { background: #ff5e5b; }
.button-link--kofi { background: #ff5e5b; }
.button-link--liberapay { background: #f6c915; }
.button-link--liberapay { background: #f6c915; }
.button-link--liberapay .button-link-text { color: #000; }
.button-link--opencollective { background: #7fadf2; }
.button-link--opencollective { background: #7fadf2; }
.button-link--patreon { background: #ff424d; }
.button-link--patreon { background: #ff424d; }
.button-link--paypal { background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%); }
.button-link--paypal { background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%); }
.button-link--qonto { background: #1d1d1d; }
.button-link--paypal:hover { background: linear-gradient(135deg, #005ea6 0%, #003087 100%); }
.button-link--qonto { background: #1d1d1dff; }
.button-link--stripe { background: #635BFF; }
.button-link--stripe { background: #635BFF; }


/* ============================================
/* ============================================
   ALIGNEMENT
   ALIGNEMENT (corrigé: ne force plus 300px)
   ============================================ */
   ============================================ */


.button-link--align-left {
.button-link--align-left {
     width: 450px;
     max-width: 300px;    /* ✅ au lieu de width fixe */
     max-width: 100%;
     margin-right: auto;
     margin-right: auto;
     margin-left: 0;
     margin-left: 0;
Ligne 284 : Ligne 174 :


.button-link--align-center {
.button-link--align-center {
    width: 450px;
     max-width: 300px;
     max-width: 100%;
     margin-left: auto;
     margin-left: auto;
     margin-right: auto;
     margin-right: auto;
Ligne 291 : Ligne 180 :


.button-link--align-right {
.button-link--align-right {
    width: 450px;
     max-width: 300px;
     max-width: 100%;
     margin-left: auto;
     margin-left: auto;
     margin-right: 0;
     margin-right: 0;
}
/* ✅ MODE “taille au contenu” */
.button-link-wrapper{
  display: inline-flex;  /* au lieu de flex (et au lieu de bloc) */
  width: auto;            /* ne plus occuper 100% */
}
.button-link-content{
  width: auto;            /* ne plus forcer 100% */
}
.button-link-content a{
  width: auto;            /* ne plus forcer 100% */
  height: auto;
}
}

Version du 4 février 2026 à 21:45

.button-link-wrapper {
    min-height: 80px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    background: #6c757d;

    display: flex;
    align-items: center;
    justify-content: center;

    /* ✅ autorise le shrink dans une grille */
    min-width: 0;
}

.button-link-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.button-link-content {
    width: 100%;
    text-align: center;
    padding: 1rem;

    /* ✅ autorise le shrink */
    min-width: 0;
    box-sizing: border-box;
}

.button-link-content a {
    color: white !important;
    text-decoration: none !important;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* ✅ prend toute la place dispo */
    width: 100%;
    height: 100%;

    /* ✅ autorise le shrink */
    min-width: 0;
    box-sizing: border-box;
}

.button-link-content a:hover,
.button-link-content a:visited {
    color: white !important;
}

/* ============================================
   CONTENEUR D'IMAGE (corrigé: plus de largeur fixe)
   ============================================ */

.button-link-content .mw-file-description {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;            /* ✅ fluide */
    max-width: 200px;       /* ✅ conserve un rendu proche si bouton large */
    height: 50px;

    margin: 0 auto 0.5rem;
    overflow: hidden;

    /* ✅ autorise le shrink */
    min-width: 0;
}

/* IMAGE RESPONSIVE DANS LE CONTENEUR */
.button-link-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Masquer l'icône de lien externe */
.button-link-content a.external::after {
    display: none !important;
}

/* ============================================
   COULEURS PRÉDÉFINIES
   ============================================ */

/* ========== COULEURS GÉNÉRIQUES ========== */
.button-link--danger { background: #dc3545; }
.button-link--dark { background: #343a40; }
.button-link--info { background: #17a2b8; }
.button-link--light { background: #f8f9fa; color: #000 !important; }
.button-link--primary { background: #007bff; }
.button-link--secondary { background: #6c757d; }
.button-link--success { background: #28a745; }
.button-link--warning { background: #ffc107; color: #000 !important; }

/* ========== RÉSEAUX SOCIAUX ========== */
.button-link--bluesky { background: #0085ff; }
.button-link--discord { background: #5865f2; }
.button-link--facebook { background: #1877f2; }
.button-link--instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.button-link--linkedin { background: #0077b5; }
.button-link--mastodon { background: #6364ff; }
.button-link--reddit { background: #ff4500; }
.button-link--snapchat { background: #fffc00; color: #000 !important; }
.button-link--threads { background: #000000; }
.button-link--tiktok { background: #000000; }
.button-link--twitch { background: #9146ff; }
.button-link--twitter { background: #1da1f2; }
.button-link--youtube { background: #ff0000; }

/* ========== HÉBERGEMENT DE CODE ========== */
.button-link--github { background: #24292e; }
.button-link--gitlab { background: #fc6f23; }

/* ========== SERVICES DE DÉVELOPPEMENT ========== */
.button-link--codepen { background: #ffffff; }
.button-link--docker { background: #2496ed; }
.button-link--gradle { background: #02303a; }
.button-link--jenkins { background: #d24939; }
.button-link--kubernetes { background: #326ce5; }
.button-link--maven { background: #c71a36; }
.button-link--npm { background: #cb3837; }
.button-link--stackoverflow { background: #f48024; }

/* ========== MINECRAFT MODLOADERS ========== */
.button-link--fabric { background: #dbd3c8; }
.button-link--forge { background: #1e2c42; }
.button-link--minecraft { background: #62b47a; }
.button-link--neoforge { background: #ff6b35; }
.button-link--quilt { background: #8b5cf6; }

/* ========== PLATEFORMES DE PLUGINS ========== */
.button-link--bukkit { background: #f7931e; }
.button-link--curseforge { background: #f16436; }
.button-link--github-releases { background: #238636; }
.button-link--hangar { background: #0089ff; }
.button-link--modrinth { background: #1bd96a; }
.button-link--paper { background: #1a8cff; }
.button-link--polymart { background: #2196f3; }
.button-link--purpur { background: #a855f7; }
.button-link--spigot { background: #ed8106; }

/* ========== PLATEFORMES DE FINANCEMENT ========== */
.button-link--buymeacoffee { background: #ffdd00; }
.button-link--helloasso { background: #4C40CF; }
.button-link--helloasso:hover { background: #3d3fc7; }
.button-link--kofi { background: #ff5e5b; }
.button-link--liberapay { background: #f6c915; }
.button-link--opencollective { background: #7fadf2; }
.button-link--patreon { background: #ff424d; }
.button-link--paypal { background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%); }
.button-link--paypal:hover { background: linear-gradient(135deg, #005ea6 0%, #003087 100%); }
.button-link--qonto { background: #1d1d1dff; }
.button-link--stripe { background: #635BFF; }

/* ============================================
   ALIGNEMENT (corrigé: ne force plus 300px)
   ============================================ */

.button-link--align-left {
    max-width: 300px;     /* ✅ au lieu de width fixe */
    margin-right: auto;
    margin-left: 0;
}

.button-link--align-center {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.button-link--align-right {
    max-width: 300px;
    margin-left: auto;
    margin-right: 0;
}
/* ✅ MODE “taille au contenu” */
.button-link-wrapper{
  display: inline-flex;   /* au lieu de flex (et au lieu de bloc) */
  width: auto;            /* ne plus occuper 100% */
}

.button-link-content{
  width: auto;            /* ne plus forcer 100% */
}

.button-link-content a{
  width: auto;            /* ne plus forcer 100% */
  height: auto;
}
Les témoins (''cookies'') nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de témoins.