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é
(2 versions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
/* ============================================
  WRAPPER PRINCIPAL
  ============================================ */
.button-link-wrapper {
.button-link-wrapper {
     min-height: 80px;
     min-height: 80px;
Ligne 11 : Ligne 7 :
     position: relative;
     position: relative;
     background: #6c757d;
     background: #6c757d;
     display: flex;
     display: flex;
     align-items: stretch; /* ⬅️ CHANGÉ */
     align-items: center;
    justify-content: center;
 
    /* ✅ autorise le shrink dans une grille */
    min-width: 0;
}
}


Ligne 19 : Ligne 20 :
     box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
     box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
}
/* ============================================
  CONTENU PRINCIPAL
  ============================================ */


.button-link-content {
.button-link-content {
     width: 100%;
     width: 100%;
     display: flex; /* ⬅️ AJOUTÉ */
     text-align: center;
     align-items: center; /* ⬅️ AJOUTÉ */
    padding: 1rem;
 
    /* ✅ autorise le shrink */
     min-width: 0;
    box-sizing: border-box;
}
}


Ligne 33 : Ligne 34 :
     color: white !important;
     color: white !important;
     text-decoration: none !important;
     text-decoration: none !important;
     display: flex;
     display: flex;
    flex-direction: column;
     align-items: center;
     align-items: center;
    justify-content: center;
    /* ✅ prend toute la place dispo */
     width: 100%;
     width: 100%;
     padding: 1rem;
     height: 100%;
     gap: 1rem; /* ⬅️ Espacement entre image et texte */
 
     /* ✅ autorise le shrink */
    min-width: 0;
    box-sizing: border-box;
}
}


Ligne 46 : Ligne 55 :


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


.button-link-image-container {
.button-link-content .mw-file-description {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
     flex-shrink: 0;
 
     width: 120px; /* ⬅️ Réduit */
     width: 100%;           /* ✅ fluide */
     height: 100%; /* ⬅️ Prend toute la hauteur disponible */
     max-width: 200px;       /* ✅ conserve un rendu proche si bouton large */
     height: 50px;
 
    margin: 0 auto 0.5rem;
     overflow: hidden;
     overflow: hidden;
    background: transparent;
}


.button-link-image-container .mw-file-description {
     /* ✅ autorise le shrink */
     display: flex;
     min-width: 0;
    align-items: center;
     justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.5rem; /* ⬅️ Petit padding interne */
}
}


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


/* ============================================
/* Masquer l'icône de lien externe */
  TEXTE DU BOUTON
.button-link-content a.external::after {
  ============================================ */
     display: none !important;
 
.button-link-text {
    flex: 1; /* ⬅️ Prend l'espace restant */
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    min-width: 0; /* ⬅️ Permet au texte de se réduire si besoin */
}
 
.button-link-text strong {
    font-size: 1.1em;
     display: block;
    margin-bottom: 0.25rem;
}
}


/* ============================================
/* ============================================
   POSITIONNEMENT QR CODE
   COULEURS PRÉDÉFINIES
   ============================================ */
   ============================================ */


/* QR Code à GAUCHE (défaut) */
/* ========== COULEURS GÉNÉRIQUES ========== */
.button-link--imagepos-left .button-link-content a {
.button-link--danger { background: #dc3545; }
    flex-direction: row;
.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; }


.button-link--imagepos-left .button-link-text {
/* ========== RÉSEAUX SOCIAUX ========== */
    text-align: left;
.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; }


/* QR Code à DROITE */
/* ========== HÉBERGEMENT DE CODE ========== */
.button-link--imagepos-right .button-link-content a {
.button-link--github { background: #24292e; }
    flex-direction: row-reverse;
.button-link--gitlab { background: #fc6f23; }
}


.button-link--imagepos-right .button-link-text {
/* ========== SERVICES DE DÉVELOPPEMENT ========== */
    text-align: right;
.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; }


/* QR Code CENTRÉ (pas de texte) */
/* ========== MINECRAFT MODLOADERS ========== */
.button-link--imagepos-center .button-link-content a {
.button-link--fabric { background: #dbd3c8; }
    justify-content: center;
.button-link--forge { background: #1e2c42; }
}
.button-link--minecraft { background: #62b47a; }
.button-link--neoforge { background: #ff6b35; }
.button-link--quilt { background: #8b5cf6; }


.button-link--imagepos-center .button-link-image-container {
/* ========== PLATEFORMES DE PLUGINS ========== */
    width: 200px; /* ⬅️ Plus grand quand centré */
.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; }


.button-link--imagepos-center .button-link-text {
/* ========== PLATEFORMES DE FINANCEMENT ========== */
    display: none;
.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 DU BOUTON
   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 145 : 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 152 : 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% */
}
}


/* Masquer l'icône de lien externe */
.button-link-content a{
.button-link-content a.external::after {
  width: auto;            /* ne plus forcer 100% */
    display: none !important;
  height: auto;
}
}
Les témoins (''cookies'') nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de témoins.