feat: assemble responsive app shell navigation
This commit is contained in:
@@ -24,6 +24,35 @@
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-width: 20rem;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
p {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2rem, 5vw, 3.5rem);
|
||||
line-height: 1.05;
|
||||
letter-spacing: -0.04em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
@@ -33,8 +62,165 @@
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.skip-link {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
top: 0.75rem;
|
||||
left: 0.75rem;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: var(--radius-control);
|
||||
color: white;
|
||||
background: var(--color-content);
|
||||
transform: translateY(-200%);
|
||||
}
|
||||
|
||||
.skip-link:focus {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
display: grid;
|
||||
min-height: 100vh;
|
||||
grid-template-rows: 4.5rem 1fr;
|
||||
grid-template-columns: 15rem minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
"header header"
|
||||
"sidebar content";
|
||||
}
|
||||
|
||||
.app-shell__header {
|
||||
position: sticky;
|
||||
z-index: 30;
|
||||
top: 0;
|
||||
grid-area: header;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
min-width: 0;
|
||||
padding: 0.75rem 1.25rem;
|
||||
border-bottom: 1px solid var(--color-surface-muted);
|
||||
background: color-mix(in oklch, white 92%, var(--color-surface));
|
||||
box-shadow: 0 1px 8px color-mix(in oklch, var(--color-content) 8%, transparent);
|
||||
}
|
||||
|
||||
.app-shell__brand {
|
||||
overflow: hidden;
|
||||
font-size: 1.05rem;
|
||||
font-weight: 800;
|
||||
text-decoration: none;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.app-shell__menu-button {
|
||||
display: none;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
border: 1px solid var(--color-surface-muted);
|
||||
border-radius: var(--radius-control);
|
||||
padding: 0.55rem 0.75rem;
|
||||
color: var(--color-content);
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.app-shell__session {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
.app-shell__session-error {
|
||||
position: absolute;
|
||||
top: calc(100% + 0.25rem);
|
||||
right: 1rem;
|
||||
padding: 0.5rem;
|
||||
color: var(--color-danger);
|
||||
background: white;
|
||||
}
|
||||
|
||||
.session-status {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
align-items: center;
|
||||
border-radius: 999px;
|
||||
padding: 0.3rem 0.65rem;
|
||||
color: var(--color-content-muted);
|
||||
background: var(--color-surface-muted);
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.session-status[data-state="authenticated"] {
|
||||
color: oklch(0.35 0.12 155);
|
||||
background: oklch(0.93 0.05 155);
|
||||
}
|
||||
|
||||
.session-status[data-state="integration-failed"] {
|
||||
color: var(--color-danger);
|
||||
}
|
||||
|
||||
.app-shell__sidebar {
|
||||
position: sticky;
|
||||
top: 4.5rem;
|
||||
grid-area: sidebar;
|
||||
height: calc(100vh - 4.5rem);
|
||||
padding: 1.25rem 0.75rem;
|
||||
border-right: 1px solid var(--color-surface-muted);
|
||||
background: white;
|
||||
}
|
||||
|
||||
.app-navigation {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.app-navigation__link {
|
||||
display: block;
|
||||
border-radius: var(--radius-control);
|
||||
padding: 0.75rem 0.9rem;
|
||||
color: var(--color-content-muted);
|
||||
font-weight: 650;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.app-navigation__link:hover {
|
||||
color: var(--color-content);
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
.app-navigation__link.is-active {
|
||||
color: var(--color-action-hover);
|
||||
background: color-mix(in oklch, var(--color-action) 10%, white);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.app-shell__content {
|
||||
grid-area: content;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ui-page {
|
||||
@apply mx-auto flex min-h-screen max-w-4xl flex-col gap-6 p-page;
|
||||
@apply mx-auto flex max-w-6xl flex-col gap-6 p-page;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ui-panel {
|
||||
@@ -43,12 +229,41 @@
|
||||
|
||||
.ui-button {
|
||||
@apply rounded-control bg-action px-4 py-2 font-semibold text-white;
|
||||
display: inline-flex;
|
||||
min-height: 2.75rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 0;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui-button:hover {
|
||||
@apply bg-action-hover;
|
||||
}
|
||||
|
||||
.ui-button:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.ui-button--secondary {
|
||||
border: 1px solid var(--color-surface-muted);
|
||||
color: var(--color-content);
|
||||
background: white;
|
||||
}
|
||||
|
||||
.ui-button--secondary:hover {
|
||||
color: var(--color-action);
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
.ui-button--compact {
|
||||
min-height: 2.25rem;
|
||||
padding: 0.4rem 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.ui-skeleton {
|
||||
@apply h-24 animate-pulse rounded-surface bg-surface-muted;
|
||||
}
|
||||
@@ -57,6 +272,115 @@
|
||||
.ui-terminal-error {
|
||||
@apply rounded-surface border border-surface-muted p-6;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
max-width: 50rem;
|
||||
padding-block: clamp(1rem, 5vw, 3.5rem) 0.5rem;
|
||||
}
|
||||
|
||||
.page-header__eyebrow {
|
||||
margin-block-end: 0.75rem;
|
||||
color: var(--color-action);
|
||||
font-size: 0.8rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.page-header__description {
|
||||
max-width: 45rem;
|
||||
color: var(--color-content-muted);
|
||||
font-size: 1.05rem;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.readiness-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.readiness-grid p,
|
||||
.starter-actions p {
|
||||
margin-block-end: 0;
|
||||
color: var(--color-content-muted);
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.starter-actions,
|
||||
.auth-example {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.button-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.route-loading {
|
||||
padding-block-start: 4rem;
|
||||
}
|
||||
|
||||
.app-shell__scrim {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 47.999rem) {
|
||||
.app-shell {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
"header"
|
||||
"content";
|
||||
}
|
||||
|
||||
.app-shell__header {
|
||||
padding-inline: 0.75rem;
|
||||
}
|
||||
|
||||
.app-shell__menu-button {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.app-shell__sidebar {
|
||||
position: fixed;
|
||||
z-index: 50;
|
||||
top: 4.5rem;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: none;
|
||||
width: min(18rem, 85vw);
|
||||
height: auto;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 10px 0 30px color-mix(in oklch, var(--color-content) 15%, transparent);
|
||||
}
|
||||
|
||||
.app-shell__sidebar[data-open="true"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.app-shell__scrim {
|
||||
position: fixed;
|
||||
z-index: 40;
|
||||
inset: 4.5rem 0 0;
|
||||
display: block;
|
||||
border: 0;
|
||||
background: color-mix(in oklch, var(--color-content) 35%, transparent);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.app-shell__session .session-status {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.readiness-grid {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
|
||||
Reference in New Issue
Block a user