Redesign wiki login page with refined guild aesthetic
Replace generic card layout with editorial-style login gate using display typography, gradient divider, scoped CSS with design system tokens, and smooth form-to-confirmation transitions.
This commit is contained in:
parent
ba5cce62fb
commit
b9961409ad
1 changed files with 277 additions and 59 deletions
|
|
@ -31,66 +31,284 @@ async function sendMagicLink() {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen flex items-center justify-center bg-guild-900 px-4">
|
||||
<div class="w-full max-w-sm">
|
||||
<div class="bg-guild-800 rounded-lg shadow-md p-8">
|
||||
<div class="text-center mb-6">
|
||||
<h1 class="text-display-sm font-bold text-candlelight-400 warm-text">Ghost Guild Wiki</h1>
|
||||
<p class="mt-2 text-sm text-guild-400">
|
||||
Sign in with your Ghost Guild account
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<template v-if="!sent">
|
||||
<form @submit.prevent="sendMagicLink" class="space-y-4">
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-guild-300 mb-1">
|
||||
Email address
|
||||
</label>
|
||||
<input
|
||||
id="email"
|
||||
v-model="email"
|
||||
type="email"
|
||||
required
|
||||
placeholder="you@example.com"
|
||||
class="w-full px-3 py-2 border border-guild-600 rounded-md shadow-sm bg-guild-900 text-guild-100 focus:ring-2 focus:ring-candlelight-500 focus:border-candlelight-500 text-sm"
|
||||
:disabled="loading"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<p v-if="error" class="text-sm text-ember-400">{{ error }}</p>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
:disabled="loading || !email"
|
||||
class="w-full py-2 px-4 bg-candlelight-600 text-guild-100 text-sm font-medium rounded-md hover:bg-candlelight-500 focus:outline-none focus:ring-2 focus:ring-candlelight-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>
|
||||
{{ loading ? "Sending..." : "Send magic link" }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="mt-4 text-xs text-center text-guild-500">
|
||||
We'll send a sign-in link to your email.
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<div class="text-center space-y-3">
|
||||
<div class="text-4xl">✉️</div>
|
||||
<h2 class="text-lg font-semibold text-guild-100">Check your email</h2>
|
||||
<p class="text-sm text-guild-400">
|
||||
We sent a sign-in link to <strong>{{ email }}</strong>.
|
||||
Click the link in the email to continue.
|
||||
</p>
|
||||
<button
|
||||
@click="sent = false; email = '';"
|
||||
class="mt-4 text-sm text-candlelight-600 hover:text-candlelight-500"
|
||||
>
|
||||
Use a different email
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="wiki-login">
|
||||
<div class="wiki-login-card">
|
||||
<div class="wiki-login-header">
|
||||
<span class="wiki-login-overline">Ghost Guild</span>
|
||||
<h1 class="wiki-login-title">Wiki</h1>
|
||||
</div>
|
||||
|
||||
<div class="wiki-login-divider" />
|
||||
|
||||
<Transition name="wiki-fade" mode="out-in">
|
||||
<form v-if="!sent" key="form" @submit.prevent="sendMagicLink" class="wiki-login-form">
|
||||
<label for="email" class="wiki-login-label">Email address</label>
|
||||
<input
|
||||
id="email"
|
||||
v-model="email"
|
||||
type="email"
|
||||
required
|
||||
autocomplete="email"
|
||||
placeholder="you@example.com"
|
||||
class="wiki-login-input"
|
||||
:disabled="loading"
|
||||
/>
|
||||
|
||||
<p v-if="error" class="wiki-login-error">{{ error }}</p>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
:disabled="loading || !email"
|
||||
class="wiki-login-button"
|
||||
>
|
||||
<span v-if="loading" class="wiki-login-spinner" />
|
||||
{{ loading ? "Sending" : "Continue" }}
|
||||
</button>
|
||||
|
||||
<p class="wiki-login-hint">
|
||||
We'll email you a sign-in link. No password needed.
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<div v-else key="sent" class="wiki-login-sent">
|
||||
<p class="wiki-login-sent-heading">Check your inbox</p>
|
||||
<p class="wiki-login-sent-detail">
|
||||
A sign-in link was sent to <strong>{{ email }}</strong>
|
||||
</p>
|
||||
<button
|
||||
@click="sent = false; email = '';"
|
||||
class="wiki-login-link"
|
||||
>
|
||||
Try a different email
|
||||
</button>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.wiki-login {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 1.5rem;
|
||||
background:
|
||||
radial-gradient(ellipse at 30% 70%, rgba(184, 135, 58, 0.06) 0%, transparent 60%),
|
||||
radial-gradient(ellipse at 70% 30%, rgba(178, 104, 64, 0.04) 0%, transparent 60%),
|
||||
var(--color-guild-900);
|
||||
}
|
||||
|
||||
.dark .wiki-login {
|
||||
background:
|
||||
radial-gradient(ellipse at 30% 70%, rgba(224, 184, 110, 0.05) 0%, transparent 60%),
|
||||
radial-gradient(ellipse at 70% 30%, rgba(218, 154, 114, 0.03) 0%, transparent 60%),
|
||||
var(--color-guild-900);
|
||||
}
|
||||
|
||||
.wiki-login-card {
|
||||
width: 100%;
|
||||
max-width: 360px;
|
||||
padding: 2.5rem 2rem 2rem;
|
||||
background: var(--color-guild-800);
|
||||
border: 1px solid var(--color-guild-700);
|
||||
border-radius: 12px;
|
||||
box-shadow:
|
||||
0 1px 2px rgba(0, 0, 0, 0.06),
|
||||
0 8px 24px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.dark .wiki-login-card {
|
||||
box-shadow:
|
||||
0 1px 2px rgba(0, 0, 0, 0.2),
|
||||
0 8px 32px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.wiki-login-header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wiki-login-overline {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.6875rem;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: var(--color-guild-400);
|
||||
}
|
||||
|
||||
.wiki-login-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.15;
|
||||
color: var(--color-candlelight-400);
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.wiki-login-divider {
|
||||
height: 1px;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
transparent,
|
||||
var(--color-guild-600),
|
||||
transparent
|
||||
);
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.wiki-login-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.wiki-login-label {
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 500;
|
||||
color: var(--color-guild-300);
|
||||
}
|
||||
|
||||
.wiki-login-input {
|
||||
width: 100%;
|
||||
padding: 0.625rem 0.75rem;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-guild-100);
|
||||
background: var(--color-guild-900);
|
||||
border: 1px solid var(--color-guild-600);
|
||||
border-radius: 8px;
|
||||
outline: none;
|
||||
transition: border-color 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
|
||||
.wiki-login-input::placeholder {
|
||||
color: var(--color-guild-500);
|
||||
}
|
||||
|
||||
.wiki-login-input:focus {
|
||||
border-color: var(--color-candlelight-500);
|
||||
box-shadow: 0 0 0 3px rgba(184, 135, 58, 0.15);
|
||||
}
|
||||
|
||||
.wiki-login-input:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.wiki-login-error {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--color-ember-400);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wiki-login-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
width: 100%;
|
||||
padding: 0.625rem 1rem;
|
||||
margin-top: 0.25rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-guild-50);
|
||||
background: var(--color-candlelight-500);
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, transform 0.1s;
|
||||
}
|
||||
|
||||
.wiki-login-button:hover:not(:disabled) {
|
||||
background: var(--color-candlelight-400);
|
||||
}
|
||||
|
||||
.wiki-login-button:active:not(:disabled) {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.wiki-login-button:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.wiki-login-spinner {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: white;
|
||||
border-radius: 50%;
|
||||
animation: wiki-spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes wiki-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.wiki-login-hint {
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-guild-500);
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wiki-login-sent {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.wiki-login-sent-heading {
|
||||
font-family: var(--font-display);
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-guild-100);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wiki-login-sent-detail {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--color-guild-400);
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wiki-login-sent-detail strong {
|
||||
color: var(--color-guild-200);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.wiki-login-link {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--color-candlelight-500);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
margin-top: 0.5rem;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.wiki-login-link:hover {
|
||||
color: var(--color-candlelight-400);
|
||||
}
|
||||
|
||||
/* Transition */
|
||||
.wiki-fade-enter-active,
|
||||
.wiki-fade-leave-active {
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.wiki-fade-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateY(6px);
|
||||
}
|
||||
|
||||
.wiki-fade-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-6px);
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue