[#754,landing page][s]: fix build errors
This commit is contained in:
@@ -47,8 +47,11 @@ export default function Features() {
|
|||||||
CKAN.
|
CKAN.
|
||||||
</p>
|
</p>
|
||||||
<div className="not-prose my-12 grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
<div className="not-prose my-12 grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||||
{features.map((feature) => (
|
{features.map((feature, i) => (
|
||||||
<div className="group relative rounded-xl border border-slate-200 dark:border-slate-800">
|
<div
|
||||||
|
key={`feature-${i}`}
|
||||||
|
className="group relative rounded-xl border border-slate-200 dark:border-slate-800"
|
||||||
|
>
|
||||||
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
|
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
|
||||||
<div className="relative overflow-hidden rounded-xl p-6">
|
<div className="relative overflow-hidden rounded-xl p-6">
|
||||||
<img src={feature.icon} alt="" className="h-24 w-auto" />
|
<img src={feature.icon} alt="" className="h-24 w-auto" />
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default function Layout({
|
|||||||
title?: string;
|
title?: string;
|
||||||
tableOfContents?;
|
tableOfContents?;
|
||||||
}) {
|
}) {
|
||||||
const { toc } = children.props;
|
// const { toc } = children.props;
|
||||||
|
|
||||||
const currentSection = useTableOfContents(tableOfContents);
|
const currentSection = useTableOfContents(tableOfContents);
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ export default function Layout({
|
|||||||
</a>
|
</a>
|
||||||
</footer>
|
</footer>
|
||||||
{/** TABLE OF CONTENTS */}
|
{/** TABLE OF CONTENTS */}
|
||||||
{tableOfContents.length > 0 && (toc ?? siteConfig.tableOfContents) && (
|
{tableOfContents.length > 0 && (siteConfig.tableOfContents) && (
|
||||||
<div className="hidden xl:fixed xl:right-0 xl:top-[4.5rem] xl:block xl:w-1/5 xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6 xl:mb-16">
|
<div className="hidden xl:fixed xl:right-0 xl:top-[4.5rem] xl:block xl:w-1/5 xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6 xl:mb-16">
|
||||||
<nav aria-labelledby="on-this-page-title" className="w-56">
|
<nav aria-labelledby="on-this-page-title" className="w-56">
|
||||||
<h2 className="font-display text-md font-medium text-slate-900 dark:text-white">
|
<h2 className="font-display text-md font-medium text-slate-900 dark:text-white">
|
||||||
|
|||||||
@@ -58,15 +58,13 @@ export default function NavItem({ item }) {
|
|||||||
onMouseLeave={closeDropdown}
|
onMouseLeave={closeDropdown}
|
||||||
>
|
>
|
||||||
{item.subItems.map((subItem) => (
|
{item.subItems.map((subItem) => (
|
||||||
// TODO: check the onClick error below
|
|
||||||
// onClick does not exist on Menu.Item
|
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
key={subItem.name}
|
key={subItem.name}
|
||||||
onClick={() => setshowDropdown(false)}
|
|
||||||
>
|
>
|
||||||
<BaseLink
|
<BaseLink
|
||||||
href={subItem.href}
|
href={subItem.href}
|
||||||
className="text-slate-500 inline-flex items-center mt-2 px-1 pt-1 text-sm font-medium hover:text-slate-600"
|
className="text-slate-500 inline-flex items-center mt-2 px-1 pt-1 text-sm font-medium hover:text-slate-600"
|
||||||
|
onClick={() => setshowDropdown(false)}
|
||||||
>
|
>
|
||||||
{subItem.name}
|
{subItem.name}
|
||||||
</BaseLink>
|
</BaseLink>
|
||||||
|
|||||||
@@ -19,12 +19,13 @@ export default function DRDPage({ source, frontMatter }) {
|
|||||||
const [tableOfContents, setTableOfContents] = useState([]);
|
const [tableOfContents, setTableOfContents] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const headingNodes = document.querySelectorAll('h2,h3');
|
const headingNodes = document.querySelectorAll(
|
||||||
|
'h2,h3'
|
||||||
|
) as NodeListOf<HTMLHeadingElement>;
|
||||||
const toc = collectHeadings(headingNodes);
|
const toc = collectHeadings(headingNodes);
|
||||||
setTableOfContents(toc ?? []);
|
setTableOfContents(toc ?? []);
|
||||||
}, [router.asPath]); // update table of contents on route change with next/link
|
}, [router.asPath]); // update table of contents on route change with next/link
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout tableOfContents={tableOfContents} title={frontMatter.title}>
|
<Layout tableOfContents={tableOfContents} title={frontMatter.title}>
|
||||||
<MDXPage source={source} frontMatter={frontMatter} />
|
<MDXPage source={source} frontMatter={frontMatter} />
|
||||||
|
|||||||
Reference in New Issue
Block a user