feat: begin to version docs
This commit is contained in:
parent
a6c32df1ff
commit
2b532080d8
@ -25,6 +25,8 @@
|
|||||||
--font-code: "Iosevka Fixed Web", "Iosevka Nerd Font", Iosevka, monospace;
|
--font-code: "Iosevka Fixed Web", "Iosevka Nerd Font", Iosevka, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[x-cloak] { display: none !important; }
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--c-bg: #121212;
|
--c-bg: #121212;
|
||||||
--c-text: rgb(200, 200, 200);
|
--c-text: rgb(200, 200, 200);
|
||||||
|
@ -24,13 +24,13 @@ const { showSidebarButton = true, version = "latest" } = Astro.props;
|
|||||||
Learn
|
Learn
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/api/std/"
|
href={`/en/${version}/api/std/`}
|
||||||
class="hidden sm:inline-block px-4 font-display font-bold-text-xl hover:underline"
|
class="hidden sm:inline-block px-4 font-display font-bold-text-xl hover:underline"
|
||||||
>
|
>
|
||||||
Standard Library
|
Standard Library
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/spec/"
|
href={`/en/${version}/spec/`}
|
||||||
class="hidden sm:inline-block px-4 font-display font-bold-text-xl hover:underline"
|
class="hidden sm:inline-block px-4 font-display font-bold-text-xl hover:underline"
|
||||||
>
|
>
|
||||||
Language spec
|
Language spec
|
||||||
|
@ -129,9 +129,6 @@ const rc = url_components[1] ?? "";
|
|||||||
>
|
>
|
||||||
<nav class="py-4 pr-2 overflow-x-scroll h-[calc(100vh-3rem)]">
|
<nav class="py-4 pr-2 overflow-x-scroll h-[calc(100vh-3rem)]">
|
||||||
<div class="mb-2 relative" x-data="{open: false}">
|
<div class="mb-2 relative" x-data="{open: false}">
|
||||||
<div>
|
|
||||||
<span> Language version: </span>
|
|
||||||
</div>
|
|
||||||
<button
|
<button
|
||||||
class="bg-c-bg text-c-text border border-c-primary rounded px-3 w-full font-mono mt-2 flex items-center hover:dark:bg-zinc-800 transition-colors cursor-pointer text-left"
|
class="bg-c-bg text-c-text border border-c-primary rounded px-3 w-full font-mono mt-2 flex items-center hover:dark:bg-zinc-800 transition-colors cursor-pointer text-left"
|
||||||
@click="open = !open"
|
@click="open = !open"
|
||||||
@ -152,6 +149,7 @@ const rc = url_components[1] ?? "";
|
|||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div
|
||||||
|
x-cloak
|
||||||
x-bind:class="open? '': 'hidden'"
|
x-bind:class="open? '': 'hidden'"
|
||||||
class="bottom-0 w-full absolute"
|
class="bottom-0 w-full absolute"
|
||||||
>
|
>
|
||||||
|
@ -9,7 +9,8 @@ const posts = (await Astro.glob(
|
|||||||
)) as unknown as Array<AstroFile>;
|
)) as unknown as Array<AstroFile>;
|
||||||
|
|
||||||
// The base of every URL under this glob
|
// The base of every URL under this glob
|
||||||
const base_url = "/spec";
|
const version = "latest";
|
||||||
|
const base_url = `/en/${version}/spec`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<NewDocsLayout
|
<NewDocsLayout
|
||||||
@ -17,6 +18,7 @@ const base_url = "/spec";
|
|||||||
frontmatter={frontmatter}
|
frontmatter={frontmatter}
|
||||||
headings={headings}
|
headings={headings}
|
||||||
posts={posts}
|
posts={posts}
|
||||||
|
version={version}
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</NewDocsLayout>
|
</NewDocsLayout>
|
Loading…
Reference in New Issue
Block a user