Skip to content

Commit 20c00cd

Browse files
committed
Refine docs styling and page title
1 parent 2b49f8f commit 20c00cd

File tree

5 files changed

+39
-10
lines changed

5 files changed

+39
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
**Fast and powerful**<br>
2121
🪶 **Lightweight and flexible**<br>
22-
🏗 **Universal: Works in Browsers, Node.js, Deno and Bun**<br>
22+
🏗 **Universal: Works in Browsers, Workers, Node.js, Deno and Bun**<br>
2323
👮‍️ **Fully typed with TypeScript support (native source maps)**<br>
2424
🗃 **_Pretty_ or `JSON` output**<br>
2525
📝 **Customizable log level**<br>

docs/astro.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ export default defineConfig({
99
description:
1010
"Beautiful logging experience for TypeScript and JavaScript.",
1111
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 4 },
12+
components: { PageTitle: "./src/overrides/PageTitle.astro" },
1213
customCss: ["./src/styles/custom.css"],
1314
head: [
15+
// Override <title> (replaces Starlight's auto-generated "{page} | {site}" title)
16+
{
17+
tag: "title",
18+
content:
19+
"tslog: Beautiful logging experience for TypeScript and JavaScript",
20+
},
1421
// Force light mode
1522
{
1623
tag: "script",

docs/src/overrides/PageTitle.astro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
const heading = "Beautiful logging experience for TypeScript";
3+
---
4+
5+
<h1 id="_top" set:html={heading} />

docs/src/styles/custom.css

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@
4040
color-scheme: light;
4141
}
4242

43-
/* ── Hide header entirely (docsify has no top bar) ── */
43+
/* ── Hide header (docsify has no top bar) ── */
4444
header.header {
4545
display: none !important;
4646
}
4747

48-
/* Hide theme toggle */
49-
starlight-theme-select {
50-
display: none !important;
51-
}
52-
5348
/* ── Page layout: no top padding since header is hidden ── */
5449
.page {
5550
padding-top: 0 !important;
5651
}
5752

53+
/* Hide theme toggle */
54+
starlight-theme-select {
55+
display: none !important;
56+
}
57+
5858
/* ── Left sidebar (Starlight's nav sidebar) — hide it (single-page doc) ── */
5959
nav.sidebar,
6060
.sidebar-pane {
@@ -85,9 +85,9 @@ nav.sidebar,
8585
width: var(--sl-sidebar-width) !important;
8686
height: 100vh !important;
8787
border-inline-start: none !important;
88-
border-inline-end: 1px solid hsl(0, 0%, 90%) !important;
88+
border-inline-end: none !important;
8989
padding-top: 1.5rem !important;
90-
background: var(--sl-color-black) !important;
90+
background: rgba(255, 255, 255, 0.3) !important;
9191
overflow-y: auto !important;
9292
}
9393

@@ -259,6 +259,23 @@ nav.sidebar,
259259
display: none !important;
260260
}
261261

262+
/* ── Background — soft ambient glow across the full viewport ── */
263+
body::before {
264+
content: "";
265+
position: absolute;
266+
top: 0;
267+
left: 0;
268+
width: 100%;
269+
height: 100%;
270+
background: radial-gradient(
271+
ellipse 100% 60% at 50% 0%,
272+
hsla(153, 47%, 72%, 0.4),
273+
transparent
274+
);
275+
pointer-events: none;
276+
z-index: 0;
277+
}
278+
262279
/* ── Smooth scrolling ── */
263280
html {
264281
scroll-behavior: smooth;

tsconfig.types.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"root":["./src/baselogger.ts","./src/formatnumberaddzeros.ts","./src/formattemplate.ts","./src/index.browser.ts","./src/index.ts","./src/interfaces.ts","./src/prettylogstyles.ts","./src/urltoobj.ts","./src/internal/inspectoptions.interface.ts","./src/internal/environment.ts","./src/internal/errorutils.ts","./src/internal/jsonstringifyrecursive.ts","./src/internal/metaformatting.ts","./src/internal/stacktrace.ts","./src/internal/util.inspect.polyfill.ts"],"version":"5.9.2"}
1+
{"root":["./src/baselogger.ts","./src/formatnumberaddzeros.ts","./src/formattemplate.ts","./src/index.browser.ts","./src/index.ts","./src/interfaces.ts","./src/prettylogstyles.ts","./src/urltoobj.ts","./src/internal/inspectoptions.interface.ts","./src/internal/environment.ts","./src/internal/errorutils.ts","./src/internal/jsonstringifyrecursive.ts","./src/internal/metaformatting.ts","./src/internal/stacktrace.ts","./src/internal/util.inspect.polyfill.ts"],"version":"5.9.3"}

0 commit comments

Comments
 (0)