Skip to content

Commit

Permalink
Worksにも2つ前のコミットの内容を適用
Browse files Browse the repository at this point in the history
  • Loading branch information
tasuren committed Dec 26, 2023
1 parent ed91f16 commit 5d63377
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
9 changes: 9 additions & 0 deletions src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,18 @@ code {

.pointer { cursor: pointer; }

/* 画像の最大の横幅を設定し、はみ出ないようにする。 */
main {
width: 100%;
}
main img {
max-width: 100%;
}

/* スマホなど、`ul`の点の左の余白が大きすぎて狭くならないようにするやつ。 */
@media (width <= 768px) {
.padding-left-override-for-sp {
padding-inline-start: 10px;
list-style-position: inside;
}
}
11 changes: 1 addition & 10 deletions src/pages/blog/tags/[tag]/[page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ const lastPage = prop.currentPage == prop.lastPage
}前`;
</script>

<style>
@media (width <= 768px) {
ul {
padding-inline-start: 10px;
list-style-position: inside;
}
}
</style>

<Layout
title={`Blog ${hashedTag}`}
description={tag ? `${tag}のタグが付いている記事の一覧ページです。`
Expand All @@ -81,7 +72,7 @@ const lastPage = prop.currentPage == prop.lastPage
<h2>
一覧{prop.currentPage == 1 ? "" : `(${prop.currentPage}ページ目)`}
</h2>
<ul>
<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">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/works/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const posts = (await Astro.glob<Frontmatter>('./*.md'))
<Layout title="Works" description="tasurenが作っているものを列挙したページです。">
<h1>Works</h1>
<p>ここでは私が作っているものを列挙しています。</p>
<ul>
<ul class="padding-left-override-for-sp">
{posts.map(post => <li>
<a href={post.url}>{post.frontmatter.title}</a>
{post.frontmatter.description ? `: ${post.frontmatter.description}` : ""}
Expand Down

0 comments on commit 5d63377

Please sign in to comment.