Files
CatoandClaude Opus 5.5 d7111fd34f feat(nav): one shell for every page — grouped sidebar, rail, phone tabs, ⌘K palette (#103)
The left panel had grown to 17 flat rows and the public header carried a
second, different grouping of the same pages. Replaced with the shell Loki
and OrangeCat already use: five sections grouped by what a reader is doing
(only the current one opens by itself), an icon rail at 768-1023px and on
collapse, four phone tabs plus More, account things in the account menu,
and the long tail in a command palette that also searches the index.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:44:30 -07:00

177 lines
3.8 KiB
CSS

/*
* Search: the /search page. Instant results, grouped by type. The header
* popover became the command palette (app/styles/shell.css).
*/
.search-kbd,
.search-help kbd {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 1.35rem;
height: 1.35rem;
padding: 0 0.3rem;
border: 1px solid var(--color-border-strong);
border-radius: 0.3rem;
font: 0.7rem/1 var(--font-mono);
color: var(--color-fg-tertiary);
}
.search-mark {
background: color-mix(in srgb, var(--color-status-warning) 30%, transparent);
color: inherit;
border-radius: 0.15rem;
padding: 0 0.05em;
}
.search-page-form {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0 1rem;
border: 1px solid var(--color-border-strong);
border-radius: 0.75rem;
background: var(--color-surface-raised);
}
.search-page-form:focus-within {
border-color: var(--color-fg-secondary);
}
.search-page-icon {
width: 1.25rem;
height: 1.25rem;
flex-shrink: 0;
color: var(--color-fg-tertiary);
}
.search-page-form input {
flex: 1;
min-width: 0;
padding: 1rem 0;
border: 0;
background: transparent;
color: var(--color-fg-primary);
font-size: 1.125rem;
}
.search-page-form input:focus {
outline: none;
}
.search-help {
display: none;
flex-wrap: wrap;
align-items: center;
gap: 0.3rem;
margin-top: 0.6rem;
font-size: 0.75rem;
color: var(--color-fg-muted);
}
/* Keyboard hints only where there is a keyboard. */
.search-page-form .search-kbd {
display: none;
}
@media (hover: hover) and (pointer: fine) {
.search-help {
display: flex;
}
.search-page-form .search-kbd {
display: inline-flex;
}
}
.search-filters,
.search-empty ul {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 1.5rem;
}
.search-empty {
margin-top: 2rem;
color: var(--color-fg-secondary);
}
.search-empty ul {
margin-top: 0.75rem;
}
.search-chip {
display: inline-flex;
align-items: center;
gap: 0.4rem;
min-height: 2.25rem;
padding: 0 0.85rem;
border: 1px solid var(--color-border-subtle);
border-radius: 999px;
font-size: 0.85rem;
color: var(--color-fg-secondary);
background: var(--color-surface-page);
}
.search-chip:hover {
border-color: var(--color-border-strong);
color: var(--color-fg-primary);
}
.search-chip span {
font: 0.75rem/1 var(--font-mono);
color: var(--color-fg-tertiary);
}
.search-chip[aria-current='page'] {
background: var(--color-accent);
border-color: var(--color-accent);
color: var(--color-surface-page);
}
.search-chip[aria-current='page'] span {
color: inherit;
}
.search-status {
margin: 1.25rem 0 0.5rem;
font-size: 0.875rem;
color: var(--color-fg-secondary);
}
.search-group {
margin-top: 2.25rem;
}
.search-group > h2 {
display: flex;
align-items: baseline;
gap: 0.6rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--color-border-strong);
font: 600 1.05rem/1.3 var(--font-heading);
color: var(--color-fg-primary);
}
.search-group > h2 span {
font: 0.75rem/1 var(--font-mono);
color: var(--color-fg-tertiary);
}
.search-hits > li + li {
border-top: 1px solid var(--color-border-subtle);
}
.search-hit {
padding: 0.9rem 0;
max-width: 52rem;
}
.search-hit h3 {
margin: 0.2rem 0;
font: 600 1.1rem/1.35 var(--font-heading);
}
.search-hit h3 a {
color: var(--color-fg-primary);
text-decoration: none;
border-radius: 0.2rem;
}
.search-hit h3 a:hover {
text-decoration: underline;
}
.search-hit h3 a:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 3px;
}
.search-hit-snippet {
font-size: 0.9rem;
line-height: 1.6;
color: var(--color-fg-secondary);
overflow-wrap: anywhere;
}
.search-more {
display: inline-block;
margin-top: 0.25rem;
font-size: 0.85rem;
font-weight: 600;
color: var(--color-fg-secondary);
}
.search-more:hover {
color: var(--color-fg-primary);
}