129 lines
3.4 KiB
TypeScript
129 lines
3.4 KiB
TypeScript
import { COMMON_CSS } from "./CommonStyles.ts";
|
|
|
|
export const Layout = ({
|
|
children,
|
|
title,
|
|
}: {
|
|
children: any;
|
|
title: string;
|
|
}) => {
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<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>
|
|
<style>
|
|
{`
|
|
${COMMON_CSS}
|
|
|
|
.auth-layout-wrapper {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 1.5rem 1rem;
|
|
}
|
|
|
|
.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>
|
|
<script src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js">
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="auth-layout-wrapper">
|
|
<div class="auth-card">
|
|
{children}
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
};
|