Skip to content

Commit 7f6fb58

Browse files
committed
fix: improve docs layout + remove unused component
1 parent c41d959 commit 7f6fb58

File tree

4 files changed

+8
-50
lines changed

4 files changed

+8
-50
lines changed

docs/src/components/examples/exampleToast.astro

-44
This file was deleted.

docs/src/components/header.astro

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { getCollection } from 'astro:content';
3+
24
import { cn } from '@/utils';
35
import { SocialLinks } from '@/docs.config';
46
@@ -26,7 +28,7 @@ import SearchModal from '@/components/search/searchModal';
2628
class="group flex items-center space-x-3 font-medium tracking-tight transition-opacity duration-75 hover:opacity-80"
2729
>
2830
<Logo width={22} className="group-hover:animate-pulse" />
29-
<span class="text-neutral-700 dark:text-neutral-300">
31+
<span class="hidden md:block text-neutral-700 dark:text-neutral-300">
3032
pheralb/toast
3133
</span>
3234
</a>

docs/src/components/sidebar/sidebar.astro

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ const currentPath = Astro.url.pathname;
2828
title={r.title}
2929
class={cn(
3030
'px-4 py-2 text-sm',
31-
'border-l border-neutral-200 dark:border-neutral-800',
31+
'border-l border-neutral-200 dark:border-neutral-800 hover:border-neutral-800 dark:hover:border-neutral-200',
32+
'transition-colors',
3233
'text-neutral-600 hover:text-black dark:text-neutral-400 dark:hover:text-white',
3334
currentPath.replace(/\/$/, '') === r.path.replace(/\/$/, '')
3435
? 'border-black font-medium text-black dark:border-white dark:text-white'

docs/src/components/toc.astro

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
import type { MarkdownHeading } from 'astro';
33
import { cn } from '@/utils';
4-
import { TableOfContents, TableOfContentsIcon } from 'lucide-react';
54
65
type Props = {
76
headings: MarkdownHeading[];
@@ -13,16 +12,17 @@ const { headings } = Astro.props;
1312
<aside
1413
class={cn(
1514
'py-4',
16-
'fixed z-30 hidden h-[calc(100vh-4rem)] w-[150px] shrink-0 overflow-y-auto text-sm xl:block',
15+
'fixed z-30 hidden h-[calc(100vh-4rem)] w-[150px] overflow-y-hidden text-sm xl:block',
1716
'bg-neutral-50 dark:bg-neutral-900',
1817
'flex items-end justify-end',
18+
'border-none',
1919
)}
2020
>
2121
<div class="flex flex-col py-5">
2222
<h2 class="mb-2 text-sm text-neutral-600 dark:text-neutral-400">
2323
On this page
2424
</h2>
25-
<ul class="flex flex-col">
25+
<ul class="flex flex-col overflow-y-auto">
2626
{
2727
headings.map((heading) => (
2828
<a
@@ -31,7 +31,6 @@ const { headings } = Astro.props;
3131
class={cn(
3232
'px-4 py-2 text-sm',
3333
'border-l border-neutral-200 dark:border-neutral-800 hover:border-neutral-800 dark:hover:border-neutral-200',
34-
'transition-colors',
3534
'text-neutral-600 hover:text-black dark:text-neutral-400 dark:hover:text-white',
3635
'bg-transparent',
3736
)}

0 commit comments

Comments
 (0)