Move head tag to BaseHead
This commit is contained in:
@@ -10,6 +10,7 @@ export interface Props {
|
||||
const { title, description, image = "/placeholder-social.jpg" } = Astro.props;
|
||||
---
|
||||
|
||||
<head>
|
||||
<!-- Global Metadata -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
@@ -43,3 +44,4 @@ const { title, description, image = "/placeholder-social.jpg" } = Astro.props;
|
||||
href="https://fonts.googleapis.com/css?family=Roboto+Mono"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</head>
|
||||
|
||||
@@ -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>
|
||||
|
||||
<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 && (
|
||||
|
||||
@@ -31,9 +31,7 @@ let tags = [...new Set(getTags)];
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||
</head>
|
||||
<body>
|
||||
<Header title={SITE_TITLE} />
|
||||
<main>
|
||||
|
||||
@@ -17,14 +17,7 @@ const posts = (await Astro.glob("../posts/*.md")).sort(
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||
<style>
|
||||
ul li {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<Header />
|
||||
<main>
|
||||
|
||||
@@ -37,14 +37,7 @@ const { tag: currentTag } = Astro.params;
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||
<style>
|
||||
ul li {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<Header />
|
||||
<main>
|
||||
|
||||
@@ -69,6 +69,11 @@ nav a:not(:last-child) {
|
||||
padding: 0 12px 0 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top: 1px solid #ddd;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: unset;
|
||||
@@ -159,6 +164,11 @@ h3 {
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
.article-title {
|
||||
font-size: 2em;
|
||||
margin: 0.25em 0 0;
|
||||
}
|
||||
|
||||
ul li time {
|
||||
flex: 0 0 130px;
|
||||
font-style: italic;
|
||||
|
||||
Reference in New Issue
Block a user