Make the Discord login button look like Discord's
All checks were successful
Deploy Palico Bot / check (push) Successful in 10s
Deploy Palico Bot / deploy (push) Successful in 7s

Blurple button with the Discord logo, styled after the one in sokko-g.
The rule now beats `a.btn`, which forced inline-block and broke the
flex layout, and the login panel is a bit wider so the label fits on
one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-29 19:21:23 +01:00
parent 8cf0a8eb5b
commit 3544d89ceb
2 changed files with 37 additions and 5 deletions

View file

@ -45,7 +45,15 @@
<div id="discordLogin" hidden>
<p class="panel__subtitle">Réservé aux membres du serveur Discord.</p>
<a class="btn btn--discord" href="/auth/discord">Se connecter avec Discord</a>
<a class="btn btn--discord" href="/auth/discord">
<svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false">
<path
fill="currentColor"
d="M18.59 5.89a15.6 15.6 0 0 0-3.92-1.23c-.17.3-.37.71-.5 1.04a14.5 14.5 0 0 0-4.34 0 10.6 10.6 0 0 0-.51-1.04c-1.38.24-2.69.66-3.92 1.23-2.48 3.74-3.15 7.39-2.82 10.98a15.7 15.7 0 0 0 4.81 2.46c.39-.53.73-1.1 1.03-1.69a10 10 0 0 1-1.62-.79l.4-.31c3.13 1.46 6.52 1.46 9.61 0l.4.31c-.51.31-1.06.57-1.62.79.3.59.64 1.16 1.03 1.69a15.6 15.6 0 0 0 4.81-2.46c.39-4.17-.67-7.78-2.82-10.98ZM8.84 14.67c-.94 0-1.71-.87-1.71-1.94s.75-1.94 1.71-1.94 1.72.87 1.71 1.94c0 1.06-.75 1.94-1.71 1.94Zm6.31 0c-.94 0-1.71-.87-1.71-1.94s.75-1.94 1.71-1.94 1.72.87 1.71 1.94c0 1.06-.75 1.94-1.71 1.94Z"
/>
</svg>
<span>Se connecter avec Discord</span>
</a>
</div>
<details id="keyLogin" class="key-login">

View file

@ -137,7 +137,7 @@ p {
}
.hero__auth {
max-width: 300px;
max-width: 330px;
}
.pill {
@ -288,13 +288,37 @@ a.btn {
text-align: center;
}
.btn--discord {
/* Bouton aux couleurs de Discord (blurple), avec son logo. */
.btn.btn--discord {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.55rem;
width: 100%;
min-height: 46px;
padding: 0.6rem 0.9rem;
font-size: 0.95rem;
line-height: 1.2;
text-align: center;
border: 1px solid #6f7bff;
border-radius: 10px;
background: #5865f2;
box-shadow: 0 6px 16px rgba(35, 39, 96, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.14);
color: #fff;
font-weight: 700;
text-decoration: none;
}
.btn--discord:hover {
box-shadow: 0 10px 25px rgba(88, 101, 242, 0.4);
.btn.btn--discord svg {
flex: 0 0 24px;
width: 24px;
height: 24px;
}
.btn.btn--discord:hover {
border-color: #7c86ff;
background: #4752c4;
box-shadow: 0 8px 20px rgba(35, 39, 96, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn[aria-pressed="true"] {