Move head tag to BaseHead

This commit is contained in:
Cassidy Williams
2022-11-27 22:29:55 -06:00
parent 0eba426c6e
commit dc4d1c392c
6 changed files with 46 additions and 72 deletions

View File

@@ -4,42 +4,20 @@ import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import ColorScript from "../components/ColorScript.astro";
export interface Props {
content: {
title: string;
description: string;
added?: string;
updatedDate?: string;
heroImage?: string;
};
}
const {
content: { title, description, added, updatedDate, heroImage },
} = Astro.props as Props;
} = Astro.props;
---
<html>
<head>
<BaseHead title={title} description={description} />
<style>
.title {
font-size: 2em;
margin: 0.25em 0 0;
}
hr {
border-top: 1px solid #ddd;
margin: 1rem 0;
}
</style>
</head>
<BaseHead title={title} description={description} />
<body>
<Header />
<main>
<article>
{heroImage && <img width={720} height={360} src={heroImage} alt="" />}
<h1 class="title">{title}</h1>
<h1 class="article-title">{title}</h1>
{added && <time>{added}</time>}
{
updatedDate && (