Move head tag to BaseHead
This commit is contained in:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user