2023-06-07 07:19:00 +03:00
|
|
|
import clipboardScript from './scripts/clipboard.inline'
|
|
|
|
import clipboardStyle from './styles/clipboard.scss'
|
2023-06-08 08:27:32 +03:00
|
|
|
import { QuartzComponentProps } from "./types"
|
2023-06-07 07:19:00 +03:00
|
|
|
|
2023-06-08 08:27:32 +03:00
|
|
|
export default function Body({ fileData, children }: QuartzComponentProps) {
|
|
|
|
const title = fileData.frontmatter?.title
|
|
|
|
const displayTitle = fileData.slug === "index" ? undefined : title
|
2023-06-07 07:19:00 +03:00
|
|
|
return <article>
|
2023-06-08 08:27:32 +03:00
|
|
|
<div class="top-section">
|
|
|
|
{displayTitle && <h1>{displayTitle}</h1>}
|
|
|
|
</div>
|
2023-06-07 07:19:00 +03:00
|
|
|
{children}
|
|
|
|
</article>
|
|
|
|
}
|
|
|
|
|
|
|
|
Body.afterDOMLoaded = clipboardScript
|
|
|
|
Body.css = clipboardStyle
|