Fix some responsive layout bugs

This commit is contained in:
PrinOrange
2024-01-06 14:06:49 +08:00
parent 8db176fae9
commit 698029f509
16 changed files with 22 additions and 24 deletions

View File

@@ -3,8 +3,10 @@ import Link from "next/link";
export const TOC = (props: { data: TTOCItem[] }) => {
return (
<div className="sticky top-[5em] mx-5 p-2 border-gray-500">
<div className="p-2 font-bold text-center border border-gray-500">{"TABLE OF CONTENTS"}</div>
<div className="sticky top-[5em] mx-5 p-2 border border-black dark:border-gray-400 rounded-sm">
<div className="p-2 font-bold text-center border bg-black text-white dark:text-black dark:bg-gray-100">
{"TABLE OF CONTENTS"}
</div>
<ul className="flat-scrollbar my-1 px-1 h-[60vh] overflow-y-auto">
{props.data?.map((item) => (
<Link className="hover:text-sky-500" href={`#${item.anchorId}`} key={`toc-${item.anchorId}`}>