Skip to content

Commit

Permalink
少し、ブログ記事ページのスタイルを調整
Browse files Browse the repository at this point in the history
  • Loading branch information
tasuren committed Dec 27, 2023
1 parent 1e9aa3d commit 31e1077
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
10 changes: 6 additions & 4 deletions src/pages/blog/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ for (let tag of article.tags)

@media (width <= 480px) {
.metadata .content {
padding-bottom: 15px;
padding-bottom: 5px;
}
}

.metadata .content .left {
padding-right: 1em;
max-width: 60%;
}
.metadata .content .left #published-at {
padding-right: 0.5em;
Expand All @@ -96,9 +97,10 @@ for (let tag of article.tags)
</style>

<Layout
title={article.title} description={description}
keywords={article.tags} type="article"
properties={properties}>
title={article.title} description={description}
keywords={article.tags} type="article"
properties={properties}
>
{usedHljs ? <Hljs slot="head" /> : null}

<div class="metadata">
Expand Down
22 changes: 14 additions & 8 deletions src/pages/blog/tags/[tag]/[page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,25 @@ const lastPage = prop.currentPage == prop.lastPage
} /> : "まだありません。"}
</details>

<p />

<!-- 列挙 -->
<h2>
一覧{prop.currentPage == 1 ? "" : `(${prop.currentPage}ページ目)`}
</h2>

<ul class="padding-left-override-for-sp">
{prop.data.map(article => <li>
<a href={`/blog/${article.id}`}>{article.title}</a>
<time datetime={article.publishedAt} class="neutral publication-date">
...
</time>
</li>)}
{
prop.data.map(article =>
<li>
<a href={`/blog/${article.id}`}>{article.title}</a>
<time
datetime={article.publishedAt}
class="neutral publication-date"
>
...
</time>
</li>
)
}
</ul>

<!-- ページ切り替え -->
Expand Down

0 comments on commit 31e1077

Please sign in to comment.