add more ux and ui patches with extra login helper
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import Footer from '$lib/components/Footer.svelte';
|
||||
import { homeIcon } from '$lib/components/icons';
|
||||
import { readShortcut, shortcutTarget, type Shortcut } from '$lib/shortcut';
|
||||
|
||||
let shortcut = $state<(Shortcut & { target: string }) | null>(null);
|
||||
|
||||
onMount(() => {
|
||||
const s = readShortcut();
|
||||
if (s) shortcut = { ...s, target: shortcutTarget(s) };
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -11,6 +21,18 @@
|
||||
</svelte:head>
|
||||
|
||||
<main class="landing">
|
||||
{#if shortcut}
|
||||
<a class="return-chip" href={shortcut.target} title="Jump back into {shortcut.famName}">
|
||||
<span class="return-icon">
|
||||
{@html homeIcon}
|
||||
<span class="return-dot"></span>
|
||||
</span>
|
||||
<span class="return-text">
|
||||
<span class="return-fam">{shortcut.famName}</span>
|
||||
<span class="return-sub">Jump back in →</span>
|
||||
</span>
|
||||
</a>
|
||||
{/if}
|
||||
<!-- HERO -->
|
||||
<section class="hero">
|
||||
<div class="hero-inner">
|
||||
@@ -110,6 +132,58 @@
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
/* RETURNING-USER SHORTCUT */
|
||||
.return-chip {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
width: fit-content;
|
||||
padding: 0.45rem 0.9rem 0.45rem 0.55rem;
|
||||
background: #fff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 999px;
|
||||
text-decoration: none;
|
||||
color: #1f2937;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
transition: border-color 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
.return-chip:hover {
|
||||
border-color: #c7d2fe;
|
||||
box-shadow: 0 2px 10px rgba(67, 56, 202, 0.14);
|
||||
}
|
||||
.return-icon {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
color: #4338ca;
|
||||
}
|
||||
.return-dot {
|
||||
position: absolute;
|
||||
right: -3px;
|
||||
bottom: -3px;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
background: #22c55e;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.return-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
line-height: 1.15;
|
||||
}
|
||||
.return-fam {
|
||||
font-weight: 700;
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
.return-sub {
|
||||
font-size: 0.72rem;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
/* HERO */
|
||||
.hero {
|
||||
background: linear-gradient(135deg, #eef2ff 0%, #ffffff 55%, #eef2ff 100%);
|
||||
|
||||
Reference in New Issue
Block a user