mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 09:22:15 +00:00
feat(studio): the head band in the dialogs' shape, tools grouped by what they do, book view beside the zoom
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
inspector keep all their room. */
|
||||
|
||||
/* The toggle is the bar's newest tool, so it gives up its label first: from 1360
|
||||
to 1519 it is an icon while the others keep theirs, and the bar fits where it
|
||||
did before. The journey's name gives way too rather than push the bar past
|
||||
the window. */
|
||||
to 1519 it is an icon while the others keep theirs, and the head band fits
|
||||
where it did before. */
|
||||
@media (max-width: 1519px) {
|
||||
.trek-dash .st-assistant-toggle .st-tool-label {
|
||||
display: none;
|
||||
@@ -15,14 +14,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.trek-dash .st-bar .st-back {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.trek-dash .st-bar .st-back > svg {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.trek-dash .st-assistant-notice {
|
||||
margin: 8px 12px 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/* ----------------- head band (StudioHeader.tsx) ----------------- *
|
||||
* The shape every TREK dialog head has: a tinted band, a raised tile, a small
|
||||
* line above the title and a round close button at the end. The band keeps the
|
||||
* glass of the old bar under its tint, so the journey still shows through.
|
||||
*/
|
||||
.trek-dash .st-head {
|
||||
/* Its own stacking context, above the rails: the panels below carry z-index 1,
|
||||
and without this the format menu would open behind them. */
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
padding-inline: 14px 16px;
|
||||
background:
|
||||
linear-gradient(
|
||||
color-mix(in srgb, var(--accent) 7%, transparent),
|
||||
color-mix(in srgb, var(--accent) 7%, transparent)
|
||||
),
|
||||
var(--glass-bg);
|
||||
border-bottom: 1px solid var(--glass-border);
|
||||
backdrop-filter: var(--glass-blur);
|
||||
-webkit-backdrop-filter: var(--glass-blur);
|
||||
}
|
||||
|
||||
/* The journey's cover, so it is always clear whose book this is. */
|
||||
.trek-dash .st-head-tile {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
flex: none;
|
||||
overflow: hidden;
|
||||
border-radius: 13px;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--sh-sm);
|
||||
}
|
||||
.trek-dash .st-head-tile img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.trek-dash .st-head-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
/* The wordmark and the beta mark: what this screen is, quietly, above its name. */
|
||||
.trek-dash .st-head-eyebrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
height: 17px;
|
||||
color: var(--ink-2);
|
||||
}
|
||||
.trek-dash .st-head-eyebrow svg {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.trek-dash .st-head-title {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--ink);
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.01em;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.trek-dash .st-head-sub {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* The format, as a chip that opens the format menu. */
|
||||
.trek-dash .st-head-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 22px;
|
||||
padding-inline: 7px 8px;
|
||||
border-radius: 999px;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--sh-xs);
|
||||
color: var(--ink-2);
|
||||
font-size: 11.5px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
transition:
|
||||
color 0.16s,
|
||||
box-shadow 0.16s;
|
||||
}
|
||||
.trek-dash .st-head-chip:hover {
|
||||
color: var(--ink);
|
||||
box-shadow: var(--sh-sm);
|
||||
}
|
||||
.trek-dash .st-head-chip:focus {
|
||||
outline: none;
|
||||
}
|
||||
.trek-dash .st-head-chip:focus-visible {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--accent-soft),
|
||||
0 0 0 3px var(--accent);
|
||||
}
|
||||
.trek-dash .st-head-chip-shape {
|
||||
flex: none;
|
||||
border: 1.5px solid currentColor;
|
||||
border-radius: 2px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
/* The chip sits on the left, so its menu opens towards the page, not off the window. */
|
||||
.trek-dash .st-head-menu {
|
||||
inset-inline-start: 0;
|
||||
inset-inline-end: auto;
|
||||
}
|
||||
|
||||
.trek-dash .st-head-tools {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex: none;
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
/* Tools that belong together share one raised group, like a segmented control. */
|
||||
.trek-dash .st-head-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 3px;
|
||||
border-radius: 12px;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--sh-xs);
|
||||
}
|
||||
|
||||
.trek-dash .st-head-close {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
flex: none;
|
||||
margin-inline-start: 2px;
|
||||
border-radius: 999px;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--sh-sm);
|
||||
color: var(--ink-3);
|
||||
transition: color 0.16s;
|
||||
}
|
||||
.trek-dash .st-head-close:hover {
|
||||
color: var(--ink);
|
||||
}
|
||||
.trek-dash .st-head-close:focus {
|
||||
outline: none;
|
||||
}
|
||||
.trek-dash .st-head-close:focus-visible {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--accent-soft),
|
||||
0 0 0 3px var(--accent);
|
||||
}
|
||||
|
||||
/* The book view moved to the zoom, where the page's view lives; on reads as pressed. */
|
||||
.trek-dash .st-zoom button.is-on {
|
||||
background: color-mix(in oklch, var(--accent) 14%, transparent);
|
||||
color: var(--ink);
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
z-index: 9999;
|
||||
inset: 16px;
|
||||
display: grid;
|
||||
grid-template-rows: 56px minmax(0, 1fr);
|
||||
grid-template-rows: 72px minmax(0, 1fr);
|
||||
border-radius: var(--r-xl);
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--glass-border);
|
||||
@@ -88,66 +88,7 @@
|
||||
.st-exit { animation-name: st-fade-out; }
|
||||
}
|
||||
|
||||
/* ----------------- top bar ----------------- */
|
||||
.trek-dash .st-bar {
|
||||
/* Its own stacking context, above the rails: the panels below carry z-index 1,
|
||||
and without this the format menu would open behind them. */
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding-block: 0;
|
||||
padding-inline: 10px 18px;
|
||||
min-width: 0;
|
||||
background: var(--glass-bg);
|
||||
border-bottom: 1px solid var(--glass-border);
|
||||
backdrop-filter: var(--glass-blur);
|
||||
-webkit-backdrop-filter: var(--glass-blur);
|
||||
}
|
||||
|
||||
.trek-dash .st-back {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 36px;
|
||||
padding: 0 12px 0 8px;
|
||||
border-radius: 999px;
|
||||
color: var(--ink-2);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.01em;
|
||||
max-width: 240px;
|
||||
transition: background .18s, color .18s;
|
||||
}
|
||||
.trek-dash .st-back:hover { background: var(--accent-soft); color: var(--ink); }
|
||||
.trek-dash .st-back .st-back-label {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* The journey's own cover, so you never lose track of whose book this is. */
|
||||
.trek-dash .st-cover {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: 7px;
|
||||
object-fit: cover;
|
||||
flex: none;
|
||||
border: 1px solid var(--line-2);
|
||||
background: var(--surface-2);
|
||||
}
|
||||
|
||||
.trek-dash .st-bar-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
flex: none;
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
/* The undo/redo pair belongs together; everything else in the group breathes. */
|
||||
.trek-dash .st-bar-group .st-tool.is-icon + .st-tool.is-icon { margin-inline-start: -5px; }
|
||||
|
||||
/* ----------------- tools (head band and elsewhere) ----------------- */
|
||||
.trek-dash .st-tool {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -1506,20 +1447,6 @@
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
/* ----------------- brand ----------------- *
|
||||
* The lockup takes the bar's ink through `currentColor`, so it is dark on a
|
||||
* light theme and light on a dark one from one copy of the artwork.
|
||||
*/
|
||||
.trek-dash .st-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
flex: 0 0 auto;
|
||||
color: var(--ink);
|
||||
min-width: 0;
|
||||
}
|
||||
.trek-dash .st-brand svg { flex: none; }
|
||||
|
||||
/* Small, quiet and set apart — a beta mark states a fact about the feature; it
|
||||
is not a call to action and should not read as one. */
|
||||
.trek-dash .st-beta {
|
||||
|
||||
Reference in New Issue
Block a user