parent
82abc56255
commit
f7ebc9b217
|
@ -6,7 +6,7 @@ export interface Props {
|
|||
const { code } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="flex items-center justify-center h-screen flex-col">
|
||||
<div class="flex items-center justify-center flex-col">
|
||||
<div class="w-3/4">
|
||||
<h1 class="text-6xl font-bold m-250">Error: { code }</h1>
|
||||
<slot />
|
||||
|
|
|
@ -8,3 +8,4 @@ if (frontmatter.draft) {
|
|||
return Astro.redirect('/404');
|
||||
}
|
||||
---
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ export interface Props {
|
|||
const { title, description, keywords } = Astro.props;
|
||||
|
||||
const keywordsString = keywords.join(' ');
|
||||
|
||||
import "../styles.scss"
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
import Boilerplate from "./Boilerplate.astro";
|
||||
|
||||
const { frontmatter } = Astro.props
|
||||
|
||||
// remove all duplicate words in the description and add them as keywords
|
||||
const tags: string[] = frontmatter.description.split(" ").filter((word: any, index: any, self: string | any[]) => {
|
||||
return self.indexOf(word) === index;
|
||||
});
|
||||
|
||||
import "../styles.scss"
|
||||
|
||||
---
|
||||
|
||||
<Boilerplate title={frontmatter.title} description={frontmatter.description} keywords={tags}>
|
||||
<markdown class="flex items-center justify-center flex-col">
|
||||
<div class="w-3/4">
|
||||
<slot />
|
||||
</div>
|
||||
</markdown>
|
||||
</Boilerplate>
|
|
@ -3,9 +3,6 @@
|
|||
import Boilerplate from "./Boilerplate.astro";
|
||||
import Error from "../components/Error.astro";
|
||||
|
||||
// use styles.scss
|
||||
import "../styles.scss";
|
||||
|
||||
const keywords: string[] = [];
|
||||
---
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
import Error from "../components/Error.astro";
|
||||
import Boilerplate from "../layouts/Boilerplate.astro";
|
||||
|
||||
// use styles.scss
|
||||
import "../styles.scss";
|
||||
|
||||
const keywords: string[] = []
|
||||
|
||||
---
|
||||
|
|
|
@ -45,6 +45,74 @@ main {
|
|||
@apply bg-mono_6;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
markdown {
|
||||
height: fit-content;
|
||||
|
||||
h1 {
|
||||
margin: 10px;
|
||||
|
||||
@apply text-4xl;
|
||||
@apply font-bold;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 10px;
|
||||
|
||||
@apply text-3xl;
|
||||
@apply font-bold;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 10px;
|
||||
|
||||
@apply text-2xl;
|
||||
@apply font-bold;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 10px;
|
||||
|
||||
@apply text-xl;
|
||||
@apply font-bold;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 10px;
|
||||
margin-top: 25px;
|
||||
margin-bottom: 25px;
|
||||
|
||||
@apply text-lg;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@apply text-lg;
|
||||
}
|
||||
|
||||
ol {
|
||||
margin: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@apply text-lg;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 25px;
|
||||
|
||||
list-style-type: disc;
|
||||
|
||||
@apply text-lg;
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
|
|
Loading…
Reference in New Issue