Skip to content
Prev Previous commit
Next Next commit
wip
  • Loading branch information
jer3m01 committed Mar 24, 2026
commit ebe4da74e30e52fe35edba68b420b3beb9a17e73
6 changes: 2 additions & 4 deletions osmium/src/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import { clientOnly } from "@solidjs/start";
import { Callout } from "./ui/callout";
import { Tabs, TabList, TabPanel, Tab } from "./ui/tabs";

export { EditPageLink } from "./ui/edit-page-link";
export { PageIssueLink } from "./ui/page-issue-link";
export { Callout } from "./ui/callout";
export { QuickLinks } from "./ui/quick-links";

Expand Down Expand Up @@ -102,7 +100,7 @@ export const h1 = (props: ParentProps) => (
export const h2 = (props: ParentProps) => {
return (
<>
<hr class="my-8 border-slate-400 dark:prose-hr:border-slate-800" />
<hr class="dark:prose-hr:border-slate-800 my-8 border-slate-400" />
<h2
{...props}
class="prose-headings:scroll-mt-28 prose-headings:font-normal lg:prose-headings:scroll-mt-34"
Expand Down Expand Up @@ -225,7 +223,7 @@ export const pre = (props: ParentProps) => {
export const code = (props: ParentProps) => {
return (
<code
class="not-prose inline-flex rounded-lg bg-blue-200 px-1 py-0.5 font-mono! text-[0.8em] font-semibold leading-snug text-slate-900 dark:bg-slate-600/60 dark:text-white"
class="not-prose inline-flex rounded-lg bg-blue-200 px-1 py-0.5 font-mono! text-[0.8em] leading-snug font-semibold text-slate-900 dark:bg-slate-600/60 dark:text-white"
{...props}
>
{props.children}
Expand Down
31 changes: 28 additions & 3 deletions osmium/src/ui/docs-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Show, onMount, JSX } from "solid-js";
import { useLocation } from "@solidjs/router";
import { Show, onMount, JSX, createMemo } from "solid-js";
import { Pagination } from "./pagination";
import { EditPageLink } from "./edit-page-link";
import { PageIssueLink } from "./page-issue-link";
import { useOsmiumThemeFrontmatter } from "../frontmatter";
import { useRouteConfig } from "../utils";
import { useCurrentPageData } from "@kobalte/solidbase/client";

interface DocsLayoutProps {
children: JSX.Element;
Expand All @@ -12,6 +13,22 @@ interface DocsLayoutProps {
export const DocsLayout = (props: DocsLayoutProps) => {
const frontmatter = useOsmiumThemeFrontmatter();

const pageData = useCurrentPageData();
const config = useRouteConfig();

const formatter = createMemo(
() => new Intl.DateTimeFormat(undefined, config()?.lastUpdated || undefined)
);

const date = createMemo(
() =>
new Date(
Number.isNaN(pageData()?.lastUpdated)
? 0
: (pageData()?.lastUpdated ?? 0)
)
);

return (
<article class="expressive-code-overrides mx-auto w-full max-w-2xl overflow-hidden pb-16">
<Show when={frontmatter()?.category}>
Expand All @@ -21,13 +38,21 @@ export const DocsLayout = (props: DocsLayoutProps) => {
</span>
)}
</Show>
<h1 class="text-slate-900 prose-headings:text-[2.8rem] dark:text-white">
<h1 class="prose-headings:text-[2.8rem] text-slate-900 dark:text-white">
{frontmatter()?.title}
</h1>
<span class="-mt-[15px] block text-sm xl:hidden">
<EditPageLink />
</span>
<div class="w-full px-1">{props.children}</div>
<Show when={frontmatter()?.lastUpdated}>
<span class="text-sm">
Last updated:{" "}
<Show when={!Number.isNaN(pageData()?.lastUpdated)} fallback="?">
{formatter().format(date())}
</Show>
</span>
</Show>
<span class="text-sm xl:hidden">
<PageIssueLink />
</span>
Expand Down
5 changes: 0 additions & 5 deletions osmium/src/ui/layout/main-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,10 @@ export function MainHeader(props: MainHeaderProps) {
<ul class="order-2 col-span-2 flex w-full justify-center gap-5 pt-6 lg:col-span-1 lg:w-auto lg:pt-0">
<For each={projects()}>
{(p) => {
const match = useMatch(() =>
locale.applyPathPrefix(`${p.path}/*rest`)
);

return (
<li>
<NavLink
href={locale.applyPathPrefix(p.path)}
data-matched={match() !== undefined ? true : undefined}
onClick={() => setNavOpen(false)}
active={project()?.name === p.name}
>
Expand Down
3 changes: 0 additions & 3 deletions src/routes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,3 @@ This combination of features makes it a great choice to build responsive and hig
_Find our API documentation under the **Reference** tab_

Join the [Solid community on Discord](https://discord.com/invite/solidjs) to share your projects or get help from our community!

<EditPageLink />
<PageIssueLink />
3 changes: 0 additions & 3 deletions src/routes/solid-start/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,3 @@ Documentation is still in beta so content is still being added to the documentat

If you experience any issues while using SolidStart, please let us know by [opening an issue in the SolidStart Repo](https://github.com/solidjs/solid-start/issues).
Additionally, if you notice any issues or feel that something is missing in the documentation, please let us know in the [Solid Docs Repo](https://github.com/solidjs/solid-docs-next/issues).

<EditPageLink />
<PageIssueLink />
Loading