Previously the picker silently hid when the URL didn't contain a /<version>/ segment — which is exactly the case for `just build` opened via file://. The reader saw no version indicator at all. Now the picker always mounts a "version: latest" label first (immediately, before any fetch). When a versions.json is reachable AND we have a real version segment in the URL (so navigation is computable), the label upgrades into the existing dropdown. On file:// or single-version sites the static label stays. CSS gains styling for the static "version: <name>" name span. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
52 lines
954 B
CSS
52 lines
954 B
CSS
.version-picker {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4em;
|
|
margin: 0 0.4em;
|
|
font-size: 0.85em;
|
|
line-height: 1;
|
|
}
|
|
|
|
.version-picker-label {
|
|
color: var(--icons);
|
|
text-transform: lowercase;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
.version-picker-select {
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
border: 1px solid var(--icons);
|
|
border-radius: 3px;
|
|
padding: 0.2em 0.45em;
|
|
cursor: pointer;
|
|
font: inherit;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.version-picker-select:hover,
|
|
.version-picker-select:focus {
|
|
border-color: var(--fg);
|
|
outline: none;
|
|
}
|
|
|
|
.version-picker-name {
|
|
color: var(--fg);
|
|
font-weight: 600;
|
|
padding: 0.2em 0.45em;
|
|
border: 1px solid transparent;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.version-picker-floating {
|
|
position: fixed;
|
|
top: 0.5em;
|
|
right: 0.5em;
|
|
z-index: 1000;
|
|
background: var(--bg);
|
|
padding: 0.4em 0.6em;
|
|
border: 1px solid var(--icons);
|
|
border-radius: 4px;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
|
|
}
|