Added basic structure

This commit is contained in:
Valentin Popov 2024-09-05 15:01:13 +00:00
parent 7ba2de7148
commit 17c3115a06
Signed by: Valentin Popov
GPG Key ID: AE3CE523DAAA8401
4 changed files with 55 additions and 19 deletions

17
src/components/Head.astro Normal file
View File

@ -0,0 +1,17 @@
---
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
---
<head>
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta content="index, follow" name="robots" />
<meta content="Description" name="description" />
<link href="/feed.xml" rel="alternate" title="RSS" type="application/atom+xml" />
<link href="/sitemap-index.xml" rel="sitemap" />
<link href={canonicalURL} rel="canonical" />
<title>Title</title>
</head>

View File

@ -0,0 +1,14 @@
---
---
<header>
<nav>
<a href="/">Home</a>
<a href="/blog/">Blog</a>
<span>
<span>|</span>
<a href="/feed.xml">RSS</a>
</span>
</nav>
</header>

View File

@ -1,27 +1,15 @@
---
import CanonicalURL from "../components/CanonicalURL.astro";
import Head from "../components/Head.astro";
import Header from "../components/Header.astro";
---
<html>
<head>
<!-- Meta tags -->
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta content="index, follow" name="robots" />
<!-- Title / Description -->
<meta content="Description" name="description" />
<title>Title</title>
<!-- RSS -->
<link href="#" rel="alternate" title="RSS" type="application/atom+xml" />
<!-- Canonical URL -->
<CanonicalURL />
</head>
<Head />
<body>
<slot />
<Header />
<article>
<slot />
</article>
</body>
</html>

View File

@ -2,6 +2,23 @@
import BaseLayout from "../layouts/BaseLayout.astro";
---
<style>
.header {
text-align: center;
}
</style>
<BaseLayout>
<div class="header">
<h1>Title</h1>
<p>
<small>
Posted
<time datetime="#">#</time>
&nbsp;by&nbsp;Valentin Popov&nbsp;
<strong>1 min read</strong>
</small>
</p>
</div>
<slot />
</BaseLayout>