You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
3.6 KiB

<!--
Shared auth shell — split layout on desktop (form left, brand
gradient right), single column on mobile. Both halves stay simple
and high-contrast: no busy backgrounds, no decorative noise.
-->
<script lang="ts">
import type { Snippet } from 'svelte';
interface Props {
title: string;
subtitle?: string;
children: Snippet;
footer?: Snippet;
}
let { title, subtitle, children, footer }: Props = $props();
</script>
<section class="auth-shell">
<div class="auth-form-side">
<div class="form-stack">
<a class="brand" href="/dating">
<span class="brand-mark" aria-hidden="true">N</span>
<span class="brand-text">Nexo</span>
</a>
<header>
<h1 class="nx-h1">{title}</h1>
{#if subtitle}<p class="sub">{subtitle}</p>{/if}
</header>
<div class="body">
{@render children()}
</div>
{#if footer}
<footer class="auth-foot">
{@render footer()}
</footer>
{/if}
</div>
</div>
<aside class="auth-art" aria-hidden="true">
<div class="art-grid">
<div class="art-quote">
<p>“La diferencia está en el primer mensaje.”</p>
<span>— Nexo</span>
</div>
</div>
</aside>
</section>
<style>
.auth-shell {
min-height: 100vh;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
background: var(--nx-bg);
}
.auth-form-side {
display: flex;
align-items: center;
justify-content: center;
padding: 48px 32px;
min-width: 0;
}
.form-stack {
width: 100%;
max-width: 420px;
display: flex;
flex-direction: column;
gap: 28px;
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: inherit;
}
.brand-mark {
display: grid;
place-items: center;
width: 32px;
height: 32px;
border-radius: var(--nx-radius-md);
background: var(--nx-accent);
color: var(--nx-accent-fg);
font-weight: 700;
font-size: 14px;
}
.brand-text {
font-weight: 600;
font-size: var(--nx-text-md);
letter-spacing: -0.015em;
}
header {
display: flex;
flex-direction: column;
gap: 6px;
}
.sub {
margin: 0;
font-size: var(--nx-text-sm);
color: var(--nx-fg-muted);
line-height: 1.55;
}
.body {
display: flex;
flex-direction: column;
}
.auth-foot {
font-size: var(--nx-text-sm);
color: var(--nx-fg-muted);
padding-top: 12px;
border-top: 1px solid var(--nx-border);
display: flex;
flex-wrap: wrap;
gap: 16px;
}
.auth-foot :global(a) {
color: var(--nx-fg);
font-weight: 500;
text-decoration: none;
}
.auth-foot :global(a:hover) {
color: var(--nx-accent);
}
.auth-art {
background: linear-gradient(
140deg,
color-mix(in srgb, var(--nx-accent) 10%, var(--nx-bg-sunken)),
var(--nx-bg-sunken)
),
var(--nx-bg-sunken);
display: grid;
place-items: center;
padding: 48px;
position: relative;
overflow: hidden;
border-left: 1px solid var(--nx-border);
}
.art-grid {
max-width: 360px;
display: flex;
flex-direction: column;
gap: 24px;
}
.art-quote {
padding: 28px;
border: 1px solid var(--nx-border);
border-radius: var(--nx-radius-lg);
background: var(--nx-bg-elevated);
box-shadow: var(--nx-shadow-md);
}
.art-quote p {
font-family: var(--nx-font-display);
font-size: var(--nx-text-xl);
font-weight: 500;
letter-spacing: -0.01em;
line-height: 1.35;
margin: 0 0 12px;
color: var(--nx-fg);
}
.art-quote span {
font-size: var(--nx-text-xs);
color: var(--nx-fg-muted);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
}
@media (max-width: 900px) {
.auth-shell {
grid-template-columns: 1fr;
}
.auth-art {
display: none;
}
.auth-form-side {
padding: 32px 24px;
}
}
</style>

Powered by TurnKey Linux.