-
Notifications
You must be signed in to change notification settings - Fork 0
/
Article-old.astro
55 lines (54 loc) · 1.23 KB
/
Article-old.astro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
import { formatDate } from "@utils"
import Backlinks from "@components/Backlinks.astro";
const {frontmatter, ...props} = Astro.props;
const { author = "", created = "", modified = "" } = frontmatter;
---
<style is:global>
article.main > p,
article.main > header,
article.main > footer,
article.main > table,
article.main > blockquote > p,
article.main > section > p,
article.main > section > header,
article.main > section > footer,
article.main > section > div.footnote-definition,
article.main > section > table {
width: 55%;
}
article.main > dl,
article.main > ol,
article.main > ul,
article.main > section > dl,
article.main > section > ol,
article.main > section > ul {
width: 50%;
-webkit-padding-start: 5%;
}
</style>
<article class="main">
{
author || created || modified
? <header class="frontmatter">
{
author
? <p id="author">Written by {author}</p>
: ""
}
{
created
? <p id="created">Created on {formatDate(created)}</p>
: ""
}
{
modified
? <p id="updated">Last updated on {formatDate(modified)}</p>
: ""
}
</header>
: ""
}
<slot />
<Backlinks url={frontmatter.slug} />
</article>