Skip to content

Commit

Permalink
simplify docs structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Dec 8, 2023
1 parent 43a9a80 commit a328621
Show file tree
Hide file tree
Showing 73 changed files with 388 additions and 734 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
164 changes: 0 additions & 164 deletions documentation/content/oauth/providers/kakao.md

This file was deleted.

153 changes: 0 additions & 153 deletions documentation/content/oauth/providers/keycloak.md

This file was deleted.

Empty file.
Empty file.
2 changes: 1 addition & 1 deletion documentation/src/components/MarkdownArticle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:global(.md > ul) {
@apply mb-6 mt-4 list-inside list-disc pl-2;
}
:global(.md > ul > li > ul) {
:global(.md ul > li > ul) {
@apply list-inside list-disc pl-6;
}
:global(.md p a) {
Expand Down
10 changes: 5 additions & 5 deletions documentation/src/components/NavMenu.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Section {
pages: Page[];
}
export type Page = [title: string, href: string];
export type Page = [title: string, href: string, format?: "code"];
function isSelected(href: string, currentPathname: string): boolean {
if (removeLeadingSlash(href) === removeLeadingSlash(currentPathname)) {
Expand All @@ -28,9 +28,9 @@ function removeLeadingSlash(s: string): string {
<ul class="text-sm">
{
Astro.props.sections.map((section) => {
if (section.pages.length < 1) {
return null
}
if (section.pages.length < 1) {
return null;
}
return (
<li class="mt-6">
<p class="mb-1 text-sm font-medium">{section.title}</p>
Expand All @@ -48,7 +48,7 @@ function removeLeadingSlash(s: string): string {
]}
href={page[1]}
>
{page[0]}
{page[2] === "code" ? <code>{page[0]}</code> : page[0]}
</a>
</li>
);
Expand Down
Empty file.
14 changes: 13 additions & 1 deletion documentation/src/layouts/DocLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@ import type { MarkdownLayoutProps } from "astro";
type Props = MarkdownLayoutProps<{
title: string;
format?: "code";
}>;
---

<MainLayout title={Astro.props.frontmatter.title}>
<h1 class="text-4xl font-semibold mb-4">{Astro.props.frontmatter.title}</h1>
{
Astro.props.frontmatter.format === "code" ? (
<h1 class="mb-4 break-words text-3xl font-semibold sm:text-4xl">
<code>{Astro.props.frontmatter.title}</code>
</h1>
) : (
<h1 class="mb-4 break-words text-3xl font-semibold sm:text-4xl">
{Astro.props.frontmatter.title}
</h1>
)
}

<MarkdownArticle>
<slot />
</MarkdownArticle>
Expand Down
Loading

0 comments on commit a328621

Please sign in to comment.