Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
reednel committed Jan 15, 2024
1 parent 91c8dec commit c88cc44
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/config/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"header": true
},
{
"text": "Installation",
"text": "Installation Guide",
"link": "/docs/get-started/installation"
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/get-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Installation
title: Installation Guide
---

## A header
Expand Down
1 change: 0 additions & 1 deletion src/layouts/Base.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import config from "@/config/config.json";
import theme from "@/config/theme.json";
import { plainify } from "@/lib/utils/textConverter";
import Footer from "@/components/Footer.astro";
import Header from "@/components/Header.astro";
Expand Down
12 changes: 7 additions & 5 deletions src/layouts/DocSingle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ const currentPage = new URL(Astro.request.url).pathname;
<section class="section pt-7">
<div class="container">
<div class="row justify-center">
<div class="grid grid-cols-12">
<div class="flex">
<!-- Document Browser (Left) -->
<div class="col-span-3 sticky top-0 h-screen flex">
<div class="col-3 sticky top-0 h-screen flex ml-auto">
<div class="ml-auto">
<DocBrowser currentPage={currentPage} />
</div>
</div>
<!-- Content -->
<main class="py-4 px-8 pb-32 col-span-6 overflow-auto">
<main class="py-4 col-9 lg:col-6 overflow-auto">
<article>
<h1 class="mb-4">{ title }</h1>
<div class="content mb-10">
Expand All @@ -28,8 +28,10 @@ const currentPage = new URL(Astro.request.url).pathname;
</article>
</main>
<!-- Document Contents (Right) -->
<div class="col-span-3 sticky top-0 h-screen flex">
<DocContents headings={headings} />
<div class="col-3 sticky top-0 h-screen flex invisible lg:visible">
<div>
<DocContents headings={ headings } />
</div>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/components/DocBrowser.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export interface doc_data {
const { main }: { main: doc_data[] } = docs;
---

<nav aria-labelledby="grid-left" class="border-r">
<div class="mx-4 my-16">
<nav class="max-h-screen overflow-y-auto mx-8 border-r border-light dark:border-darkmode-light">
<div class="mx-4 my-8">
<ul>
{
main.map((item) =>
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/components/DocContents.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const { headings } = Astro.props;
---

<nav aria-labelledby="grid-right">
<div class="mx-4 my-16">
<nav class="max-h-screen overflow-y-auto mx-8 border-l border-light dark:border-darkmode-light">
<div class="mx-4 my-8">
<h3 class="my-4">On This Page</h3>
{
headings &&
Expand Down

0 comments on commit c88cc44

Please sign in to comment.