Skip to content

Commit e8aae22

Browse files
committed
Update package logo
Added the logo to the version landing page and kept it theme-aware. What changed: - Inserted the brand logo above the hero title in metbit/docs/app/docs/[version]/page.tsx:29. - Fixed the logo component so light theme uses Metbit-logo-light-mode.svg and dark theme uses Metbit-logo-dark-mode.svg in metbit/docs/app/components/MetbitMark.tsx:1. - Added sizing for the hero placement in metbit/docs/app/globals.css:286. - Kept the topbar brand accessible with an explicit label in metbit/docs/app/components/VersionedDocsShell.tsx:60. Verified: - npm run lint passed. - npm run build passed. Updated: - Increased the top-left logo size in the header. - Shifted the Install / User Guide / API / Release history nav closer to the logo by tightening topbar spacing. - Expanded the left sidebar width. - Made the left sidebar extend with the full page instead of stopping at the viewport. - Widened the main content/footer canvas so the page carries through to the footer more naturally. Key CSS changes are in metbit/docs/app/globals.css:264. Verified: - npm run lint passed. - npm run build passed.
1 parent eba1fa0 commit e8aae22

13 files changed

Lines changed: 99 additions & 30 deletions

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<p align="center">
2+
<img src="public/logo/Metbit-logo-only.svg" alt="metbit" width="180" />
3+
</p>
4+
15
# metbit documentation site
26

37
This is the Next.js documentation app for `metbit`. It provides release-specific

docs/app/components/MetbitMark.tsx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1+
import Image from 'next/image'
2+
13
export default function MetbitMark() {
24
return (
3-
<svg className="metbitMark" viewBox="0 0 44 30" role="img" aria-label="metbit">
4-
<path d="M2 26h40" />
5-
<path d="M5 26V20M10 26V13M15 26V4M20 26V17M25 26V9M30 26V21M35 26V15M40 26V23" />
6-
</svg>
5+
<span className="metbitLogo" aria-hidden="true">
6+
<Image
7+
className="metbitLogoImage metbitLogoLight"
8+
src="/logo/Metbit-logo-light-mode.svg"
9+
alt=""
10+
aria-hidden="true"
11+
fill
12+
sizes="126px"
13+
unoptimized
14+
/>
15+
<Image
16+
className="metbitLogoImage metbitLogoDark"
17+
src="/logo/Metbit-logo-dark-mode.svg"
18+
alt=""
19+
aria-hidden="true"
20+
fill
21+
sizes="126px"
22+
unoptimized
23+
/>
24+
</span>
725
)
826
}

docs/app/components/VersionedDocsShell.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ export default function VersionedDocsShell({
5757
return (
5858
<div className="versionedDocs">
5959
<header className="docsTopbar">
60-
<Link className="docsBrand" href={`/docs/${encodeURIComponent(release.tag)}`}>
60+
<Link
61+
className="docsBrand"
62+
href={`/docs/${encodeURIComponent(release.tag)}`}
63+
aria-label="metbit documentation home"
64+
>
6165
<MetbitMark />
62-
<span>metbit</span>
6366
</Link>
6467
<nav className="primaryDocsNav" aria-label="Primary documentation">
6568
<Link href={`/docs/${encodeURIComponent(release.tag)}/getting-started`}>Install</Link>

docs/app/docs/[version]/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Link from 'next/link'
33
import { notFound } from 'next/navigation'
44
import { FiActivity, FiArrowRight, FiDatabase, FiLayers, FiSettings } from 'react-icons/fi'
55

6+
import MetbitMark from '../../components/MetbitMark'
67
import { formatDate, getRelease, getSnapshot, moduleHref } from '@/lib/versioned-docs'
78

89
export async function generateMetadata({
@@ -27,6 +28,9 @@ export default async function VersionOverview({
2728

2829
return (
2930
<article className="referencePage" id="top">
31+
<div className="referenceHeroBrand">
32+
<MetbitMark />
33+
</div>
3034
<div className="breadcrumbs">Documentation / {release.tag}</div>
3135
<div className="versionNotice">
3236
You are viewing metbit {release.version}, published {formatDate(release.publishedAt)}.

docs/app/globals.css

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
267267
display: grid;
268268
grid-template-columns: auto auto minmax(220px, 1fr) auto auto auto;
269269
align-items: center;
270-
gap: 22px;
270+
gap: 14px;
271271
height: 64px;
272272
padding: 0 28px;
273273
color: #edf7fa;
@@ -279,20 +279,49 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
279279
.docsBrand {
280280
display: inline-flex;
281281
align-items: center;
282-
gap: 10px;
282+
gap: 12px;
283283
color: #fff;
284-
font-size: 1.38rem;
285-
font-weight: 760;
286-
letter-spacing: -0.035em;
287284
}
288285

289-
.metbitMark {
290-
width: 40px;
291-
height: 28px;
292-
fill: none;
293-
stroke: #48c8cf;
294-
stroke-width: 2.4;
295-
stroke-linecap: round;
286+
.docsBrand .metbitLogo {
287+
width: 154px;
288+
height: 40px;
289+
}
290+
291+
.metbitLogo {
292+
position: relative;
293+
display: block;
294+
width: 126px;
295+
height: 34px;
296+
flex: 0 0 auto;
297+
}
298+
299+
.referenceHeroBrand {
300+
margin: 0 0 22px;
301+
}
302+
303+
.referenceHeroBrand .metbitLogo {
304+
width: 260px;
305+
height: 70px;
306+
}
307+
308+
.metbitLogoImage {
309+
position: absolute;
310+
inset: 0;
311+
width: 100%;
312+
height: 100%;
313+
object-fit: contain;
314+
object-position: left center;
315+
display: none;
316+
}
317+
318+
:root[data-theme="light"] .metbitLogoLight,
319+
:root:not([data-theme]) .metbitLogoLight {
320+
display: block;
321+
}
322+
323+
:root[data-theme="dark"] .metbitLogoDark {
324+
display: block;
296325
}
297326

298327
.primaryDocsNav {
@@ -415,17 +444,17 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
415444

416445
.docsWorkspace {
417446
display: grid;
418-
grid-template-columns: 284px minmax(0, 1fr) 190px;
447+
grid-template-columns: 352px minmax(0, 1fr) 220px;
448+
align-items: stretch;
419449
min-height: calc(100vh - 64px);
420450
}
421451

422452
.docsSidebar {
423453
position: sticky;
424454
top: 64px;
425-
align-self: start;
426-
height: calc(100vh - 64px);
427-
overflow-y: auto;
428-
padding: 24px 20px 30px;
455+
align-self: stretch;
456+
min-height: calc(100vh - 64px);
457+
padding: 28px 26px 30px;
429458
background: var(--docs-sidebar);
430459
border-right: 1px solid var(--border);
431460
}
@@ -482,12 +511,12 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
482511

483512
.docsMain {
484513
min-width: 0;
485-
padding: 42px clamp(28px, 5vw, 76px) 80px;
514+
padding: 42px clamp(32px, 4vw, 88px) 80px;
486515
background: var(--card);
487516
}
488517

489518
.referencePage {
490-
width: min(100%, 880px);
519+
width: min(100%, 1100px);
491520
margin: 0 auto;
492521
color: var(--text);
493522
line-height: 1.68;
@@ -687,7 +716,7 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
687716
top: 64px;
688717
align-self: start;
689718
height: calc(100vh - 64px);
690-
padding: 38px 24px;
719+
padding: 38px 26px;
691720
border-left: 1px solid var(--border);
692721
background: var(--card);
693722
}
@@ -708,7 +737,7 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
708737
.docsMobileFooter { display: none; }
709738

710739
.downloadFooter {
711-
width: min(100%, 880px);
740+
width: min(100%, 1100px);
712741
margin: 72px auto 0;
713742
padding: 28px 0 6px;
714743
color: var(--text);
@@ -816,7 +845,7 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
816845
@media (max-width: 1180px) {
817846
.docsTopbar { grid-template-columns: auto minmax(220px, 1fr) auto auto auto; }
818847
.primaryDocsNav { display: none; }
819-
.docsWorkspace { grid-template-columns: 260px minmax(0, 1fr); }
848+
.docsWorkspace { grid-template-columns: 308px minmax(0, 1fr); }
820849
.docsToc { display: none; }
821850
}
822851

@@ -838,7 +867,8 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
838867
position: relative;
839868
top: auto;
840869
height: auto;
841-
padding: 12px 16px;
870+
min-height: 0;
871+
padding: 12px 18px;
842872
border-right: 0;
843873
border-bottom: 1px solid var(--border);
844874
}
@@ -847,6 +877,7 @@ main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
847877
.docsMain { padding: 30px 20px 70px; }
848878
.referencePage { max-width: 100%; overflow-wrap: anywhere; }
849879
.referencePage h1 { font-size: 2rem; }
880+
.referenceHeroBrand .metbitLogo { width: 200px; height: 54px; }
850881
.quickActions { flex-wrap: wrap; }
851882
.releaseTable > div { grid-template-columns: 1fr; }
852883
.releaseTable > div > a:first-child { justify-content: space-between; }

docs/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/dev/types/routes.d.ts";
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
16.2 MB
Loading
Lines changed: 1 addition & 0 deletions
Loading
16.1 MB
Loading

0 commit comments

Comments
 (0)