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.

79 lines
2.1 KiB

Nexo desktop-first redesign + demo restructure Move servers/dating → demos/dating/server and the dating route's co-located _components/_lib/_design assets → demos/dating/web. Single `npm run dating:dev` boots both server and web via concurrently. Replace the warm-paper / raspberry-pink Claude Design adaptation with a sober desktop-first system: - Tokens: slate neutrals + violet accent, Inter family, dark mode via prefers-color-scheme + explicit data-theme. - Inline SVG icon set (Icon.svelte, Feather-style) — no Unicode glyph placeholders. - Layout shell: 240px rail nav on desktop, bottom tab bar on mobile; auth + onboarding own their own shell. - Discover: square photo carousel (dots + chevrons), name/age/location overlay, action buttons floating off the photo edge, sticky context panel on desktop. - Matches: clean conversation list with unread dot + chevron-on-hover. - Chat: 3-column on desktop (threads + thread + match context), 2-col on tablet, single thread on mobile. Day separators, retry/dismiss on failed messages, autogrow composer with Enter-to-send. - Profile: sticky hero card + 3-section form, dirty/saved indicator. - Photos: dropzone + grid with hover-only cell toolbar (set primary, reorder, delete). - Onboarding: sidebar stepper (320px) + content panel. - Auth: split layout (form left, brand quote right) on ≥900px. Server boot: env loader's repo-root resolution corrected after the move (../../.. instead of ../..) so .env.local at the repo root is picked up again. Hoist BRAND.md and SECURITY.md into docs/, drop superseded audit notes that were already closed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
<!--
Bottom-tab navigation for the product surface (Discover, Matches,
Profile, Safety). Sticks to the bottom on mobile, becomes a centered
pill on desktop. The visual styling lives in the Nexo design system
(`.nx-tabbar` / `.nx-tab`); this file only owns the data and active
state derivation.
-->
<script lang="ts">
import { page } from '$app/state';
import { goto } from '$app/navigation';
import { getNexoContext } from '../_lib/context';
const nexo = getNexoContext();
const items = [
{ href: '/dating/discover', label: 'Descubre', icon: '✦' },
{ href: '/dating/matches', label: 'Matches', icon: '♡' },
{ href: '/dating/profile', label: 'Perfil', icon: '◔' },
{ href: '/dating/safety', label: 'Seguridad', icon: '⚐' }
] as const;
function isCurrent(href: string): boolean {
return page.url.pathname === href || page.url.pathname.startsWith(`${href}/`);
}
async function logout() {
try {
await nexo.api.logout();
} finally {
nexo.setSession({ authenticated: false });
await goto('/dating/login', { replaceState: true });
}
}
</script>
<nav class="nx-tabbar appnav-frame" aria-label="Nexo">
{#each items as item (item.href)}
<a
class="nx-tab"
href={item.href}
aria-current={isCurrent(item.href) ? 'page' : undefined}
>
<span class="ico" aria-hidden="true">{item.icon}</span>
<span class="label">{item.label}</span>
</a>
{/each}
<button type="button" class="nx-tab logout" onclick={logout}>
<span class="ico" aria-hidden="true">⏻</span>
<span class="label">Salir</span>
</button>
</nav>
<style>
/* The primitives' .nx-tabbar uses 4 columns; we have 5 cells once
"Salir" is added, so override the grid here. */
.appnav-frame {
grid-template-columns: repeat(5, 1fr);
max-width: 36rem;
margin: 0 auto;
}
.ico {
font-size: 1.1rem;
line-height: 1;
}
.logout {
opacity: 0.65;
}
.logout:hover {
opacity: 1;
}
/* Desktop replaces this bottom tab bar with the layout's left
rail. Hiding here keeps the page chrome from doubling up. */
@media (min-width: 1024px) {
.appnav-frame {
display: none;
}
}
</style>

Powered by TurnKey Linux.