auth

Main authentication module for my projects
git clone git://git.finwo.net/app/auth
Log | Files | Refs

commit df060cfa22eaa072ea4f81d5f55a17c3b6d697bc
parent 31d3c8874ad0549b673372cf29c1d0d3123c8290
Author: finwo <finwo@pm.me>
Date:   Thu, 22 Oct 2026 12:55:12 +0200

Shared css between mockups

Diffstat:
Mmockup/account.html | 512++-----------------------------------------------------------------------------
Mmockup/admin-dashboard.html | 467+------------------------------------------------------------------------------
Mmockup/consent.html | 138+------------------------------------------------------------------------------
Mmockup/error-pages.html | 149+------------------------------------------------------------------------------
Amockup/global.css | 512+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 523 insertions(+), 1255 deletions(-)

diff --git a/mockup/account.html b/mockup/account.html @@ -4,262 +4,8 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Account mockup</title> + <link rel="stylesheet" href="./global.css" /> <style> - :root { - font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - --canvas: #f3f3f3; - --surface: #fff; - --sidebar: #000; - --sidebar-active: #333; - --topbar: #000; - --text: #1b1b1b; - --muted: #656a70; - --accent: #25a; - --accent-hover: #2a66cc; - --accent-active: #1b468c; - --on-accent: #fff; - --menu-hover: #8884; - --row: #00000008; - --row-hover: #0000000d; - --skeleton: #00000012; - --danger: #c9190b; - --shadow: 0 0.125em 0.25em #0008; - } - - *, - *::before, - *::after { - box-sizing: border-box; - } - - html, - body { - margin: 0; - padding: 0; - } - - body { - background: var(--canvas); - color: var(--text); - -webkit-font-smoothing: antialiased; - } - - [hidden] { - display: none !important; - } - - .topbar { - position: sticky; - top: 0; - z-index: 20; - display: flex; - align-items: center; - justify-content: space-between; - gap: 1rem; - min-height: 3.5rem; - padding: 0 1.5rem; - background: var(--topbar); - color: rgba(255, 255, 255, 0.76); - font-size: 0.875rem; - } - - .brand { - display: flex; - align-items: center; - gap: 0.75rem; - color: #fff; - text-decoration: none; - } - - .brand-icon { - flex: none; - width: 1.125rem; - height: 1.125rem; - } - - .brand-name { - font-size: 1.125rem; - font-weight: 500; - line-height: 1.3; - } - - .app { - display: grid; - grid-template-columns: minmax(0, 1fr); - grid-template-rows: auto minmax(0, 1fr); - min-height: calc(100vh - 3.5rem); - } - - .sidebar { - display: flex; - flex-direction: column; - min-height: auto; - background: var(--sidebar); - color: #fff; - } - - .nav { - display: flex; - flex-direction: row; - flex-wrap: wrap; - padding: 0.75rem 0; - } - - .nav-label { - display: none; - margin: 0; - padding: 0.5rem 1.5rem; - color: rgba(255, 255, 255, 0.46); - font-size: 0.6875rem; - font-weight: 600; - letter-spacing: 0.08em; - text-transform: uppercase; - } - - .nav-item { - display: flex; - align-items: center; - justify-content: center; - gap: 0.75rem; - width: auto; - flex: 1; - padding: 0.6875rem 1.5rem; - color: rgba(255, 255, 255, 0.82); - font-size: 0.875rem; - line-height: 1.4; - text-decoration: none; - cursor: pointer; - user-select: none; - } - - .nav-item span { - display: none; - } - - .nav-item svg { - flex: none; - width: 1.125rem; - height: 1.125rem; - } - - .nav-item:hover { - background: var(--menu-hover); - color: #fff; - } - - .nav-item.is-active { - background: var(--sidebar-active); - color: #fff; - } - - .main { - display: flex; - flex-direction: column; - min-width: 0; - } - - .content { - width: 100%; - max-width: 72rem; - margin: 0 auto; - padding: 1.75rem 2rem 3rem; - } - - .page-header { - margin-bottom: 1.5rem; - } - - .page-header h1 { - margin: 0; - font-size: 1.5rem; - font-weight: 400; - line-height: 1.3; - } - - .page-header p { - margin: 0.25rem 0 0; - color: var(--muted); - font-size: 0.875rem; - line-height: 1.5; - } - - .grid { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: 1rem; - } - - .panel { - padding: 1.5rem; - background: var(--surface); - box-shadow: var(--shadow); - } - - .panel-wide { - grid-column: 1 / -1; - margin-top: 1rem; - } - - .panel h2 { - margin: 0 0 1.25rem; - font-size: 1.0625rem; - font-weight: 500; - line-height: 1.4; - } - - .panel-heading { - display: flex; - align-items: center; - gap: 0.75rem; - margin-bottom: 1rem; - } - - .panel-heading svg { - flex: none; - width: 1.25rem; - height: 1.25rem; - } - - .panel-heading h2 { - margin: 0; - } - - .details { - display: grid; - gap: 0.875rem; - margin: 0; - } - - .details > div { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: 1rem; - } - - .details dt { - color: var(--muted); - font-size: 0.875rem; - line-height: 1.5; - } - - .details dd { - margin: 0; - overflow-wrap: anywhere; - font-size: 0.875rem; - line-height: 1.5; - } - - .note { - margin: 0; - color: var(--muted); - font-size: 0.875rem; - line-height: 1.6; - } - - .note + .note { - margin-top: 0.5rem; - } - .summary-list { display: grid; gap: 0.25rem; @@ -356,132 +102,21 @@ line-height: 1.4; } - .button { - display: inline-block; - padding: 0.625rem 1.25rem; - border: 0; - border-radius: 0; - background: var(--accent); - color: var(--on-accent); - font: inherit; - font-size: 0.8125rem; - font-weight: 500; - letter-spacing: 0.05em; - line-height: 1.4; - text-decoration: none; - text-transform: uppercase; - cursor: pointer; - } - - .button:hover { - background: var(--accent-hover); - } - - .button:active { - background: var(--accent-active); - } - - .user-menu { - position: relative; - } - - .user-menu summary { - display: grid; - place-items: center; - width: 2.25rem; - height: 2.25rem; - color: rgba(255, 255, 255, 0.86); - list-style: none; - cursor: pointer; - user-select: none; - } - - .user-menu summary::-webkit-details-marker { - display: none; - } - - .user-menu summary::marker { - content: ''; - } - - .user-menu summary:hover, - .user-menu[open] summary { - color: #fff; - } - - .user-menu svg { - width: 1.5rem; - height: 1.5rem; - } - - .user-panel { - position: absolute; - top: 2.75rem; - right: 0; - z-index: 10; - width: 15rem; - background: var(--sidebar); - color: #fff; - box-shadow: var(--shadow); - } - - .user-summary { - display: grid; - gap: 0.125rem; - padding: 0.875rem 1rem; - } - - .user-name { - font-size: 0.875rem; - font-weight: 500; - line-height: 1.4; - } - - .user-meta { - color: rgba(255, 255, 255, 0.56); - font-size: 0.75rem; - line-height: 1.4; - } - - .user-menu-list { - display: flex; - flex-direction: column; - padding: 0.5rem 0; - } - - .user-menu-item { + .panel-heading { display: flex; align-items: center; gap: 0.75rem; - width: 100%; - padding: 0.625rem 1rem; - border: 0; - background: transparent; - color: rgba(255, 255, 255, 0.82); - font: inherit; - font-size: 0.875rem; - line-height: 1.4; - text-align: left; - text-decoration: none; - cursor: pointer; - user-select: none; - } - - .user-menu-value { - margin-left: auto; - color: rgba(255, 255, 255, 0.56); - font-size: 0.75rem; + margin-bottom: 1rem; } - .user-menu-item svg { + .panel-heading svg { flex: none; - width: 1.125rem; - height: 1.125rem; + width: 1.25rem; + height: 1.25rem; } - .user-menu-item:hover { - background: var(--menu-hover); - color: #fff; + .panel-heading h2 { + margin: 0; } .skeleton { @@ -506,75 +141,7 @@ width: 62%; } - .mockup-controls { - position: fixed; - right: 1rem; - bottom: 1rem; - z-index: 100; - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.25rem; - max-width: calc(100vw - 2rem); - padding: 0.375rem; - background: #000; - color: #fff; - box-shadow: var(--shadow); - font-size: 0.75rem; - } - - .mockup-label { - padding: 0 0.5rem; - color: rgba(255, 255, 255, 0.5); - font-size: 0.6875rem; - font-weight: 600; - letter-spacing: 0.08em; - text-transform: uppercase; - } - - .mockup-button { - padding: 0.375rem 0.625rem; - border: 0; - background: transparent; - color: rgba(255, 255, 255, 0.76); - font: inherit; - font-size: 0.75rem; - cursor: pointer; - } - - .mockup-button:hover { - background: var(--menu-hover); - color: #fff; - } - - .mockup-button.is-active { - background: var(--sidebar-active); - color: #fff; - } - - .mockup-separator { - width: 0.0625rem; - height: 1.25rem; - margin: 0 0.25rem; - background: rgba(255, 255, 255, 0.18); - } - - a:focus-visible, - button:focus-visible, - summary:focus-visible { - outline: 2pt solid var(--accent); - outline-offset: 2pt; - } - @media (min-width: 40em) { - .nav-item span { - display: inline; - } - - .details > div { - grid-template-columns: 8.5rem minmax(0, 1fr); - } - .summary-row, .surface-row { grid-template-columns: 1.5rem minmax(0, 1fr) auto; @@ -585,69 +152,6 @@ display: inline; } } - - @media (min-width: 60em) { - .app { - grid-template-columns: 15rem minmax(0, 1fr); - grid-template-rows: minmax(0, 1fr); - } - - .sidebar { - min-height: calc(100vh - 3.5rem); - } - - .nav { - flex: 1; - flex-direction: column; - flex-wrap: nowrap; - } - - .nav-label { - display: block; - } - - .nav-item { - width: 100%; - flex: none; - justify-content: flex-start; - } - - .grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - } - - @media (prefers-color-scheme: dark) { - :root:not([data-theme]) { - --canvas: #181818; - --surface: #282828; - --sidebar: #000; - --sidebar-active: #333; - --topbar: #000; - --text: #e7e7e7; - --muted: #a0a4a8; - --row: #ffffff0d; - --row-hover: #ffffff14; - --skeleton: #ffffff14; - --danger: #f28b82; - color-scheme: dark; - } - } - - :root[data-theme="dark"] { - --canvas: #181818; - --surface: #282828; - --sidebar: #000; - --sidebar-active: #333; - --topbar: #000; - --text: #e7e7e7; - --muted: #a0a4a8; - --row: #ffffff0d; - --row-hover: #ffffff14; - --skeleton: #ffffff14; - --danger: #f28b82; - color-scheme: dark; - } </style> </head> <body> diff --git a/mockup/admin-dashboard.html b/mockup/admin-dashboard.html @@ -4,348 +4,8 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Admin dashboard mockup</title> + <link rel="stylesheet" href="./global.css" /> <style> - :root { - font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - --canvas: #f3f3f3; - --surface: #fff; - --sidebar: #000; - --sidebar-active: #333; - --topbar: #000; - --text: #1b1b1b; - --muted: #656a70; - --accent: #25a; - --accent-hover: #2a66cc; - --accent-active: #1b468c; - --on-accent: #fff; - --menu-hover: #8884; - --shadow: 0 0.125em 0.25em #0008; - } - - *, - *::before, - *::after { - box-sizing: border-box; - } - - html, - body { - margin: 0; - padding: 0; - } - - body { - background: var(--canvas); - color: var(--text); - -webkit-font-smoothing: antialiased; - } - - .topbar { - position: sticky; - top: 0; - z-index: 20; - display: flex; - align-items: center; - justify-content: space-between; - gap: 1rem; - min-height: 3.5rem; - padding: 0 1.5rem; - background: var(--topbar); - color: rgba(255, 255, 255, 0.76); - font-size: 0.875rem; - } - - .app { - display: grid; - grid-template-columns: minmax(0, 1fr); - grid-template-rows: auto minmax(0, 1fr); - min-height: calc(100vh - 3.5rem); - } - - .sidebar { - display: flex; - flex-direction: column; - min-height: auto; - background: var(--sidebar); - color: #fff; - } - - .brand { - display: flex; - align-items: center; - gap: 0.75rem; - color: #fff; - } - - .brand-icon { - flex: none; - width: 1.125rem; - height: 1.125rem; - } - - .brand-name { - font-size: 1.125rem; - font-weight: 500; - line-height: 1.3; - } - - .nav { - display: flex; - flex-direction: row; - flex-wrap: wrap; - padding: 0.75rem 0; - } - - .nav-label { - display: none; - margin: 0; - padding: 0.5rem 1.5rem; - color: rgba(255, 255, 255, 0.46); - font-size: 0.6875rem; - font-weight: 600; - letter-spacing: 0.08em; - text-transform: uppercase; - } - - .nav-item { - display: flex; - align-items: center; - justify-content: center; - gap: 0.75rem; - width: auto; - flex: 1; - padding: 0.6875rem 1.5rem; - color: rgba(255, 255, 255, 0.82); - font-size: 0.875rem; - line-height: 1.4; - text-decoration: none; - cursor: pointer; - user-select: none; - } - - .nav-item span { - display: none; - } - - .nav-item svg { - flex: none; - width: 1.125rem; - height: 1.125rem; - } - - .nav-item:hover { - background: var(--menu-hover); - color: #fff; - } - - .nav-item.is-active { - background: var(--sidebar-active); - color: #fff; - } - - .main { - display: flex; - flex-direction: column; - min-width: 0; - } - - .content { - width: 100%; - max-width: 72rem; - margin: 0 auto; - padding: 1.75rem 2rem 3rem; - } - - .page-header { - margin-bottom: 1.5rem; - } - - .page-header h1 { - margin: 0; - font-size: 1.5rem; - font-weight: 400; - line-height: 1.3; - } - - .page-header p { - margin: 0.25rem 0 0; - color: var(--muted); - font-size: 0.875rem; - line-height: 1.5; - } - - .button { - padding: 0.625rem 1.25rem; - border: 0; - border-radius: 0; - background: var(--accent); - color: var(--on-accent); - font: inherit; - font-size: 0.8125rem; - font-weight: 500; - letter-spacing: 0.05em; - line-height: 1.4; - text-transform: uppercase; - cursor: pointer; - } - - .button:hover { - background: var(--accent-hover); - } - - .button:active { - background: var(--accent-active); - } - - .mockup-controls { - position: fixed; - right: 1rem; - bottom: 1rem; - z-index: 100; - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.25rem; - max-width: calc(100vw - 2rem); - padding: 0.375rem; - background: #000; - color: #fff; - box-shadow: var(--shadow); - font-size: 0.75rem; - } - - .mockup-label { - padding: 0 0.5rem; - color: rgba(255, 255, 255, 0.5); - font-size: 0.6875rem; - font-weight: 600; - letter-spacing: 0.08em; - text-transform: uppercase; - } - - .mockup-button { - padding: 0.375rem 0.625rem; - border: 0; - background: transparent; - color: rgba(255, 255, 255, 0.76); - font: inherit; - font-size: 0.75rem; - cursor: pointer; - } - - .mockup-button:hover { - background: var(--menu-hover); - color: #fff; - } - - .mockup-button.is-active { - background: var(--sidebar-active); - color: #fff; - } - - .user-menu { - position: relative; - } - - .user-menu summary { - display: grid; - place-items: center; - width: 2.25rem; - height: 2.25rem; - color: rgba(255, 255, 255, 0.86); - list-style: none; - cursor: pointer; - user-select: none; - } - - .user-menu summary::-webkit-details-marker { - display: none; - } - - .user-menu summary::marker { - content: ''; - } - - .user-menu summary:hover, - .user-menu[open] summary { - color: #fff; - } - - .user-menu svg { - width: 1.5rem; - height: 1.5rem; - } - - .user-panel { - position: absolute; - top: 2.75rem; - right: 0; - z-index: 10; - width: 15rem; - background: var(--sidebar); - color: #fff; - box-shadow: var(--shadow); - } - - .user-summary { - display: grid; - gap: 0.125rem; - padding: 0.875rem 1rem; - } - - .user-name { - font-size: 0.875rem; - font-weight: 500; - line-height: 1.4; - } - - .user-meta { - color: rgba(255, 255, 255, 0.56); - font-size: 0.75rem; - line-height: 1.4; - } - - .user-menu-list { - display: flex; - flex-direction: column; - padding: 0.5rem 0; - } - - .user-menu-item { - display: flex; - align-items: center; - gap: 0.75rem; - width: 100%; - padding: 0.625rem 1rem; - border: 0; - background: transparent; - color: rgba(255, 255, 255, 0.82); - font: inherit; - font-size: 0.875rem; - line-height: 1.4; - text-align: left; - text-decoration: none; - cursor: pointer; - user-select: none; - } - - .user-menu-value { - margin-left: auto; - color: rgba(255, 255, 255, 0.56); - font-size: 0.75rem; - } - - .user-menu-item svg { - flex: none; - width: 1.125rem; - height: 1.125rem; - } - - .user-menu-item:hover { - background: var(--menu-hover); - color: #fff; - } - .stats { display: grid; grid-template-columns: minmax(0, 1fr); @@ -374,135 +34,10 @@ line-height: 1.2; } - .grid { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: 1rem; - } - - .panel { - padding: 1.5rem; - background: var(--surface); - box-shadow: var(--shadow); - } - - .panel-wide { - grid-column: 1 / -1; - margin-top: 1rem; - } - - .panel h2 { - margin: 0 0 1.25rem; - font-size: 1.0625rem; - font-weight: 500; - line-height: 1.4; - } - - .details { - display: grid; - gap: 0.875rem; - margin: 0; - } - - .details > div { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: 1rem; - } - - .details dt { - color: var(--muted); - font-size: 0.875rem; - line-height: 1.5; - } - - .details dd { - margin: 0; - overflow-wrap: anywhere; - font-size: 0.875rem; - line-height: 1.5; - } - - .note { - margin: 0; - color: var(--muted); - font-size: 0.875rem; - line-height: 1.6; - } - - a:focus-visible, - button:focus-visible { - outline: 2pt solid var(--accent); - outline-offset: 2pt; - } - - @media (min-width: 40em) { - .nav-item span { - display: inline; - } - - .details > div { - grid-template-columns: 8.5rem minmax(0, 1fr); - } - } - @media (min-width: 60em) { - .app { - grid-template-columns: 15rem minmax(0, 1fr); - grid-template-rows: minmax(0, 1fr); - } - - .sidebar { - min-height: calc(100vh - 3.5rem); - } - - .nav { - flex: 1; - flex-direction: column; - flex-wrap: nowrap; - } - - .nav-label { - display: block; - } - - .nav-item { - width: 100%; - flex: none; - justify-content: flex-start; - } - .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } - - .grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - } - - @media (prefers-color-scheme: dark) { - :root:not([data-theme]) { - --canvas: #181818; - --surface: #282828; - --sidebar: #000; - --sidebar-active: #333; - --topbar: #000; - --text: #e7e7e7; - --muted: #a0a4a8; - color-scheme: dark; - } - } - - :root[data-theme="dark"] { - --canvas: #181818; - --surface: #282828; - --sidebar: #000; - --sidebar-active: #333; - --topbar: #000; - --text: #e7e7e7; - --muted: #a0a4a8; - color-scheme: dark; } </style> </head> diff --git a/mockup/consent.html b/mockup/consent.html @@ -4,42 +4,8 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Consent mockup</title> + <link rel="stylesheet" href="./global.css" /> <style> - :root { - font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - --surface: #fff; - --text: #1b1b1b; - --muted: #656a70; - --accent: #25a; - --accent-hover: #2a66cc; - --accent-active: #1b468c; - --accent-text: #25a; - --accent-text-hover: #2a66cc; - --accent-text-active: #1b468c; - --on-accent: #fff; - --row: #00000008; - --shadow: 0 0.125em 0.25em #0008; - --hex: url('./hex-grid-light.svg'); - } - - *, - *::before, - *::after { - box-sizing: border-box; - } - - html, - body { - margin: 0; - padding: 0; - } - - body { - background: var(--surface); - color: var(--text); - -webkit-font-smoothing: antialiased; - } - .consent-page { display: grid; place-items: center; @@ -169,31 +135,6 @@ margin-top: 1.5rem; } - .button { - display: inline-block; - padding: 0.625rem 1.25rem; - border: 0; - border-radius: 0; - background: var(--accent); - color: var(--on-accent); - font: inherit; - font-size: 0.8125rem; - font-weight: 500; - letter-spacing: 0.05em; - line-height: 1.4; - text-decoration: none; - text-transform: uppercase; - cursor: pointer; - } - - .button:hover { - background: var(--accent-hover); - } - - .button:active { - background: var(--accent-active); - } - .link-button { padding: 0.5rem 0; border: 0; @@ -212,58 +153,6 @@ color: var(--accent-text-active); } - .mockup-controls { - position: fixed; - right: 1rem; - bottom: 1rem; - z-index: 100; - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.25rem; - max-width: calc(100vw - 2rem); - padding: 0.375rem; - background: #000; - color: #fff; - box-shadow: var(--shadow); - font-size: 0.75rem; - } - - .mockup-label { - padding: 0 0.5rem; - color: rgba(255, 255, 255, 0.5); - font-size: 0.6875rem; - font-weight: 600; - letter-spacing: 0.08em; - text-transform: uppercase; - } - - .mockup-button { - padding: 0.375rem 0.625rem; - border: 0; - background: transparent; - color: rgba(255, 255, 255, 0.76); - font: inherit; - font-size: 0.75rem; - cursor: pointer; - } - - .mockup-button:hover { - background: #8884; - color: #fff; - } - - .mockup-button.is-active { - background: #333; - color: #fff; - } - - a:focus-visible, - button:focus-visible { - outline: 2pt solid var(--accent); - outline-offset: 2pt; - } - @media (min-width: 35em) { .consent-page { background-image: var(--hex); @@ -277,31 +166,6 @@ } } - @media (prefers-color-scheme: dark) { - :root:not([data-theme]) { - --surface: #282828; - --text: #e7e7e7; - --muted: #a0a4a8; - --accent-text: #4d8dff; - --accent-text-hover: #6ea8ff; - --accent-text-active: #3b7cff; - --row: #ffffff0d; - --hex: url('./hex-grid-dark.svg'); - color-scheme: dark; - } - } - - :root[data-theme="dark"] { - --surface: #282828; - --text: #e7e7e7; - --muted: #a0a4a8; - --accent-text: #4d8dff; - --accent-text-hover: #6ea8ff; - --accent-text-active: #3b7cff; - --row: #ffffff0d; - --hex: url('./hex-grid-dark.svg'); - color-scheme: dark; - } </style> </head> <body> diff --git a/mockup/error-pages.html b/mockup/error-pages.html @@ -4,46 +4,8 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Error pages mockup</title> + <link rel="stylesheet" href="./global.css" /> <style> - :root { - font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - --page: #fff; - --surface: #fff; - --text: #1b1b1b; - --muted: #656a70; - --accent: #25a; - --accent-hover: #2a66cc; - --accent-active: #1b468c; - --on-accent: #fff; - --danger: #c9190b; - --field-line: rgba(0, 0, 0, 0.42); - --skeleton: #00000012; - --shadow: 0 0.125em 0.25em #0008; - --hex: url('./hex-grid-light.svg'); - } - - *, - *::before, - *::after { - box-sizing: border-box; - } - - html, - body { - margin: 0; - padding: 0; - } - - body { - background: var(--page); - color: var(--text); - -webkit-font-smoothing: antialiased; - } - - [hidden] { - display: none !important; - } - .status-page { display: grid; place-items: center; @@ -133,31 +95,6 @@ margin-top: 1.5rem; } - .button { - display: inline-block; - padding: 0.625rem 1.25rem; - border: 0; - border-radius: 0; - background: var(--accent); - color: var(--on-accent); - font: inherit; - font-size: 0.8125rem; - font-weight: 500; - letter-spacing: 0.05em; - line-height: 1.4; - text-decoration: none; - text-transform: uppercase; - cursor: pointer; - } - - .button:hover { - background: var(--accent-hover); - } - - .button:active { - background: var(--accent-active); - } - .field { display: grid; gap: 0.125rem; @@ -176,65 +113,6 @@ line-height: 1.5; } - .mockup-controls { - position: fixed; - right: 1rem; - bottom: 1rem; - z-index: 100; - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.25rem; - max-width: calc(100vw - 2rem); - padding: 0.375rem; - background: #000; - color: #fff; - box-shadow: var(--shadow); - font-size: 0.75rem; - } - - .mockup-label { - padding: 0 0.5rem; - color: rgba(255, 255, 255, 0.5); - font-size: 0.6875rem; - font-weight: 600; - letter-spacing: 0.08em; - text-transform: uppercase; - } - - .mockup-button { - padding: 0.375rem 0.625rem; - border: 0; - background: transparent; - color: rgba(255, 255, 255, 0.76); - font: inherit; - font-size: 0.75rem; - cursor: pointer; - } - - .mockup-button:hover { - background: #8884; - color: #fff; - } - - .mockup-button.is-active { - background: #333; - color: #fff; - } - - .mockup-separator { - width: 0.0625rem; - height: 1.25rem; - margin: 0 0.25rem; - background: rgba(255, 255, 255, 0.18); - } - - a:focus-visible, - button:focus-visible { - outline: 2pt solid var(--accent); - outline-offset: 2pt; - } - @media (min-width: 35em) { .status-page { background-color: var(--page); @@ -256,31 +134,6 @@ } } - @media (prefers-color-scheme: dark) { - :root:not([data-theme]) { - --page: #000; - --surface: #282828; - --text: #e7e7e7; - --muted: #a0a4a8; - --danger: #f28b82; - --field-line: rgba(255, 255, 255, 0.42); - --skeleton: #ffffff14; - --hex: url('./hex-grid-dark.svg'); - color-scheme: dark; - } - } - - :root[data-theme="dark"] { - --page: #000; - --surface: #282828; - --text: #e7e7e7; - --muted: #a0a4a8; - --danger: #f28b82; - --field-line: rgba(255, 255, 255, 0.42); - --skeleton: #ffffff14; - --hex: url('./hex-grid-dark.svg'); - color-scheme: dark; - } </style> </head> <body> diff --git a/mockup/global.css b/mockup/global.css @@ -0,0 +1,512 @@ +:root { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; + --canvas: #f3f3f3; + --page: #fff; + --surface: #fff; + --sidebar: #000; + --sidebar-active: #333; + --topbar: #000; + --text: #1b1b1b; + --muted: #656a70; + --accent: #25a; + --accent-hover: #2a66cc; + --accent-active: #1b468c; + --accent-text: #25a; + --accent-text-hover: #2a66cc; + --accent-text-active: #1b468c; + --on-accent: #fff; + --menu-hover: #8884; + --row: #00000008; + --row-hover: #0000000d; + --skeleton: #00000012; + --danger: #c9190b; + --field-line: rgba(0, 0, 0, 0.42); + --shadow: 0 0.125em 0.25em #0008; + --hex: url('./hex-grid-light.svg'); +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html, +body { + margin: 0; + padding: 0; +} + +body { + background: var(--canvas); + color: var(--text); + -webkit-font-smoothing: antialiased; +} + +[hidden] { + display: none !important; +} + +.topbar { + position: sticky; + top: 0; + z-index: 20; + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; + min-height: 3.5rem; + padding: 0 1.5rem; + background: var(--topbar); + color: rgba(255, 255, 255, 0.76); + font-size: 0.875rem; +} + +.brand { + display: flex; + align-items: center; + gap: 0.75rem; + color: #fff; + text-decoration: none; +} + +.brand-icon { + flex: none; + width: 1.125rem; + height: 1.125rem; +} + +.brand-name { + font-size: 1.125rem; + font-weight: 500; + line-height: 1.3; +} + +.app { + display: grid; + grid-template-columns: minmax(0, 1fr); + grid-template-rows: auto minmax(0, 1fr); + min-height: calc(100vh - 3.5rem); +} + +.sidebar { + display: flex; + flex-direction: column; + min-height: auto; + background: var(--sidebar); + color: #fff; +} + +.nav { + display: flex; + flex-direction: row; + flex-wrap: wrap; + padding: 0.75rem 0; +} + +.nav-label { + display: none; + margin: 0; + padding: 0.5rem 1.5rem; + color: rgba(255, 255, 255, 0.46); + font-size: 0.6875rem; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +.nav-item { + display: flex; + align-items: center; + justify-content: center; + gap: 0.75rem; + width: auto; + flex: 1; + padding: 0.6875rem 1.5rem; + color: rgba(255, 255, 255, 0.82); + font-size: 0.875rem; + line-height: 1.4; + text-decoration: none; + cursor: pointer; + user-select: none; +} + +.nav-item span { + display: none; +} + +.nav-item svg { + flex: none; + width: 1.125rem; + height: 1.125rem; +} + +.nav-item:hover { + background: var(--menu-hover); + color: #fff; +} + +.nav-item.is-active { + background: var(--sidebar-active); + color: #fff; +} + +.main { + display: flex; + flex-direction: column; + min-width: 0; +} + +.content { + width: 100%; + max-width: 72rem; + margin: 0 auto; + padding: 1.75rem 2rem 3rem; +} + +.page-header { + margin-bottom: 1.5rem; +} + +.page-header h1 { + margin: 0; + font-size: 1.5rem; + font-weight: 400; + line-height: 1.3; +} + +.page-header p { + margin: 0.25rem 0 0; + color: var(--muted); + font-size: 0.875rem; + line-height: 1.5; +} + +.grid { + display: grid; + grid-template-columns: minmax(0, 1fr); + gap: 1rem; +} + +.panel { + padding: 1.5rem; + background: var(--surface); + box-shadow: var(--shadow); +} + +.panel-wide { + grid-column: 1 / -1; + margin-top: 1rem; +} + +.panel h2 { + margin: 0 0 1.25rem; + font-size: 1.0625rem; + font-weight: 500; + line-height: 1.4; +} + +.details { + display: grid; + gap: 0.875rem; + margin: 0; +} + +.details > div { + display: grid; + grid-template-columns: minmax(0, 1fr); + gap: 1rem; +} + +.details dt { + color: var(--muted); + font-size: 0.875rem; + line-height: 1.5; +} + +.details dd { + margin: 0; + overflow-wrap: anywhere; + font-size: 0.875rem; + line-height: 1.5; +} + +.note { + margin: 0; + color: var(--muted); + font-size: 0.875rem; + line-height: 1.6; +} + +.button { + display: inline-block; + padding: 0.625rem 1.25rem; + border: 0; + border-radius: 0; + background: var(--accent); + color: var(--on-accent); + font: inherit; + font-size: 0.8125rem; + font-weight: 500; + letter-spacing: 0.05em; + line-height: 1.4; + text-decoration: none; + text-transform: uppercase; + cursor: pointer; +} + +.button:hover { + background: var(--accent-hover); +} + +.button:active { + background: var(--accent-active); +} + +.user-menu { + position: relative; +} + +.user-menu summary { + display: grid; + place-items: center; + width: 2.25rem; + height: 2.25rem; + color: rgba(255, 255, 255, 0.86); + list-style: none; + cursor: pointer; + user-select: none; +} + +.user-menu summary::-webkit-details-marker { + display: none; +} + +.user-menu summary::marker { + content: ''; +} + +.user-menu summary:hover, +.user-menu[open] summary { + color: #fff; +} + +.user-menu svg { + width: 1.5rem; + height: 1.5rem; +} + +.user-panel { + position: absolute; + top: 2.75rem; + right: 0; + z-index: 10; + width: 15rem; + background: var(--sidebar); + color: #fff; + box-shadow: var(--shadow); +} + +.user-summary { + display: grid; + gap: 0.125rem; + padding: 0.875rem 1rem; +} + +.user-name { + font-size: 0.875rem; + font-weight: 500; + line-height: 1.4; +} + +.user-meta { + color: rgba(255, 255, 255, 0.56); + font-size: 0.75rem; + line-height: 1.4; +} + +.user-menu-list { + display: flex; + flex-direction: column; + padding: 0.5rem 0; +} + +.user-menu-item { + display: flex; + align-items: center; + gap: 0.75rem; + width: 100%; + padding: 0.625rem 1rem; + border: 0; + background: transparent; + color: rgba(255, 255, 255, 0.82); + font: inherit; + font-size: 0.875rem; + line-height: 1.4; + text-align: left; + text-decoration: none; + cursor: pointer; + user-select: none; +} + +.user-menu-value { + margin-left: auto; + color: rgba(255, 255, 255, 0.56); + font-size: 0.75rem; +} + +.user-menu-item svg { + flex: none; + width: 1.125rem; + height: 1.125rem; +} + +.user-menu-item:hover { + background: var(--menu-hover); + color: #fff; +} + +.mockup-controls { + position: fixed; + right: 1rem; + bottom: 1rem; + z-index: 100; + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.25rem; + max-width: calc(100vw - 2rem); + padding: 0.375rem; + background: #000; + color: #fff; + box-shadow: var(--shadow); + font-size: 0.75rem; +} + +.mockup-label { + padding: 0 0.5rem; + color: rgba(255, 255, 255, 0.5); + font-size: 0.6875rem; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +.mockup-button { + padding: 0.375rem 0.625rem; + border: 0; + background: transparent; + color: rgba(255, 255, 255, 0.76); + font: inherit; + font-size: 0.75rem; + cursor: pointer; +} + +.mockup-button:hover { + background: var(--menu-hover); + color: #fff; +} + +.mockup-button.is-active { + background: var(--sidebar-active); + color: #fff; +} + +.mockup-separator { + width: 0.0625rem; + height: 1.25rem; + margin: 0 0.25rem; + background: rgba(255, 255, 255, 0.18); +} + +a:focus-visible, +button:focus-visible, +summary:focus-visible { + outline: 2pt solid var(--accent); + outline-offset: 2pt; +} + +@media (min-width: 40em) { + .nav-item span { + display: inline; + } + + .details > div { + grid-template-columns: 8.5rem minmax(0, 1fr); + } +} + +@media (min-width: 60em) { + .app { + grid-template-columns: 15rem minmax(0, 1fr); + grid-template-rows: minmax(0, 1fr); + } + + .sidebar { + min-height: calc(100vh - 3.5rem); + } + + .nav { + flex: 1; + flex-direction: column; + flex-wrap: nowrap; + } + + .nav-label { + display: block; + } + + .nav-item { + width: 100%; + flex: none; + justify-content: flex-start; + } + + .grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme]) { + --canvas: #181818; + --page: #000; + --surface: #282828; + --sidebar: #000; + --sidebar-active: #333; + --topbar: #000; + --text: #e7e7e7; + --muted: #a0a4a8; + --accent-text: #4d8dff; + --accent-text-hover: #6ea8ff; + --accent-text-active: #3b7cff; + --row: #ffffff0d; + --row-hover: #ffffff14; + --skeleton: #ffffff14; + --danger: #f28b82; + --field-line: rgba(255, 255, 255, 0.42); + --hex: url('./hex-grid-dark.svg'); + color-scheme: dark; + } +} + +:root[data-theme="dark"] { + --canvas: #181818; + --page: #000; + --surface: #282828; + --sidebar: #000; + --sidebar-active: #333; + --topbar: #000; + --text: #e7e7e7; + --muted: #a0a4a8; + --accent-text: #4d8dff; + --accent-text-hover: #6ea8ff; + --accent-text-active: #3b7cff; + --row: #ffffff0d; + --row-hover: #ffffff14; + --skeleton: #ffffff14; + --danger: #f28b82; + --field-line: rgba(255, 255, 255, 0.42); + --hex: url('./hex-grid-dark.svg'); + color-scheme: dark; +}