start building dashboard

This commit is contained in:
2023-08-04 17:39:04 -07:00
parent 811629eda9
commit 7c205632cb
18 changed files with 389 additions and 43 deletions

View File

@@ -0,0 +1,21 @@
<!doctype html>
<html>
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css" href="/themes.css">
<link rel="stylesheet" type="text/css" href="/typography.css">
</head>
<body>
<form action="/login" method="POST">
<button type="submit">Login with OpenID Connect</button>
</form>
{{# error_code }}
<div>
<h4>Login failed</h4>
<b>Error Code:</b> {{ error_code }}<br />
<b>Error Message:</b> {{ error.message }}
</div>
{{/ error_code }}
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<title>Dashboard</title>
<link rel="stylesheet" type="text/css" href="/themes.css">
<link rel="stylesheet" type="text/css" href="/typography.css">
</head>
<body>
<h1>Dashboard</h1>
{{# user }}
<p>Logged in as {{ user.name }} ({{ user.username }})</p>
<form action="/logout" method="POST">
<button type="submit">Logout</button>
</form>
{{/ user }}
{{^ user }}
<a href="/login">Login Page</a>
{{/ user }}
</body>
</html>

View File

@@ -0,0 +1,78 @@
:root {
color-scheme: light dark;
}
{{! ===== Default Themes ===== }}
body {
{{> default_light }}
}
body[data-color-scheme='dark'] {
{{> default_dark }}
}
@media (prefers-color-scheme: dark) {
body {
{{> default_dark }}
}
body[data-color-scheme='light'] {
{{> default_light }}
}
}
{{! ===== High Contrast Themes ===== }}
{{# more_contrast }}
@media (prefers-contrast: more) {
body {
{{> more_contrast_light }}
}
body[data-color-scheme='dark'] {
{{> more_contrast_dark }}
}
@media (prefers-color-scheme: dark) {
body {
{{> more_contrast_dark }}
}
body[data-color-scheme='light'] {
{{> more_contrast_light }}
}
}
}
{{/ more_contrast }}
{{! ===== Low Contrast Themes ===== }}
{{# less_contrast }}
@media (prefers-contrast: less) {
body {
{{> less_contrast_light }}
}
body[data-color-scheme='dark'] {
{{> less_contrast_dark }}
}
@media (prefers-color-scheme: dark) {
body {
{{> less_contrast_dark }}
}
body[data-color-scheme='light'] {
{{> less_contrast_light }}
}
}
}
{{/ less_contrast }}

26
templates/typography.css Normal file
View File

@@ -0,0 +1,26 @@
:root {
--font-heading: 'Open Sans', sans-serif;
--font-body: 'Open Sans', sans-serif;
--font-monospace: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-family: var(--font-body);
}
h1, h2, h3, h4, h5, h6,
th, dt {
font-family: var(--font-heading);
}
p, td, dd, figcaption, li, blockquote {
font-family: var(--font-body);
}
pre, code, samp {
font-family: var(--font-monospace);
}
a, span,
b, i, u, q,
strong, em, mark, cite {
font-family: inherit;
}