Update some formats of this blog
This commit is contained in:
parent
fc2a5be2e7
commit
034a317648
6 changed files with 37 additions and 11 deletions
|
|
@ -5,6 +5,7 @@ author: 'Nakahara Daisuke'
|
|||
tags: ["introduction"]
|
||||
---
|
||||
|
||||
# Hello!
|
||||
Hello, my name is Daisuke.
|
||||
|
||||
This is my first blog post. Nice to meet you.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ const { pageTitle } = Astro.props;
|
|||
</head>
|
||||
<body>
|
||||
<Header />
|
||||
<h1>{pageTitle}</h1>
|
||||
<h1 class="page-title">
|
||||
{pageTitle}
|
||||
</h1>
|
||||
<slot />
|
||||
<Footer>
|
||||
<script>
|
||||
|
|
@ -23,3 +25,9 @@ const { pageTitle } = Astro.props;
|
|||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style>
|
||||
.page-title {
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -12,8 +12,7 @@ const optionsForDate = {
|
|||
---
|
||||
|
||||
<BaseLayout pageTitle={frontmatter.title}>
|
||||
<p>Created on: {frontmatter.pubDate.toLocaleDateString("ja-JP", optionsForDate)}</p>
|
||||
<p>Written by: {frontmatter.author}</p>
|
||||
<p>Created on: {frontmatter.pubDate.toLocaleDateString("en-US", optionsForDate)}</p>
|
||||
<p><em>{frontmatter.description}</em></p>
|
||||
<div class="tags">
|
||||
{
|
||||
|
|
@ -24,7 +23,9 @@ const optionsForDate = {
|
|||
))
|
||||
}
|
||||
</div>
|
||||
<slot />
|
||||
<article class="markdown-content">
|
||||
<slot />
|
||||
</article>
|
||||
</BaseLayout>
|
||||
|
||||
<style>
|
||||
|
|
@ -45,4 +46,20 @@ const optionsForDate = {
|
|||
font-size: 1.15em;
|
||||
background-color: #f8fcfd;
|
||||
}
|
||||
|
||||
.markdown-content {
|
||||
font-family: sans-serif;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.markdown-content h1 {
|
||||
font-size: 1.9rem;
|
||||
}
|
||||
.markdown-content h2 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
.markdown-content h3 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ const pageTitle = "Latest Posts";
|
|||
<BlogPost
|
||||
url={`/posts/${post.id}/`}
|
||||
title={post.data.title}
|
||||
datetime={post.data.pubDate.toLocaleDateString("ja-JP", {
|
||||
datetime={post.data.pubDate.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
})}
|
||||
/>
|
||||
))
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ const allPosts = await getCollection("blog");
|
|||
<BlogPost
|
||||
url={`/posts/${post.id}/`}
|
||||
title={post.data.title}
|
||||
datetime={post.data.pubDate.toLocaleDateString("ja-JP", {
|
||||
datetime={post.data.pubDate.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
})}
|
||||
/>
|
||||
))
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ const { Content } = await render(post);
|
|||
|
||||
<MarkdownPostLayout frontmatter={post.data}>
|
||||
<Content />
|
||||
</MarkdownPostLayout>
|
||||
</MarkdownPostLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue