Skip to content

Commit 04ec2ed

Browse files
committed
improve: ローテーション時のラベルを改善
ローテーション時にリンクのラベルを変更することで、 ユーザーに「ループしている」ことを明確に伝えます。 - 最古の記事: 「前の記事」→「最新の記事」 - 最新の記事: 「次の記事」→「最初の記事」 関連: #45
1 parent 779489f commit 04ec2ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_layouts/post.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ <h1 class="text-3xl md:text-4xl font-bold mb-4" style="color: #221C35;">{{ page.
118118
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
119119
</svg>
120120
<div class="text-left">
121-
<div class="text-xs text-gray-500 mb-1">前の記事</div>
121+
<div class="text-xs text-gray-500 mb-1">{% if page.previous %}前の記事{% else %}最新の記事{% endif %}</div>
122122
<div class="text-sm">{{ prev_post.title | truncate: 40 }}</div>
123123
</div>
124124
</a>
125125

126126
<!-- 次の投稿へ -->
127127
<a href="{{ next_post.url }}" class="inline-flex items-center text-black hover:text-gray-700 font-bold group">
128128
<div class="text-right">
129-
<div class="text-xs text-gray-500 mb-1">次の記事</div>
129+
<div class="text-xs text-gray-500 mb-1">{% if page.next %}次の記事{% else %}最初の記事{% endif %}</div>
130130
<div class="text-sm">{{ next_post.title | truncate: 40 }}</div>
131131
</div>
132132
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 ml-2 group-hover:transform group-hover:translate-x-1 transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor">

0 commit comments

Comments
 (0)