« Modèle:ButtonLink/styles.css » : différence entre les versions
De Nefald
Autres actions
Aucun résumé des modifications Balise : Révoqué |
Annulation des modifications 4046 de Hiob (discussion) Balises : Annulation Révoqué |
||
| Ligne 10 : | Ligne 10 : | ||
padding-right: 0 !important; | padding-right: 0 !important; | ||
content: '' !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: 100px; | ||
border-radius: 12px; | 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; | position: relative; | ||
background: #6c757d; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
} | } | ||
.button-link-wrapper:hover { | .button-link-wrapper:hover { | ||
transform: translateY(-2px); | transform: translateY(-2px); | ||
box-shadow: 0 4px | box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); | ||
} | } | ||
/* ============================================ | /* ============================================ | ||
ZONE CLIQUABLE | 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 { | .button-link-clickzone { | ||
| Ligne 47 : | Ligne 60 : | ||
top: 0; | top: 0; | ||
left: 0; | left: 0; | ||
width: 100%; | |||
height: 100%; | |||
display: block; | |||
} | } | ||
/* | /* Masquer complètement l'icône et le texte du lien */ | ||
.button-link- | .button-link-wrapper > a > .mw-file-description, | ||
.button-link- | .button-link-wrapper > a > img { | ||
display: none !important; | |||
} | } | ||
| Ligne 68 : | Ligne 77 : | ||
.button-link-content { | .button-link-content { | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
gap: | gap: 20px; | ||
padding: 20px 30px; | |||
position: relative; | |||
z-index: 10; | |||
pointer-events: none; | |||
width: 100%; | width: 100%; | ||
} | } | ||
/* ============================================ | /* ============================================ | ||
DISPOSITION PAR DÉFAUT : IMAGE CENTRÉE | |||
============================================ */ | ============================================ */ | ||
.button-link- | .button-link--imagepos-center .button-link-content { | ||
flex-direction: column; | |||
text-align: center; | |||
} | } | ||
/* | /* ============================================ | ||
.button-link- | DISPOSITION : IMAGE À GAUCHE | ||
============================================ */ | |||
.button-link--imagepos-left .button-link-content { | |||
flex-direction: row; | |||
justify-content: flex-start; | |||
text-align: left; | |||
} | } | ||
/* ============================================ | /* ============================================ | ||
DISPOSITION : IMAGE À DROITE | |||
============================================ */ | ============================================ */ | ||
.button-link- | .button-link--imagepos-right .button-link-content { | ||
flex-direction: row-reverse; | |||
justify-content: flex-start; | |||
text-align: | text-align: right; | ||
} | } | ||
/* ============================================ | /* ============================================ | ||
IMAGE | |||
============================================ */ | ============================================ */ | ||
.button-link-image-container { | |||
.button-link-- | flex-shrink: 0; | ||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
border-radius: 8px; | |||
overflow: hidden; | |||
} | } | ||
.button-link-image { | |||
.button-link- | display: block; | ||
max-width: 100%; | max-width: 100%; | ||
height: auto; | |||
object-fit: contain; | |||
} | } | ||
/* ============================================ | |||
TEXTE | |||
============================================ */ | |||
.button-link- | .button-link-text { | ||
color: white; | |||
font-size: 1.2em; | |||
line-height: 1.4; | |||
font-weight: bold; | |||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); | |||
text- | |||
flex: 1; | flex: 1; | ||
display: flex; | |||
align-items: center; | |||
} | } | ||
/* | /* Centrage vertical du texte selon la position */ | ||
.button-link--imagepos- | .button-link--imagepos-center .button-link-text { | ||
justify-content: center; | |||
} | } | ||
.button-link--imagepos- | .button-link--imagepos-left .button-link-text { | ||
justify-content: flex-start; | |||
} | } | ||
.button-link--imagepos-right .button-link-text { | .button-link--imagepos-right .button-link-text { | ||
justify-content: flex-end; | |||
} | } | ||
/* ============================================ | /* ============================================ | ||
COULEURS | COULEURS PRÉDÉFINIES (LOGOS) | ||
============================================ */ | ============================================ */ | ||
/* RÉSEAUX SOCIAUX */ | /* RÉSEAUX SOCIAUX */ | ||
.button-link--bluesky { background: #0085ff; } | |||
.button-link--discord { background: #5865f2; } | .button-link--discord { background: #5865f2; } | ||
.button-link-- | .button-link--facebook { background: #1877f2; } | ||
.button-link-- | .button-link--github { background: #24292e; } | ||
.button-link-- | .button-link--instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); } | ||
.button-link--linkedin { background: #0a66c2; } | |||
.button-link--mastodon { background: #6364ff; } | |||
.button-link--reddit { background: #ff4500; } | .button-link--reddit { background: #ff4500; } | ||
.button-link-- | .button-link--signal { background: #3a76f0; } | ||
.button-link--snapchat { background: #fffc00; } | .button-link--snapchat { background: #fffc00; } | ||
.button-link--snapchat .button-link-text { color: #000; } | .button-link--snapchat .button-link-text { color: #000; } | ||
.button-link-- | .button-link--telegram { background: #0088cc; } | ||
.button-link--tiktok { background: #000000; } | |||
.button-link--twitch { background: #9146ff; } | |||
.button-link--twitter { background: #1da1f2; } | |||
.button-link--x { background: #000000; } | |||
.button-link--youtube { background: #ff0000; } | |||
/* | /* SERVICES */ | ||
.button-link-- | .button-link--bandcamp { background: #1da0c3; } | ||
.button-link-- | .button-link--deezer { background: #ff0092; } | ||
.button-link-- | .button-link--gitlab { background: #fc6d26; } | ||
.button-link-- | .button-link--soundcloud { background: #ff5500; } | ||
.button-link-- | .button-link--spotify { background: #1db954; } | ||
.button-link--steam { background: #171a21; } | |||
.button-link-- | |||
/* | /* JEUX */ | ||
.button-link--curseforge { background: #f16436; } | .button-link--curseforge { background: #f16436; } | ||
.button-link--minecraft { background: #62b47a; } | .button-link--minecraft { background: #62b47a; } | ||
.button-link--modrinth { background: #1bd96a; } | .button-link--modrinth { background: #1bd96a; } | ||
.button-link--spigot { background: #ed8106; } | .button-link--spigot { background: #ed8106; } | ||
/* FINANCEMENT */ | /* FINANCEMENT */ | ||
| Ligne 260 : | Ligne 213 : | ||
.button-link--qonto { background: #1d1d1d; } | .button-link--qonto { background: #1d1d1d; } | ||
.button-link--stripe { background: #635BFF; } | .button-link--stripe { background: #635BFF; } | ||
/* ============================================ | /* ============================================ | ||
Version du 15 janvier 2026 à 15:09
/* ============================================
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 {
min-height: 100px;
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;
}
.button-link-wrapper:hover {
transform: translateY(-2px);
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 {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
padding: 20px 30px;
position: relative;
z-index: 10;
pointer-events: none;
width: 100%;
}
/* ============================================
DISPOSITION PAR DÉFAUT : IMAGE CENTRÉE
============================================ */
.button-link--imagepos-center .button-link-content {
flex-direction: column;
text-align: center;
}
/* ============================================
DISPOSITION : IMAGE À GAUCHE
============================================ */
.button-link--imagepos-left .button-link-content {
flex-direction: row;
justify-content: flex-start;
text-align: left;
}
/* ============================================
DISPOSITION : IMAGE À DROITE
============================================ */
.button-link--imagepos-right .button-link-content {
flex-direction: row-reverse;
justify-content: flex-start;
text-align: right;
}
/* ============================================
IMAGE
============================================ */
.button-link-image-container {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
overflow: hidden;
}
.button-link-image {
display: block;
max-width: 100%;
height: auto;
object-fit: contain;
}
/* ============================================
TEXTE
============================================ */
.button-link-text {
color: white;
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 */
.button-link--imagepos-center .button-link-text {
justify-content: center;
}
.button-link--imagepos-left .button-link-text {
justify-content: flex-start;
}
.button-link--imagepos-right .button-link-text {
justify-content: flex-end;
}
/* ============================================
COULEURS PRÉDÉFINIES (LOGOS)
============================================ */
/* RÉSEAUX SOCIAUX */
.button-link--bluesky { background: #0085ff; }
.button-link--discord { background: #5865f2; }
.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--linkedin { background: #0a66c2; }
.button-link--mastodon { background: #6364ff; }
.button-link--reddit { background: #ff4500; }
.button-link--signal { background: #3a76f0; }
.button-link--snapchat { background: #fffc00; }
.button-link--snapchat .button-link-text { color: #000; }
.button-link--telegram { background: #0088cc; }
.button-link--tiktok { background: #000000; }
.button-link--twitch { background: #9146ff; }
.button-link--twitter { background: #1da1f2; }
.button-link--x { background: #000000; }
.button-link--youtube { background: #ff0000; }
/* SERVICES */
.button-link--bandcamp { background: #1da0c3; }
.button-link--deezer { background: #ff0092; }
.button-link--gitlab { background: #fc6d26; }
.button-link--soundcloud { background: #ff5500; }
.button-link--spotify { background: #1db954; }
.button-link--steam { background: #171a21; }
/* JEUX */
.button-link--curseforge { background: #f16436; }
.button-link--minecraft { background: #62b47a; }
.button-link--modrinth { background: #1bd96a; }
.button-link--spigot { background: #ed8106; }
/* FINANCEMENT */
.button-link--buymeacoffee { background: #ffdd00; }
.button-link--buymeacoffee .button-link-text { color: #000; }
.button-link--helloasso { background: #4C40CF; }
.button-link--kofi { background: #ff5e5b; }
.button-link--liberapay { background: #f6c915; }
.button-link--liberapay .button-link-text { color: #000; }
.button-link--opencollective { background: #7fadf2; }
.button-link--patreon { background: #ff424d; }
.button-link--paypal { background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%); }
.button-link--qonto { background: #1d1d1d; }
.button-link--stripe { background: #635BFF; }
/* ============================================
ALIGNEMENT
============================================ */
.button-link--align-left {
width: 450px;
max-width: 100%;
margin-right: auto;
margin-left: 0;
}
.button-link--align-center {
width: 450px;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
.button-link--align-right {
width: 450px;
max-width: 100%;
margin-left: auto;
margin-right: 0;
}