docs: improve sidebar active style (#1888)
This commit is contained in:
@@ -83,7 +83,7 @@ export function SidebarCategory(props: {
|
||||
{title}
|
||||
</a>
|
||||
{entries.length > 0 && (
|
||||
<ul class="py-2 pl-4 nested list-outside">
|
||||
<ul class="py-2 nested list-outside">
|
||||
{entries.map((entry) => (
|
||||
<SidebarEntry key={entry.href} entry={entry} />
|
||||
))}
|
||||
@@ -99,10 +99,10 @@ export function SidebarEntry(props: {
|
||||
const { title, href } = props.entry;
|
||||
|
||||
return (
|
||||
<li class="py-0.5">
|
||||
<li class="py-[1px]">
|
||||
<a
|
||||
href={href}
|
||||
class="[data-current]:text-green-700 transition-colors hover:text-green-500 font-normal"
|
||||
class="[data-current]:text-green-700 [data-current]:border-green-600 [data-current]:bg-green-50 border-l-4 border-transparent px-4 py-0.5 transition-colors hover:text-green-500 font-normal block"
|
||||
>
|
||||
{title}
|
||||
</a>
|
||||
|
||||
@@ -24,12 +24,12 @@ export default function NavigationBar(
|
||||
const isHome = props.active == "/";
|
||||
return (
|
||||
<nav class={"flex " + props.class ?? ""}>
|
||||
<ul class="flex justify-center items-center gap-4 mx-4 my-6 flex-wrap">
|
||||
<ul class="flex justify-center items-center gap-2 sm:gap-4 mx-4 my-2 sm:my-6 flex-wrap">
|
||||
{items.map((item) => (
|
||||
<li>
|
||||
<a
|
||||
href={item.href}
|
||||
class={`p-2 ${
|
||||
class={`p-1 sm:p-2 ${
|
||||
isHome ? "text-green-900" : "text-gray-600"
|
||||
} hover:underline [data-current]:font-bold [data-ancestor]:font-bold`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user