feat(ui): implement design tokens and mobile-first adaptive navigation shell
This commit is contained in:
parent
8e7efcc1d1
commit
029c32e022
@ -1,3 +1,5 @@
|
|||||||
|
import { COMMON_CSS } from "./CommonStyles.ts";
|
||||||
|
|
||||||
export const AdminLayout = ({
|
export const AdminLayout = ({
|
||||||
children,
|
children,
|
||||||
title,
|
title,
|
||||||
@ -7,8 +9,7 @@ export const AdminLayout = ({
|
|||||||
title: string;
|
title: string;
|
||||||
currentPath: string;
|
currentPath: string;
|
||||||
}) => {
|
}) => {
|
||||||
const navItems = [
|
const adminNavItems = [
|
||||||
{ label: "← User Dashboard", href: "/dashboard" },
|
|
||||||
{ label: "Users", href: "/admin/users" },
|
{ label: "Users", href: "/admin/users" },
|
||||||
{ label: "Applications", href: "/admin/apps" },
|
{ label: "Applications", href: "/admin/apps" },
|
||||||
{ label: "Roles", href: "/admin/roles" },
|
{ label: "Roles", href: "/admin/roles" },
|
||||||
@ -21,167 +22,200 @@ export const AdminLayout = ({
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||||
|
/>
|
||||||
|
<meta name="theme-color" content="#0f172a" />
|
||||||
<title>{title} - Auth-Yes Admin</title>
|
<title>{title} - Auth-Yes Admin</title>
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
body {
|
${COMMON_CSS}
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
||||||
background: #f4f6f8;
|
.admin-shell {
|
||||||
margin: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
.header {
|
|
||||||
background: #343a40;
|
/* Admin Top Header */
|
||||||
color: white;
|
.admin-header {
|
||||||
border-bottom: 1px solid #23272b;
|
background-color: var(--surface-card);
|
||||||
padding: 1rem 2rem;
|
border-bottom: 1px solid var(--border-subtle);
|
||||||
|
padding: 0.75rem 1.25rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
box-shadow: var(--shadow-sm);
|
||||||
}
|
}
|
||||||
.header h1 {
|
|
||||||
margin: 0;
|
.admin-brand {
|
||||||
font-size: 1.25rem;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
.nav {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1.5rem;
|
align-items: center;
|
||||||
}
|
gap: 0.75rem;
|
||||||
.nav a {
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #adb5bd;
|
color: var(--text-primary);
|
||||||
font-weight: 500;
|
font-weight: 700;
|
||||||
padding: 0.5rem 0;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
.nav a:hover {
|
|
||||||
color: #ffffff;
|
.admin-badge {
|
||||||
|
background-color: #0f172a;
|
||||||
|
color: #38bdf8;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 0.2rem 0.5rem;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
.nav a.active {
|
|
||||||
color: #ffffff;
|
/* Sub-Navigation Pill Strip */
|
||||||
border-bottom: 2px solid #ffffff;
|
.admin-nav-bar {
|
||||||
|
background-color: var(--surface-card);
|
||||||
|
border-bottom: 1px solid var(--border-subtle);
|
||||||
|
padding: 0.5rem 1.25rem;
|
||||||
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.main-content {
|
|
||||||
|
.admin-nav-bar::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-nav-item {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0.4rem 0.85rem;
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-nav-item:hover {
|
||||||
|
background-color: var(--surface-muted);
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-nav-item.active {
|
||||||
|
background-color: var(--primary-light);
|
||||||
|
color: var(--primary);
|
||||||
|
border-color: var(--primary-ring);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Admin Main Container */
|
||||||
|
.admin-main-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 2rem;
|
width: 100%;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
padding: 1.5rem 1rem;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.card {
|
|
||||||
background: white;
|
@media (min-width: 768px) {
|
||||||
padding: 1.5rem;
|
.admin-header {
|
||||||
border-radius: 8px;
|
padding: 0.75rem 2rem;
|
||||||
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
}
|
||||||
margin-bottom: 1.5rem;
|
.admin-nav-bar {
|
||||||
border: 1px solid #e9ecef;
|
padding: 0.5rem 2rem;
|
||||||
}
|
}
|
||||||
h2 {
|
.admin-main-content {
|
||||||
margin-top: 0;
|
padding: 2.5rem 2rem;
|
||||||
color: #343a40;
|
}
|
||||||
font-size: 1.25rem;
|
|
||||||
border-bottom: 1px solid #e9ecef;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Table Styles */
|
||||||
.table-container {
|
.table-container {
|
||||||
|
width: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
|
||||||
th, td {
|
|
||||||
padding: 0.75rem;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-bottom: 1px solid #dee2e6;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 0.85rem 1rem;
|
||||||
|
border-bottom: 1px solid var(--border-subtle);
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background: #f8f9fa;
|
background-color: var(--surface-muted);
|
||||||
|
color: var(--text-secondary);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #495057;
|
|
||||||
}
|
}
|
||||||
.btn-action {
|
|
||||||
background: #e9ecef;
|
tr:last-child td {
|
||||||
color: #495057;
|
border-bottom: none;
|
||||||
border: 1px solid #ced4da;
|
|
||||||
padding: 0.3rem 0.6rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
margin-right: 0.5rem;
|
|
||||||
}
|
}
|
||||||
.btn-action:hover {
|
|
||||||
background: #dee2e6;
|
|
||||||
}
|
|
||||||
.btn-success {
|
|
||||||
background: #28a745;
|
|
||||||
color: white;
|
|
||||||
border: 1px solid #28a745;
|
|
||||||
}
|
|
||||||
.btn-success:hover { background: #218838; }
|
|
||||||
.btn-warning {
|
|
||||||
background: #ffc107;
|
|
||||||
color: #212529;
|
|
||||||
border: 1px solid #ffc107;
|
|
||||||
}
|
|
||||||
.btn-warning:hover { background: #e0a800; }
|
|
||||||
.badge {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0.25em 0.4em;
|
|
||||||
font-size: 75%;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
vertical-align: baseline;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
}
|
|
||||||
.badge-active { background-color: #28a745; color: white; }
|
|
||||||
.badge-pending { background-color: #ffc107; color: #212529; }
|
|
||||||
.badge-suspended { background-color: #dc3545; color: white; }
|
|
||||||
pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; font-size: 0.8rem; }
|
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="header">
|
<div class="admin-shell">
|
||||||
<div style="display: flex; align-items: center; gap: 2rem;">
|
{/* Top Header */}
|
||||||
<h1>Auth-Yes Admin Console</h1>
|
<header class="admin-header">
|
||||||
<nav class="nav">
|
<div style="display: flex; align-items: center; gap: 0.75rem;">
|
||||||
{navItems.map((item) => {
|
<a href="/dashboard" class="admin-brand">
|
||||||
const isActive = currentPath === item.href;
|
<span>Auth-Yes</span>
|
||||||
return (
|
<span class="admin-badge">Admin</span>
|
||||||
<a
|
</a>
|
||||||
href={item.href}
|
</div>
|
||||||
class={isActive ? "active" : ""}
|
|
||||||
>
|
|
||||||
{item.label}
|
|
||||||
</a>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
<div style="display: flex; align-items: center; gap: 1rem;">
|
|
||||||
<a
|
|
||||||
href="/logout"
|
|
||||||
class="btn-action btn-warning"
|
|
||||||
style="text-decoration: none; padding: 0.35rem 0.8rem; font-size: 0.85rem; border-radius: 4px;"
|
|
||||||
>
|
|
||||||
Logout
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="main-content">
|
<div style="display: flex; align-items: center; gap: 0.75rem;">
|
||||||
{children}
|
<a
|
||||||
</main>
|
href="/dashboard"
|
||||||
|
class="btn-outline"
|
||||||
|
style="padding: 0.35rem 0.75rem; font-size: 0.85rem; min-height: 36px; text-decoration: none;"
|
||||||
|
>
|
||||||
|
← User Hub
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
href="/logout"
|
||||||
|
class="btn-danger"
|
||||||
|
style="padding: 0.35rem 0.75rem; font-size: 0.85rem; min-height: 36px; text-decoration: none;"
|
||||||
|
>
|
||||||
|
Logout
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{/* Sub-Nav Scroller */}
|
||||||
|
<nav class="admin-nav-bar">
|
||||||
|
{adminNavItems.map((item) => {
|
||||||
|
const isActive = currentPath === item.href ||
|
||||||
|
currentPath.startsWith(item.href + "/");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
href={item.href}
|
||||||
|
class={`admin-nav-item ${isActive ? "active" : ""}`}
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{/* Main Content */}
|
||||||
|
<main class="admin-main-content">
|
||||||
|
{children}
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import { COMMON_CSS } from "./CommonStyles.ts";
|
||||||
|
|
||||||
export const AuthenticatedLayout = ({
|
export const AuthenticatedLayout = ({
|
||||||
children,
|
children,
|
||||||
title,
|
title,
|
||||||
@ -10,151 +12,243 @@ export const AuthenticatedLayout = ({
|
|||||||
isAdmin?: boolean;
|
isAdmin?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{ label: "Launchpad", href: "/dashboard" },
|
{
|
||||||
{ label: "Sessions", href: "/dashboard/sessions" },
|
label: "Launchpad",
|
||||||
{ label: "Passkeys", href: "/dashboard/passkeys" },
|
href: "/dashboard",
|
||||||
...(isAdmin ? [{ label: "Admin Console", href: "/admin/users" }] : []),
|
icon:
|
||||||
|
`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"></path><path d="m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"></path><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"></path><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"></path></svg>`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Sessions",
|
||||||
|
href: "/dashboard/sessions",
|
||||||
|
icon:
|
||||||
|
`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg>`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Passkeys",
|
||||||
|
href: "/dashboard/passkeys",
|
||||||
|
icon:
|
||||||
|
`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg>`,
|
||||||
|
},
|
||||||
|
...(isAdmin
|
||||||
|
? [{
|
||||||
|
label: "Admin",
|
||||||
|
href: "/admin/users",
|
||||||
|
icon:
|
||||||
|
`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>`,
|
||||||
|
}]
|
||||||
|
: []),
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||||
|
/>
|
||||||
|
<meta name="theme-color" content="#0066cc" />
|
||||||
<title>{title} - Auth-Yes</title>
|
<title>{title} - Auth-Yes</title>
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
body {
|
${COMMON_CSS}
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
||||||
background: #f8f9fa;
|
/* Layout Shell */
|
||||||
margin: 0;
|
.app-shell {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
.header {
|
|
||||||
background: #ffffff;
|
/* Top App Bar */
|
||||||
border-bottom: 1px solid #e9ecef;
|
.top-bar {
|
||||||
padding: 1rem 2rem;
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 40;
|
||||||
|
background-color: var(--surface-card);
|
||||||
|
border-bottom: 1px solid var(--border-subtle);
|
||||||
|
padding: 0.75rem 1.25rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
box-shadow: var(--shadow-sm);
|
||||||
}
|
}
|
||||||
.header h1 {
|
|
||||||
margin: 0;
|
.brand {
|
||||||
font-size: 1.25rem;
|
|
||||||
color: #212529;
|
|
||||||
}
|
|
||||||
.nav {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1.5rem;
|
align-items: center;
|
||||||
}
|
gap: 0.65rem;
|
||||||
.nav a {
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #495057;
|
color: var(--text-primary);
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-badge {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
background: var(--primary);
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Desktop Navigation */
|
||||||
|
.desktop-nav {
|
||||||
|
display: none;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin-left: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desktop-nav a {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.4rem;
|
||||||
|
padding: 0.5rem 0.9rem;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--text-secondary);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
padding: 0.5rem 0;
|
font-size: 0.9rem;
|
||||||
|
transition: all 0.15s ease;
|
||||||
}
|
}
|
||||||
.nav a:hover {
|
|
||||||
color: #007bff;
|
.desktop-nav a:hover {
|
||||||
|
background-color: var(--surface-muted);
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
.nav a.active {
|
|
||||||
color: #007bff;
|
.desktop-nav a.active {
|
||||||
border-bottom: 2px solid #007bff;
|
background-color: var(--primary-light);
|
||||||
|
color: var(--primary);
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.logout-btn {
|
|
||||||
background: none;
|
.header-actions {
|
||||||
border: 1px solid #dc3545;
|
display: flex;
|
||||||
color: #dc3545;
|
align-items: center;
|
||||||
padding: 0.4rem 1rem;
|
gap: 0.75rem;
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
.logout-btn:hover {
|
|
||||||
background: #dc3545;
|
.logout-link {
|
||||||
color: white;
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.35rem;
|
||||||
|
padding: 0.45rem 0.85rem;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--danger);
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
border: 1px solid var(--danger-border);
|
||||||
|
background: var(--danger-bg);
|
||||||
|
transition: all 0.15s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logout-link:hover {
|
||||||
|
background: var(--danger);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main Content Container */
|
||||||
.main-content {
|
.main-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 2rem;
|
|
||||||
max-width: 1000px;
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 1100px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 1.5rem 1rem calc(5.5rem + env(safe-area-inset-bottom)) 1rem;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.card {
|
|
||||||
background: white;
|
/* Mobile Bottom Navigation Bar */
|
||||||
padding: 1.5rem;
|
.mobile-bottom-nav {
|
||||||
border-radius: 8px;
|
position: fixed;
|
||||||
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
bottom: 0;
|
||||||
margin-bottom: 1.5rem;
|
left: 0;
|
||||||
border: 1px solid #e9ecef;
|
right: 0;
|
||||||
|
z-index: 50;
|
||||||
|
background-color: var(--surface-card);
|
||||||
|
border-top: 1px solid var(--border-subtle);
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom)) 0;
|
||||||
|
box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
h2 {
|
|
||||||
margin-top: 0;
|
.mobile-bottom-nav a {
|
||||||
color: #343a40;
|
display: flex;
|
||||||
font-size: 1.25rem;
|
flex-direction: column;
|
||||||
border-bottom: 1px solid #e9ecef;
|
align-items: center;
|
||||||
padding-bottom: 0.5rem;
|
justify-content: center;
|
||||||
margin-bottom: 1rem;
|
gap: 0.2rem;
|
||||||
|
color: var(--text-muted);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 0.35rem 0.75rem;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
min-width: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mobile-bottom-nav a.active {
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-bottom-nav a.active svg {
|
||||||
|
stroke: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Desktop Responsive Rules */
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.desktop-nav {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.mobile-bottom-nav {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.main-content {
|
||||||
|
padding: 2.5rem 2rem;
|
||||||
|
}
|
||||||
|
.top-bar {
|
||||||
|
padding: 0.75rem 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tables Responsive Scroller */
|
||||||
.table-container {
|
.table-container {
|
||||||
|
width: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
|
||||||
th, td {
|
|
||||||
padding: 0.75rem;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-bottom: 1px solid #dee2e6;
|
|
||||||
}
|
}
|
||||||
th {
|
|
||||||
background: #f8f9fa;
|
th, td {
|
||||||
font-weight: 600;
|
padding: 0.85rem 1rem;
|
||||||
color: #495057;
|
border-bottom: 1px solid var(--border-subtle);
|
||||||
}
|
|
||||||
.btn-danger {
|
|
||||||
background: #dc3545;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 0.4rem 0.8rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 0.875rem;
|
|
||||||
}
|
|
||||||
.btn-danger:hover {
|
|
||||||
background: #c82333;
|
|
||||||
}
|
|
||||||
.btn-primary {
|
|
||||||
background: #007bff;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.btn-primary:hover {
|
|
||||||
background: #0069d9;
|
th {
|
||||||
|
background-color: var(--surface-muted);
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.badge {
|
|
||||||
display: inline-block;
|
tr:last-child td {
|
||||||
padding: 0.25em 0.4em;
|
border-bottom: none;
|
||||||
font-size: 75%;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
vertical-align: baseline;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
}
|
}
|
||||||
.badge-success { background-color: #28a745; color: white; }
|
|
||||||
.badge-info { background-color: #17a2b8; color: white; }
|
|
||||||
.badge-secondary { background-color: #6c757d; color: white; }
|
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
<script src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js">
|
<script src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js">
|
||||||
@ -162,9 +256,77 @@ export const AuthenticatedLayout = ({
|
|||||||
<script src="/public/auth-client.js?v=5"></script>
|
<script src="/public/auth-client.js?v=5"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="header">
|
<div class="app-shell">
|
||||||
<h1>Identity Provider</h1>
|
{/* Top Header */}
|
||||||
<nav class="nav">
|
<header class="top-bar">
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<a href="/dashboard" class="brand">
|
||||||
|
<span class="brand-badge">AY</span>
|
||||||
|
<span>Auth-Yes</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{/* Desktop Nav Links */}
|
||||||
|
<nav class="desktop-nav">
|
||||||
|
{navItems.map((item) => {
|
||||||
|
const isActive = item.href === "/dashboard"
|
||||||
|
? currentPath === "/dashboard"
|
||||||
|
: currentPath.startsWith(item.href) &&
|
||||||
|
item.href !== "/dashboard";
|
||||||
|
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
href={item.href}
|
||||||
|
class={isActive ? "active" : ""}
|
||||||
|
>
|
||||||
|
<span dangerouslySetInnerHTML={{ __html: item.icon }} />
|
||||||
|
<span>{item.label}</span>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header-actions">
|
||||||
|
{isAdmin && (
|
||||||
|
<a
|
||||||
|
href="/admin/users"
|
||||||
|
class="btn-primary"
|
||||||
|
style="padding: 0.4rem 0.85rem; font-size: 0.85rem; min-height: 36px; text-decoration: none;"
|
||||||
|
>
|
||||||
|
Admin Console
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
<a
|
||||||
|
href="/logout"
|
||||||
|
class="logout-link"
|
||||||
|
title="Sign out of your session"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
||||||
|
<polyline points="16 17 21 12 16 7"></polyline>
|
||||||
|
<line x1="21" x2="9" y1="12" y2="12"></line>
|
||||||
|
</svg>
|
||||||
|
<span>Logout</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{/* Main Body */}
|
||||||
|
<main class="main-content">
|
||||||
|
{children}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{/* Mobile Bottom Navigation Bar */}
|
||||||
|
<nav class="mobile-bottom-nav">
|
||||||
{navItems.map((item) => {
|
{navItems.map((item) => {
|
||||||
const isActive = item.href === "/dashboard"
|
const isActive = item.href === "/dashboard"
|
||||||
? currentPath === "/dashboard"
|
? currentPath === "/dashboard"
|
||||||
@ -176,45 +338,13 @@ export const AuthenticatedLayout = ({
|
|||||||
href={item.href}
|
href={item.href}
|
||||||
class={isActive ? "active" : ""}
|
class={isActive ? "active" : ""}
|
||||||
>
|
>
|
||||||
{item.label}
|
<span dangerouslySetInnerHTML={{ __html: item.icon }} />
|
||||||
|
<span>{item.label}</span>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
<div
|
</div>
|
||||||
style={{
|
|
||||||
marginLeft: "auto",
|
|
||||||
marginRight: "1rem",
|
|
||||||
display: "flex",
|
|
||||||
gap: "1rem",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{isAdmin && (
|
|
||||||
<a
|
|
||||||
href="/admin"
|
|
||||||
class="btn-primary"
|
|
||||||
style={{ textDecoration: "none" }}
|
|
||||||
>
|
|
||||||
Admin Console
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
<a
|
|
||||||
href="/logout"
|
|
||||||
class="logout-btn"
|
|
||||||
style={{
|
|
||||||
textDecoration: "none",
|
|
||||||
display: "inline-block",
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Logout
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
{children}
|
|
||||||
</main>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
186
ui/components/CommonStyles.ts
Normal file
186
ui/components/CommonStyles.ts
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
export const COMMON_CSS = `
|
||||||
|
:root {
|
||||||
|
/* Brand & Accents */
|
||||||
|
--primary: #0066cc;
|
||||||
|
--primary-hover: #0052a3;
|
||||||
|
--primary-active: #003d7a;
|
||||||
|
--primary-light: #e6f0fa;
|
||||||
|
--primary-ring: rgba(0, 102, 204, 0.25);
|
||||||
|
|
||||||
|
/* Neutrals & Surfaces */
|
||||||
|
--surface-canvas: #f8fafc;
|
||||||
|
--surface-card: #ffffff;
|
||||||
|
--surface-muted: #f1f5f9;
|
||||||
|
--border-subtle: #e2e8f0;
|
||||||
|
--border-strong: #cbd5e1;
|
||||||
|
|
||||||
|
/* Typography */
|
||||||
|
--text-primary: #0f172a;
|
||||||
|
--text-secondary: #475569;
|
||||||
|
--text-muted: #94a3b8;
|
||||||
|
|
||||||
|
/* Semantic Feedback */
|
||||||
|
--success: #10b981;
|
||||||
|
--success-bg: #ecfdf5;
|
||||||
|
--success-border: #a7f3d0;
|
||||||
|
--success-text: #065f46;
|
||||||
|
--warning: #f59e0b;
|
||||||
|
--warning-bg: #fffbeb;
|
||||||
|
--warning-border: #fde68a;
|
||||||
|
--warning-text: #92400e;
|
||||||
|
--danger: #ef4444;
|
||||||
|
--danger-bg: #fef2f2;
|
||||||
|
--danger-border: #fecaca;
|
||||||
|
--danger-text: #991b1b;
|
||||||
|
--info: #0284c7;
|
||||||
|
--info-bg: #f0f9ff;
|
||||||
|
--info-border: #bae6fd;
|
||||||
|
--info-text: #0369a1;
|
||||||
|
|
||||||
|
/* Geometry & Spacing */
|
||||||
|
--radius-sm: 6px;
|
||||||
|
--radius-md: 10px;
|
||||||
|
--radius-lg: 16px;
|
||||||
|
--radius-full: 9999px;
|
||||||
|
--touch-target-min: 48px;
|
||||||
|
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
||||||
|
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||||
|
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--surface-canvas: #0b0f19;
|
||||||
|
--surface-card: #111827;
|
||||||
|
--surface-muted: #1e293b;
|
||||||
|
--border-subtle: #1f2937;
|
||||||
|
--border-strong: #374151;
|
||||||
|
|
||||||
|
--text-primary: #f8fafc;
|
||||||
|
--text-secondary: #cbd5e1;
|
||||||
|
--text-muted: #64748b;
|
||||||
|
|
||||||
|
--primary-light: #172554;
|
||||||
|
--success-bg: #064e3b;
|
||||||
|
--success-border: #065f46;
|
||||||
|
--success-text: #6ee7b7;
|
||||||
|
--warning-bg: #451a03;
|
||||||
|
--warning-border: #78350f;
|
||||||
|
--warning-text: #fcd34d;
|
||||||
|
--danger-bg: #450a0a;
|
||||||
|
--danger-border: #7f1d1d;
|
||||||
|
--danger-text: #fca5a5;
|
||||||
|
--info-bg: #082f49;
|
||||||
|
--info-border: #075985;
|
||||||
|
--info-text: #7dd3fc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
background-color: var(--surface-canvas);
|
||||||
|
color: var(--text-primary);
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Common interactive components */
|
||||||
|
button, .btn {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 600;
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 0.6rem 1.2rem;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
border: 1px solid transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
transition: all 0.15s ease-in-out;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active, .btn:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--primary);
|
||||||
|
color: #ffffff;
|
||||||
|
border-color: var(--primary);
|
||||||
|
}
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: var(--primary-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
background-color: var(--danger);
|
||||||
|
color: #ffffff;
|
||||||
|
border-color: var(--danger);
|
||||||
|
}
|
||||||
|
.btn-danger:hover {
|
||||||
|
background-color: #dc2626;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline {
|
||||||
|
background-color: transparent;
|
||||||
|
color: var(--text-primary);
|
||||||
|
border-color: var(--border-strong);
|
||||||
|
}
|
||||||
|
.btn-outline:hover {
|
||||||
|
background-color: var(--surface-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
input, select, textarea {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 1rem;
|
||||||
|
min-height: 48px;
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
background-color: var(--surface-card);
|
||||||
|
color: var(--text-primary);
|
||||||
|
width: 100%;
|
||||||
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus, select:focus, textarea:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--primary);
|
||||||
|
box-shadow: 0 0 0 3px var(--primary-ring);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: var(--surface-card);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
padding: 1.5rem;
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.35rem;
|
||||||
|
padding: 0.25rem 0.65rem;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: var(--radius-full);
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
|
||||||
|
.badge-warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
|
||||||
|
.badge-danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
|
||||||
|
.badge-info { background: var(--info-bg); color: var(--info-text); border: 1px solid var(--info-border); }
|
||||||
|
.badge-secondary { background: var(--surface-muted); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
|
||||||
|
`;
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
import { COMMON_CSS } from "./CommonStyles.ts";
|
||||||
|
|
||||||
export const Layout = ({
|
export const Layout = ({
|
||||||
children,
|
children,
|
||||||
title,
|
title,
|
||||||
@ -9,28 +11,117 @@ export const Layout = ({
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta
|
||||||
<title>{title}</title>
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||||
|
/>
|
||||||
|
<meta name="theme-color" content="#0066cc" />
|
||||||
|
<title>{title} - Auth-Yes</title>
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
body { font-family: sans-serif; background: #f4f4f9; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
|
${COMMON_CSS}
|
||||||
.container { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); width: 100%; max-width: 400px; }
|
|
||||||
h1 { font-size: 1.5rem; margin-bottom: 1rem; color: #333; text-align: center; }
|
.auth-layout-wrapper {
|
||||||
input { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
|
min-height: 100vh;
|
||||||
button { width: 100%; padding: 0.75rem; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
|
display: flex;
|
||||||
button:hover { background: #0056b3; }
|
flex-direction: column;
|
||||||
.error { color: red; font-size: 0.875rem; margin-top: 0.5rem; text-align: center; }
|
justify-content: center;
|
||||||
.success { color: green; font-size: 0.875rem; margin-top: 0.5rem; text-align: center; }
|
align-items: center;
|
||||||
.links { margin-top: 1rem; text-align: center; font-size: 0.875rem; }
|
padding: 1.5rem 1rem;
|
||||||
.links a { color: #007bff; text-decoration: none; }
|
}
|
||||||
.links a:hover { text-decoration: underline; }
|
|
||||||
|
.auth-card {
|
||||||
|
background-color: var(--surface-card);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
padding: 2.25rem 1.75rem;
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
width: 100%;
|
||||||
|
max-width: 440px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-logo {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
background: var(--primary-light);
|
||||||
|
color: var(--primary);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 0.5rem 0;
|
||||||
|
color: var(--text-primary);
|
||||||
|
letter-spacing: -0.025em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 0.95rem;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: var(--danger);
|
||||||
|
background-color: var(--danger-bg);
|
||||||
|
border: 1px solid var(--danger-border);
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
font-size: 0.875rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success {
|
||||||
|
color: var(--success-text);
|
||||||
|
background-color: var(--success-bg);
|
||||||
|
border: 1px solid var(--success-border);
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
font-size: 0.875rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links {
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.links a {
|
||||||
|
color: var(--primary);
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
<script src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js">
|
<script src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js">
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">{children}</div>
|
<div class="auth-layout-wrapper">
|
||||||
|
<div class="auth-card">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user