refactor: move website files to the root level
This commit is contained in:
parent
c2887ecbc5
commit
2cbbfd60ff
590 changed files with 0 additions and 4484 deletions
20
src/layouts/DailyEmailLayout.astro
Normal file
20
src/layouts/DailyEmailLayout.astro
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
import AboutMe from "../components/AboutMe.astro";
|
||||
import BaseLayout from "./PageLayout.astro";
|
||||
import DailyEmailForm from "../components/DailyEmailForm.astro";
|
||||
import Markdown from "../components/Markdown.astro";
|
||||
|
||||
const { title } = Astro.props.frontmatter || Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout title={title}>
|
||||
<div class="space-y-16">
|
||||
<Markdown>
|
||||
<slot />
|
||||
</Markdown>
|
||||
|
||||
<DailyEmailForm />
|
||||
|
||||
<AboutMe />
|
||||
</div>
|
||||
</BaseLayout>
|
93
src/layouts/Layout.astro
Normal file
93
src/layouts/Layout.astro
Normal file
|
@ -0,0 +1,93 @@
|
|||
---
|
||||
import "../../assets/css/tailwind.pcss";
|
||||
|
||||
import Navbar from "../components/Navbar.astro";
|
||||
|
||||
export interface Props {
|
||||
title: string;
|
||||
}
|
||||
|
||||
const { title } = Astro.props;
|
||||
|
||||
interface Link {
|
||||
title: string;
|
||||
href: string;
|
||||
}
|
||||
|
||||
const footerLinks = [
|
||||
{
|
||||
title: "About",
|
||||
href: "/",
|
||||
},
|
||||
{
|
||||
title: "Blog",
|
||||
href: "/blog",
|
||||
},
|
||||
{
|
||||
title: "Talks",
|
||||
href: "/talks",
|
||||
},
|
||||
{
|
||||
title: "Daily list",
|
||||
href: "/daily",
|
||||
},
|
||||
{
|
||||
title: "Search",
|
||||
href: "/search",
|
||||
},
|
||||
];
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,300&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<title>{title}</title>
|
||||
<script
|
||||
defer
|
||||
data-domain="oliverdavies.uk"
|
||||
src="https://plausible.io/js/plausible.js"
|
||||
></script>
|
||||
</head>
|
||||
<body>
|
||||
<div
|
||||
class="min-h-screen font-sans text-base font-light text-grey-900 md:text-xl dark:text-white dark:bg-grey-900"
|
||||
>
|
||||
<Navbar />
|
||||
|
||||
<div class="py-10 px-4 mx-auto max-w-2xl md:py-10">
|
||||
<h1 class="mb-4 text-xl font-bold md:text-2xl">{title}</h1>
|
||||
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
|
||||
<div class="mt-16 mb-6">
|
||||
<footer>
|
||||
<nav class="flex flex-wrap justify-center -mb-3">
|
||||
{
|
||||
footerLinks &&
|
||||
footerLinks.map((link) => (
|
||||
<a
|
||||
class="mx-3 mb-3 text-sm md:text-lg dark:text-white hover:text-grey-900 link dark:hover:text-blue-400"
|
||||
href={link.href}
|
||||
>
|
||||
{link.title}
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
12
src/layouts/PageLayout.astro
Normal file
12
src/layouts/PageLayout.astro
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
import BaseLayout from "./Layout.astro";
|
||||
import Markdown from "../components/Markdown.astro";
|
||||
|
||||
const { title } = Astro.props.frontmatter || Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout title={title}>
|
||||
<Markdown>
|
||||
<slot />
|
||||
</Markdown>
|
||||
</BaseLayout>
|
Loading…
Add table
Add a link
Reference in a new issue