blog/src/layouts/BaseLayout.astro
Michael Zhang 3e4f2d0095
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
image :)
2024-09-18 06:54:28 -05:00

47 lines
1.1 KiB
Text

---
import Footer from "../components/Footer.astro";
import LeftNav from "../components/LeftNav.astro";
import classNames from "classnames";
import "../styles/global.scss";
import "katex/dist/katex.min.css";
import portrait from "../assets/self.png";
interface Props {
title?: string;
pad?: boolean;
toc?: boolean;
}
const { title, pad, toc } = Astro.props;
const shouldPad = pad === undefined ? true : pad;
const hasToc = toc ?? false;
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:image" content={portrait.src} />
<title>{title && `${title} - `} Michael Zhang</title>
<script
data-goatcounter="https://goatcounter.mzhang.io/count"
async
src="//goatcounter.mzhang.io/count.js"></script>
<slot name="head" />
</head>
<body>
<div class="flex-wrapper">
<LeftNav />
<div class="sep"></div>
<main class={classNames(shouldPad && "pad", hasToc && "hasToc")}>
<slot />
</main>
</div>
<Footer />
</body>
</html>