move website to own directory

This commit is contained in:
Rene Haas
2022-10-17 22:12:54 +02:00
parent f47e2728f7
commit 83e7ffcd3a
49 changed files with 4310 additions and 363 deletions
+21
View File
@@ -0,0 +1,21 @@
// import Link from 'next/link';
import type { ComponentProps } from 'react';
export interface HeadingProps extends ComponentProps<'h1'> {
tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
}
export const Heading = ({ id, tag: Tag, ...rest }: HeadingProps) => {
if (id) {
return (
<>
{/* <Link href={`/#${id}`} scroll={false}> */}
{/* eslint-disable-next-line */}
<Tag {...rest} />
{/* </Link> */}
</>
);
}
/* eslint-disable-next-line */
return <Tag {...rest} />;
};
+17
View File
@@ -0,0 +1,17 @@
import { useEffect, useRef } from 'react';
import { OverlayScrollbars } from '@~package/overlayscrollbars';
import type { ComponentProps } from 'react';
export const Pre = ({ children }: ComponentProps<'pre'>) => {
const ref = useRef(null);
useEffect(() => {
if (ref.current) {
const instance = OverlayScrollbars(ref.current, {
paddingAbsolute: true,
scrollbars: { autoHide: 'leave' },
});
return () => instance.destroy();
}
});
return <pre ref={ref}>{children}</pre>;
};