mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: better gutter and headings
This commit is contained in:
1 parent
950c99d3d7
commit
313691d3e9
4 files changed
+10
-32
No files matched your search
@@ -118,9 +118,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"api": {
|
"api": {
|
||||||
"json": "JSON methods",
|
|
||||||
"pb": "Protocol Buffer methods",
|
|
||||||
"media": "Media methods",
|
|
||||||
"no_docs": "This method has no documentation.",
|
"no_docs": "This method has no documentation.",
|
||||||
"test": "Test",
|
"test": "Test",
|
||||||
"view_full": "View full types"
|
"view_full": "View full types"
|
||||||
|
|||||||
@@ -44,7 +44,12 @@ for (const line of bodyOriginal.split("\n")) {
|
|||||||
|
|
||||||
.gutter {
|
.gutter {
|
||||||
width: var(--space-2);
|
width: var(--space-2);
|
||||||
background: linear-gradient(transparent, var(--gray-6) var(--space-4));
|
background: linear-gradient(
|
||||||
|
transparent,
|
||||||
|
var(--gray-6) var(--space-4),
|
||||||
|
var(--gray-6) calc(100% - var(--space-4)),
|
||||||
|
transparent
|
||||||
|
);
|
||||||
|
|
||||||
margin: 0 var(--space-4);
|
margin: 0 var(--space-4);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,4 @@ interface Props {
|
|||||||
const { apis, locale } = Astro.props;
|
const { apis, locale } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
{
|
{apis.map((api) => <ApiEntry {locale} {api} />)}
|
||||||
apis
|
|
||||||
.sort((a, b) => a.id.localeCompare(b.id))
|
|
||||||
.map((api) => <ApiEntry {locale} {api} />)
|
|
||||||
}
|
|
||||||
@@ -3,11 +3,9 @@ import "@radix-ui/colors/amber-dark.css";
|
|||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
import ApiGroup from "../../../components/ApiGroup.astro";
|
import ApiGroup from "../../../components/ApiGroup.astro";
|
||||||
import ColorScale from "../../../components/ColorScale.astro";
|
import ColorScale from "../../../components/ColorScale.astro";
|
||||||
import { Heading } from "../../../components/Heading";
|
|
||||||
import { Section } from "../../../components/Section";
|
import { Section } from "../../../components/Section";
|
||||||
import SyntaxStyles from "../../../components/SyntaxStyles.astro";
|
import SyntaxStyles from "../../../components/SyntaxStyles.astro";
|
||||||
import ToolBanner from "../../../components/ToolBanner.astro";
|
import ToolBanner from "../../../components/ToolBanner.astro";
|
||||||
import { api } from "../../../core/api/dynamic";
|
|
||||||
import { tools } from "../../../core/tools/tools";
|
import { tools } from "../../../core/tools/tools";
|
||||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||||
|
|
||||||
@@ -15,7 +13,6 @@ export { getStaticPaths } from "../index.astro";
|
|||||||
|
|
||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
const collection = await getCollection("api");
|
const collection = await getCollection("api");
|
||||||
const strings = await api.strings(locale);
|
|
||||||
|
|
||||||
const paths: {
|
const paths: {
|
||||||
path: string;
|
path: string;
|
||||||
@@ -32,28 +29,11 @@ paths.sort((a, b) => a.path.localeCompare(b.path));
|
|||||||
<ToolBanner {locale} tool={tools.api} slot="pre-app" />
|
<ToolBanner {locale} tool={tools.api} slot="pre-app" />
|
||||||
|
|
||||||
<Section>
|
<Section>
|
||||||
<Heading size="2">{strings.api.json}</Heading>
|
|
||||||
<ApiGroup
|
<ApiGroup
|
||||||
{locale}
|
{locale}
|
||||||
apis={collection.filter((api) => api.id.endsWith(".json"))}
|
apis={collection
|
||||||
/>
|
.filter((api) => !api.id.endsWith(".pb"))
|
||||||
</Section>
|
.sort((a, b) => a.id.localeCompare(b.id))}
|
||||||
|
|
||||||
<Section>
|
|
||||||
<Heading size="2">{strings.api.pb}</Heading>
|
|
||||||
<ApiGroup
|
|
||||||
{locale}
|
|
||||||
apis={collection.filter((api) => api.id.endsWith(".pb"))}
|
|
||||||
/>
|
|
||||||
</Section>
|
|
||||||
|
|
||||||
<Section>
|
|
||||||
<Heading size="2">{strings.api.media}</Heading>
|
|
||||||
<ApiGroup
|
|
||||||
{locale}
|
|
||||||
apis={collection.filter(
|
|
||||||
(api) => !api.id.endsWith(".json") && !api.id.endsWith(".pb"),
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
Reference in new issue
Block a user