feat(web): add ChicoryTV app shell

refs #82
This commit is contained in:
2026-07-02 18:21:59 +02:00
parent d1cc12e065
commit 5fb3bb2ebc
4 changed files with 1182 additions and 595 deletions
+476 -275
View File
@@ -2,141 +2,196 @@
min-height: 100vh;
display: grid;
grid-template-columns: var(--sidebar-w, 232px) minmax(0, 1fr);
background: var(--surface-app, #12100e);
color: var(--text-primary, #f0ebe4);
overflow: hidden;
background: var(--surface-app);
color: var(--text-primary);
font-family: var(--font-sans, system-ui, sans-serif);
font-size: var(--text-sm, 13px);
line-height: var(--leading-normal, 1.5);
}
.ctv-sidebar {
border-right: 1px solid var(--border-hairline, #2e2823);
background: var(--ctv-bg-sunken, #0c0b09);
padding: var(--space-7, 16px) var(--space-5, 10px);
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
border-right: 1px solid var(--border-hairline);
background: var(--surface-card);
}
.ctv-brand {
height: var(--topbar-h, 52px);
display: flex;
flex: 0 0 auto;
align-items: center;
gap: var(--space-5, 10px);
padding: 0 var(--space-5, 10px) var(--space-8, 20px);
padding: 0 14px;
border-bottom: 1px solid var(--border-hairline);
}
.ctv-brand img {
width: 34px;
height: 34px;
width: 24px;
height: 24px;
}
.ctv-brand h1,
.ctv-topbar h2,
.ctv-panel h3 {
margin: 0;
letter-spacing: var(--tracking-normal, 0);
}
.ctv-brand h1 {
.ctv-brand-wordmark {
color: var(--text-primary);
font-size: var(--text-lg, 16px);
line-height: var(--leading-tight, 1.2);
font-weight: var(--weight-semibold, 600);
line-height: 1;
}
.ctv-brand span,
.ctv-topbar p,
.ctv-panel-header p,
.ctv-stats span {
color: var(--text-secondary, #9aa4b2);
}
.ctv-brand span,
.ctv-panel-header p,
.ctv-topbar p {
font-size: var(--text-xs, 12px);
.ctv-brand-wordmark span {
color: var(--action-primary);
}
.ctv-nav {
display: grid;
gap: var(--space-2, 4px);
flex: 1;
overflow: auto;
padding: var(--space-4, 8px) var(--space-4, 8px) var(--space-8, 20px);
}
.ctv-nav a {
position: relative;
.ctv-sidebar-health {
min-height: 58px;
display: flex;
flex: 0 0 auto;
align-items: center;
justify-content: space-between;
gap: var(--space-5, 10px);
padding: var(--space-6, 12px) 14px;
border-top: 1px solid var(--border-hairline);
}
.ctv-sidebar-health div {
min-width: 0;
display: grid;
gap: var(--space-1, 2px);
}
.ctv-sidebar-health span {
color: var(--text-disabled);
font-size: var(--text-2xs, 11px);
}
.ctv-sidebar-health code {
color: var(--text-secondary);
font-family: var(--font-mono, ui-monospace, monospace);
font-size: var(--text-2xs, 11px);
}
.ctv-shell-body {
min-width: 0;
height: 100vh;
display: grid;
grid-template-rows: var(--topbar-h, 52px) minmax(0, 1fr);
overflow: hidden;
}
.ctv-topbar {
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-7, 16px);
padding: 0 20px;
border-bottom: 1px solid var(--border-hairline);
background: var(--surface-app);
}
.ctv-topbar-title {
width: 150px;
flex: 0 0 auto;
min-width: 0;
}
.ctv-topbar-title p {
margin: 0 0 var(--space-1, 2px);
color: var(--text-disabled);
font-size: var(--text-2xs, 11px);
font-weight: var(--weight-semibold, 600);
letter-spacing: var(--tracking-caps, 0.06em);
line-height: 1;
text-transform: uppercase;
}
.ctv-topbar-title h1 {
margin: 0;
overflow: hidden;
color: var(--text-primary);
font-size: var(--text-lg, 16px);
font-weight: var(--weight-semibold, 600);
letter-spacing: var(--tracking-tight, -0.01em);
line-height: 1.1;
text-overflow: ellipsis;
white-space: nowrap;
}
.ctv-topbar-search {
width: min(300px, 28vw);
height: var(--control-h-sm, 28px);
display: flex;
align-items: center;
gap: var(--space-4, 8px);
height: var(--control-h, 34px);
padding: 0 var(--space-5, 10px);
border: 1px solid var(--border-control);
border-radius: var(--radius-sm, 5px);
color: var(--text-secondary, #a89e92);
text-decoration: none;
font-size: var(--text-sm, 13px);
transition:
background var(--dur-fast, 90ms) var(--ease-standard, ease),
color var(--dur-fast, 90ms) var(--ease-standard, ease);
background: var(--ctv-bg-sunken);
color: var(--text-disabled);
padding: 0 var(--space-5, 10px);
}
.ctv-nav a:hover,
.ctv-nav a.is-active {
background: var(--surface-selected, #2c2620);
color: var(--text-primary, #f0ebe4);
.ctv-topbar-search:focus-within {
border-color: var(--action-primary);
box-shadow: var(--ring-focus);
}
.ctv-nav a.is-active::before {
position: absolute;
left: 0;
width: 3px;
height: var(--space-8, 20px);
.ctv-topbar-search input {
min-width: 0;
flex: 1;
border: 0;
outline: 0;
background: transparent;
color: var(--text-primary);
font: inherit;
}
.ctv-topbar-search input::placeholder {
color: var(--text-disabled);
}
.ctv-topbar-spacer {
flex: 1;
}
.ctv-topbar-tools {
display: flex;
align-items: center;
gap: var(--space-3, 6px);
}
.ctv-topbar-divider {
width: 1px;
height: 18px;
margin: 0 var(--space-2, 4px);
background: var(--border-hairline);
}
.ctv-avatar {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid color-mix(in srgb, var(--action-primary) 35%, transparent);
border-radius: var(--radius-pill, 999px);
background: var(--action-primary, #e08a3c);
content: "";
background: var(--ctv-accent-soft);
color: var(--action-primary);
font-family: var(--font-mono, ui-monospace, monospace);
font-size: var(--text-2xs, 11px);
font-weight: var(--weight-semibold, 600);
}
.ctv-main {
min-width: 0;
padding: var(--space-9, 24px) var(--pad-page, 32px);
}
.ctv-topbar {
min-height: var(--topbar-h, 52px);
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-7, 16px);
border-bottom: 1px solid var(--border-hairline, #2e2823);
padding-bottom: var(--space-8, 20px);
}
.ctv-topbar h2 {
font-size: var(--text-xl, 20px);
line-height: var(--leading-tight, 1.2);
}
.ctv-topbar p,
.ctv-panel-header p {
margin: 0 0 var(--space-2, 4px);
text-transform: uppercase;
font-weight: var(--weight-semibold, 600);
letter-spacing: var(--tracking-caps, 0.06em);
}
.ctv-primary-action {
height: var(--control-h, 34px);
display: inline-flex;
align-items: center;
gap: var(--gap-inline, 8px);
border: 1px solid var(--action-primary, #e08a3c);
border-radius: var(--radius-sm, 5px);
background: var(--action-primary, #e08a3c);
color: var(--text-on-accent, #1f1204);
padding: 0 var(--space-6, 12px);
font: inherit;
font-weight: var(--weight-semibold, 600);
transition:
background var(--dur-fast, 90ms) var(--ease-standard, ease),
border-color var(--dur-fast, 90ms) var(--ease-standard, ease);
}
.ctv-primary-action:hover {
border-color: var(--action-primary-hover, #ec9a52);
background: var(--action-primary-hover, #ec9a52);
overflow: auto;
padding: var(--space-7, 16px) var(--pad-page, 32px) var(--pad-page, 32px);
}
.ctv-theme-switcher {
@@ -144,12 +199,12 @@
align-items: center;
justify-content: flex-end;
gap: var(--gap-inline, 8px);
margin-top: var(--space-7, 16px);
color: var(--text-secondary, #a89e92);
margin-bottom: var(--space-7, 16px);
color: var(--text-secondary);
font-size: var(--text-xs, 12px);
}
.ctv-theme-switcher span {
.ctv-theme-switcher > span {
font-weight: var(--weight-semibold, 600);
letter-spacing: var(--tracking-caps, 0.06em);
text-transform: uppercase;
@@ -167,22 +222,15 @@
border-radius: var(--radius-pill, 999px);
cursor: pointer;
padding: 0;
transition:
border-color var(--dur-fast, 90ms) var(--ease-standard, ease),
transform var(--dur-fast, 90ms) var(--ease-standard, ease);
}
.ctv-theme-swatch:hover {
transform: translateY(-1px);
}
.ctv-theme-swatch:focus-visible {
outline: 0;
box-shadow: var(--ring-focus, 0 0 0 3px var(--focus-ring));
box-shadow: var(--ring-focus);
}
.ctv-theme-swatch[aria-pressed="true"] {
border-color: var(--text-primary, #f0ebe4);
border-color: var(--text-primary);
}
.ctv-theme-swatch-warm {
@@ -197,88 +245,287 @@
background: linear-gradient(135deg, #5b7cfa 0 50%, #f0663f 50% 100%);
}
.ctv-panel {
margin-top: var(--space-9, 24px);
border: 1px solid var(--border-hairline, #2e2823);
border-radius: var(--radius-md, 7px);
background: var(--surface-card, #1c1917);
.ctv-connect {
position: relative;
}
.ctv-panel-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-7, 16px);
padding: var(--space-7, 16px);
border-bottom: 1px solid var(--border-hairline, #2e2823);
}
.ctv-panel h3 {
font-size: var(--text-lg, 16px);
line-height: var(--leading-snug, 1.35);
}
.ctv-status {
.ctv-connect-button {
height: var(--control-h-sm, 28px);
display: inline-flex;
align-items: center;
gap: var(--space-3, 6px);
border-radius: var(--radius-pill, 999px);
background: var(--ctv-ok-soft, rgba(63, 185, 132, 0.14));
color: var(--status-ok, #3fb984);
padding: var(--space-2, 4px) var(--space-4, 8px);
font-size: var(--text-xs, 12px);
font-weight: var(--weight-semibold, 600);
border: 1px solid var(--border-control);
border-radius: var(--radius-sm, 5px);
background: var(--surface-raised);
color: var(--text-primary);
cursor: pointer;
padding: 0 var(--space-5, 10px);
font: inherit;
font-weight: var(--weight-medium, 500);
}
.ctv-stats {
.ctv-connect-button svg:first-child {
color: var(--action-primary);
}
.ctv-connect-dismiss {
position: fixed;
inset: 0;
z-index: 40;
border: 0;
background: transparent;
cursor: default;
}
.ctv-connect-menu {
position: absolute;
top: calc(100% + 8px);
right: 0;
z-index: 41;
width: 340px;
display: grid;
gap: var(--space-4, 8px);
border: 1px solid var(--border-control);
border-radius: var(--radius-md, 7px);
background: var(--surface-raised);
box-shadow: var(--shadow-pop);
padding: 14px;
}
.ctv-connect-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--space-2, 4px);
}
.ctv-connect-header strong {
font-size: var(--text-sm, 13px);
}
.ctv-connect-header span,
.ctv-connect-menu p {
color: var(--text-disabled);
font-size: var(--text-2xs, 11px);
}
.ctv-connect-endpoint {
min-width: 0;
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: var(--space-5, 10px);
border: 1px solid var(--border-hairline);
border-radius: var(--radius-sm, 5px);
background: var(--ctv-bg-sunken);
padding: var(--space-5, 10px);
}
.ctv-connect-endpoint-icon {
width: 30px;
height: 30px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-xs, 3px);
background: var(--surface-selected);
color: var(--action-primary);
}
.ctv-connect-endpoint div {
min-width: 0;
display: grid;
gap: var(--space-1, 2px);
}
.ctv-connect-endpoint strong {
color: var(--text-primary);
font-size: var(--text-xs, 12px);
}
.ctv-connect-endpoint code {
overflow: hidden;
color: var(--text-secondary);
font-family: var(--font-mono, ui-monospace, monospace);
font-size: var(--text-2xs, 11px);
text-overflow: ellipsis;
white-space: nowrap;
}
.ctv-connect-endpoint button {
display: inline-flex;
align-items: center;
gap: var(--space-2, 4px);
border: 1px solid var(--border-control);
border-radius: var(--radius-xs, 3px);
background: var(--surface-raised);
color: var(--text-secondary);
cursor: pointer;
padding: var(--space-2, 4px) var(--space-4, 8px);
font: inherit;
font-size: var(--text-2xs, 11px);
font-weight: var(--weight-medium, 500);
}
.ctv-connect-option {
display: flex;
align-items: center;
gap: var(--space-4, 8px);
border: 1px solid var(--border-hairline);
border-radius: var(--radius-sm, 5px);
background: var(--ctv-bg-sunken);
color: var(--text-primary);
cursor: pointer;
padding: var(--space-4, 8px) var(--space-5, 10px);
font-size: var(--text-xs, 12px);
}
.ctv-connect-option input {
accent-color: var(--action-primary);
}
.ctv-connect-menu p {
display: flex;
align-items: center;
gap: var(--space-3, 6px);
margin: var(--space-2, 4px) 0 0;
}
.ctv-screen-stack {
display: grid;
gap: var(--space-7, 16px);
}
.ctv-dashboard-grid {
display: grid;
grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
gap: var(--space-7, 16px);
align-items: start;
}
.ctv-card-title h2,
.ctv-placeholder-layout h3 {
margin: 0;
color: var(--text-primary);
font-size: var(--text-md, 14px);
font-weight: var(--weight-semibold, 600);
line-height: 1.2;
}
.ctv-onair-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: var(--space-5, 10px);
}
.ctv-stats div {
.ctv-onair-card {
min-width: 0;
display: grid;
gap: var(--space-5, 10px);
border: 1px solid var(--border-hairline);
border-radius: var(--radius-md, 7px);
background: var(--ctv-bg-sunken);
padding: var(--space-6, 12px);
}
.ctv-onair-head {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: var(--space-4, 8px);
}
.ctv-onair-head div {
min-width: 0;
display: grid;
gap: var(--space-1, 2px);
}
.ctv-onair-head code,
.ctv-activity-list code,
.ctv-live-channel-row code {
color: var(--text-secondary);
font-family: var(--font-mono, ui-monospace, monospace);
font-size: var(--text-2xs, 11px);
}
.ctv-onair-head strong,
.ctv-onair-card p,
.ctv-live-channel-row strong,
.ctv-live-channel-row span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ctv-onair-card p {
margin: 0;
color: var(--text-primary);
}
.ctv-health-list {
display: grid;
gap: var(--space-5, 10px);
}
.ctv-stat-row {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: var(--space-7, 16px);
}
.ctv-activity-list {
display: grid;
gap: var(--space-3, 6px);
padding: var(--space-7, 16px);
border-right: 1px solid var(--border-hairline, #2e2823);
}
.ctv-stats div:last-child {
border-right: 0;
.ctv-activity-list div {
min-height: 40px;
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: var(--space-4, 8px);
border-bottom: 1px solid var(--border-hairline);
}
.ctv-stats strong {
font-family: var(--font-mono, ui-monospace, monospace);
font-size: var(--text-2xl, 26px);
font-feature-settings: var(--numeric-feature);
font-variant-numeric: tabular-nums;
line-height: 1;
.ctv-activity-list div:last-child {
border-bottom: 0;
}
.ctv-activity-list span:nth-child(2) {
overflow: hidden;
color: var(--text-primary);
text-overflow: ellipsis;
white-space: nowrap;
}
.ctv-live-channel-body {
padding: var(--space-7, 16px);
min-height: 96px;
}
.ctv-live-channel-state {
min-height: 72px;
min-height: 96px;
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-4, 8px);
color: var(--text-secondary, #a89e92);
color: var(--text-secondary);
}
.ctv-live-channel-state-error {
min-height: 0;
align-items: flex-start;
flex-direction: column;
border: 1px solid var(--status-error, #f0663f);
justify-content: flex-start;
border: 1px solid var(--status-error);
border-radius: var(--radius-md, 7px);
background: var(--ctv-error-soft, rgba(240, 102, 63, 0.14));
color: var(--text-primary, #f0ebe4);
background: var(--ctv-error-soft);
color: var(--text-primary);
padding: var(--space-6, 12px);
}
.ctv-live-channel-state-error span {
color: var(--status-error, #f0663f);
color: var(--status-error);
font-size: var(--text-xs, 12px);
font-weight: var(--weight-semibold, 600);
letter-spacing: var(--tracking-caps, 0.06em);
@@ -296,169 +543,123 @@
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: var(--space-5, 10px);
border: 1px solid var(--border-hairline, #2e2823);
border: 1px solid var(--border-hairline);
border-radius: var(--radius-sm, 5px);
background: var(--surface-raised, #211d19);
background: var(--ctv-bg-sunken);
padding: var(--space-4, 8px);
}
.ctv-live-channel-row div {
min-width: 0;
display: grid;
}
.ctv-live-channel-row strong,
.ctv-live-channel-row span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
gap: var(--space-1, 2px);
}
.ctv-live-channel-row span {
color: var(--text-secondary, #a89e92);
color: var(--text-secondary);
font-size: var(--text-xs, 12px);
}
.ctv-live-channel-row code {
border-radius: var(--radius-sm, 5px);
background: var(--surface-selected, #2c2620);
color: var(--text-primary, #f0ebe4);
font-family: var(--font-mono, ui-monospace, monospace);
font-size: var(--text-xs, 12px);
background: var(--surface-selected);
color: var(--text-primary);
padding: var(--space-2, 4px) var(--space-3, 6px);
}
.ctv-gallery {
margin-top: var(--space-9, 24px);
.ctv-placeholder-layout {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: var(--space-7, 16px);
min-height: 160px;
}
.ctv-gallery-heading {
margin-bottom: var(--space-7, 16px);
.ctv-placeholder-icon {
width: 52px;
height: 52px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid color-mix(in srgb, var(--action-primary) 30%, transparent);
border-radius: var(--radius-md, 7px);
background: var(--ctv-accent-soft);
color: var(--action-primary);
}
.ctv-gallery-heading p {
margin: 0 0 var(--space-2, 4px);
color: var(--text-secondary, #a89e92);
.ctv-placeholder-icon svg {
width: 22px;
height: 22px;
}
.ctv-placeholder-layout p {
max-width: 640px;
margin: var(--space-3, 6px) 0 0;
color: var(--text-secondary);
}
.ctv-slot-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: var(--space-5, 10px);
}
.ctv-slot-grid span {
min-height: 92px;
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed var(--border-control);
border-radius: var(--radius-md, 7px);
background: var(--ctv-bg-sunken);
color: var(--text-secondary);
font-size: var(--text-xs, 12px);
font-weight: var(--weight-semibold, 600);
letter-spacing: var(--tracking-caps, 0.06em);
text-transform: uppercase;
}
.ctv-gallery-heading h2 {
margin: 0;
font-size: var(--text-xl, 20px);
line-height: var(--leading-tight, 1.2);
}
.ctv-gallery-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-7, 16px);
}
.ctv-card-title h3 {
margin: 0;
font-size: var(--text-md, 14px);
line-height: 1.2;
}
.ctv-demo-stack {
display: flex;
flex-direction: column;
gap: var(--space-7, 16px);
}
.ctv-demo-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-5, 10px);
}
.ctv-demo-fields {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-7, 16px);
}
.ctv-stat-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-8, 20px);
}
.ctv-demo-progress {
display: flex;
flex-direction: column;
gap: var(--space-6, 12px);
}
.ctv-feedback-grid {
display: grid;
grid-template-columns: minmax(260px, 1fr) auto;
gap: var(--space-7, 16px);
align-items: start;
}
.ctv-navigation-demo {
display: grid;
grid-template-columns: 216px minmax(0, 1fr);
gap: var(--space-8, 20px);
align-items: start;
}
.ctv-navigation-panel {
border: 1px solid var(--border-hairline, #2e2823);
border-radius: var(--radius-md, 7px);
background: var(--surface-card, #1c1917);
padding: var(--space-3, 6px);
}
@media (max-width: 720px) {
@media (max-width: 980px) {
.ctv-app-shell {
grid-template-columns: 1fr;
overflow: auto;
}
.ctv-sidebar,
.ctv-shell-body {
height: auto;
}
.ctv-sidebar {
border-right: 0;
border-bottom: 1px solid var(--border-hairline, #2e2823);
position: sticky;
top: 0;
z-index: 20;
}
.ctv-nav,
.ctv-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ctv-main {
padding: var(--space-8, 20px) var(--space-7, 16px);
.ctv-sidebar-health {
display: none;
}
.ctv-topbar {
align-items: flex-start;
flex-direction: column;
flex-wrap: wrap;
height: auto;
min-height: var(--topbar-h, 52px);
padding: var(--space-4, 8px) var(--space-6, 12px);
}
.ctv-theme-switcher {
justify-content: flex-start;
.ctv-topbar-search {
width: min(100%, 340px);
}
.ctv-gallery-grid,
.ctv-demo-fields,
.ctv-feedback-grid,
.ctv-navigation-demo {
.ctv-main {
padding: var(--space-6, 12px);
}
.ctv-dashboard-grid,
.ctv-stat-row,
.ctv-onair-grid,
.ctv-slot-grid {
grid-template-columns: 1fr;
}
}
@media (prefers-reduced-motion: reduce) {
.ctv-nav a,
.ctv-primary-action,
.ctv-theme-swatch {
transition: none;
}
.ctv-theme-swatch:hover {
transform: none;
}
}