diff --git a/docs/style.css b/docs/style.css index 1948c7779..a236848af 100644 --- a/docs/style.css +++ b/docs/style.css @@ -3,10 +3,11 @@ @import url("observablehq:theme-near-midnight.css") (prefers-color-scheme: dark); :root { - --sans-serif: Inter, -apple-system, BlinkMacSystemFont, "avenir next", avenir, helvetica, "helvetica neue", ubuntu, roboto, - noto, "segoe ui", arial, sans-serif; + --sans-serif: Inter, -apple-system, BlinkMacSystemFont, "avenir next", avenir, helvetica, "helvetica neue", ubuntu, + roboto, noto, "segoe ui", arial, sans-serif; --monospace: "Spline Sans Mono", Menlo, Consolas, monospace; --theme-foreground-focus: #148576; + --observablehq-header-height: 64px; } h1 code, @@ -34,6 +35,22 @@ code:not(pre code, h1 code, h2 code, h3 code, h4 code, h5 code, h6 code) { } } +#observablehq-header { + padding: 0; + left: calc(max(0rem, (100vw - var(--observablehq-max-width)) / 2) + 2rem); + right: calc(max(0rem, (100vw - var(--observablehq-max-width)) / 2) + 2rem); +} + +#observablehq-header > div:first-child { + display: flex; + flex-grow: 1; + align-items: center; + justify-content: space-between; + white-space: nowrap; + margin-left: 2rem; + margin-right: 2rem; +} + #observablehq-header a[href] { color: inherit; } @@ -72,8 +89,9 @@ body { font: 16px/1.5 var(--sans-serif); } -#observablehq-main { +#observablehq-header ~ #observablehq-main { min-height: calc(100vh - 23.8rem); + margin-top: calc(var(--observablehq-header-height) + 2rem); } #observablehq-main a[href]:not(.observablehq-header-anchor) { @@ -96,6 +114,10 @@ h1 { .hide-if-small { display: none !important; } + #observablehq-header > div:first-child { + margin-left: 1.5rem; + margin-right: 0.5rem; + } } @media (min-width: calc(640px + 6rem + 272px)) { @@ -103,6 +125,14 @@ h1 { display: none !important; } } +#observablehq-sidebar > ol:first-child { + padding: 0; +} + +#observablehq-sidebar-close { + top: 0; + justify-content: right; +} #observablehq-sidebar > ol:first-child > li::before { display: none; @@ -113,6 +143,30 @@ h1 { color: inherit; } +#observablehq-sidebar > * { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; +} + +#observablehq-search { + margin-left: 1rem !important; +} + +#observablehq-sidebar .observablehq-link-active::before { + left: -1rem; +} + +#observablehq-sidebar .observablehq-link a, +#observablehq-sidebar summary { + margin-left: -1rem; + padding-left: 2rem; +} + + +#observablehq-header ~ #observablehq-toc { + top: calc(var(--observablehq-header-height)); +} + a.observablehq-version-badge { font: 500 12px var(--sans-serif); display: inline-block; diff --git a/observablehq.config.ts b/observablehq.config.ts index 59b54bdf3..ef63ac2be 100644 --- a/observablehq.config.ts +++ b/observablehq.config.ts @@ -120,10 +120,10 @@ export default { : "" } `, - home: ` + home: ` ${logo()} Framework `, - header: `
+ header: `
${logo()} Framework