Skip to content

Commit ea8dd17

Browse files
committed
fix ブログ一覧・カレンダー一覧
1 parent 87925ca commit ea8dd17

File tree

8 files changed

+100
-28
lines changed

8 files changed

+100
-28
lines changed

src/develop/_layouts/two-column.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ <h2 class="mb-5 text-lg text-gray-900 font-bold">ハッシュタグ</h2>
6767
<h2 class="mb-4 text-lg text-gray-900 font-bold">アーカイブ</h2>
6868
@include("/include/entry/archive-list-side.html")
6969
<div class="mt-8">
70-
@include("/include/entry/calendar-side.html")
70+
@include("/include/calendar/month-side.html")
7171
</div>
7272
</section>
7373

src/develop/calendar.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@extends("/_layouts/base.html")
2+
3+
@section("main")
4+
<!-- 年間カレンダー -->
5+
@include("/include/calendar/year.html")
6+
@endsection
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<!-- BEGIN_MODULE Calendar_Year id="{{module_id}}" -->
2+
<div>
3+
@include("/admin/module/setting.html")
4+
5+
<div class="flex items-center mb-10">
6+
<h2 class="text-gray-900 font-bold text-2xl"><!-- BEGIN_IF [%{DATE_YEAR}/nem] -->%{DATE_YEAR}<!-- ELSE -->%{Y}<!-- END_IF --></h2>
7+
8+
<ul class="flex items-center gap-x-2 ml-4 text-indigo-600">
9+
<!-- BEGIN prevLink --><li>
10+
<a href="{url}" class="flex items-center justify-center w-5 h-5" title="前年へ">
11+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" class="size-4">
12+
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5" />
13+
</svg>
14+
</a>
15+
</li><!-- END prevLink -->
16+
<!-- BEGIN nextLink --><li>
17+
<a href="{url}" class="flex items-center justify-center w-5 h-5" title="翌年へ">
18+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" class="size-4">
19+
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
20+
</svg>
21+
</a>
22+
</li><!-- END nextLink -->
23+
</ul>
24+
</div>
25+
<div class="text-gray-900">
26+
<!-- BEGIN unit:loop -->
27+
<div class="grid gap-8 grid-cols-[repeat(auto-fill,minmax(308px,1fr))]">
28+
<!-- BEGIN month:loop -->
29+
<div>
30+
<h3 class="text-gray-900 text-lg font-bold">{month}月</h3>
31+
<div class="grid grid-cols-7 mt-4" aria-hidden="true">
32+
<!-- BEGIN weekLabel:loop -->
33+
<div class="text-xs font-medium text-center [&:nth-child(n+6)]:text-red-600">{label}</div>
34+
<!-- END weekLabel:loop -->
35+
</div>
36+
<div class="mt-4">
37+
<!-- BEGIN week:loop -->
38+
<div class="grid grid-cols-7">
39+
<!-- BEGIN day:loop -->
40+
<!-- BEGIN spacer -->
41+
<div class="px-0.5 mb-1 py-1.5 [&:nth-child(n+6)]:text-red-600" aria-hidden="true"></div>
42+
<!-- END spacer -->
43+
<!-- BEGIN none -->
44+
<div class="flex items-center justify-center px-0.5 py-1.5 text-sm text-center [&:nth-child(n+6)]:text-red-600">
45+
<span class="flex items-center justify-center w-7 h-7">{day}</span>
46+
</div>
47+
<!-- END none -->
48+
<!-- BEGIN link -->
49+
<div class="flex items-center justify-center px-0.5 py-1.5 text-sm text-center [&:nth-child(n+6)]:text-red-600">
50+
<a href="{url}" class="flex items-center justify-center w-7 h-7 rounded-full cursor-pointer bg-gray-100 hover:bg-gray-200" aria-label="{day}日の記事一覧を表示する">
51+
<span>{day}</span>
52+
</a>
53+
</div>
54+
<!-- END link -->
55+
<!-- END day:loop -->
56+
</div>
57+
<!-- END week:loop -->
58+
</div>
59+
</div>
60+
<!-- END month:loop -->
61+
</div>
62+
<!-- END unit:loop -->
63+
</div>
64+
<!-- END_MODULE Calendar_Year -->

src/develop/include/entry/summary-card.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h2 class="mt-3 text-gray-900 text-lg font-bold line-clamp-2">{title}</h2>
4040
<p class="mt-2 text-gray-500 font-bold text-xs">{categoryName}</p>
4141
<!-- END category:veil -->
4242
<!-- BEGIN tag:veil -->
43-
<ul class="flex flex-wrap gap-3 mt-2 text-sm text-gray-500">
43+
<ul class="flex flex-wrap gap-x-3 gap-y-1 mt-2 text-sm text-gray-500">
4444
<!-- BEGIN tag:loop -->
4545
<li>#{name}</li>
4646
<!-- END tag:loop -->
+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<!-- タグフィルター -->
2-
@include("/include/tag/filter.html", {
3-
"addtional_class": "mb-10",
4-
})
2+
@include("/include/tag/filter.html")
53

4+
<!-- エントリー一覧 -->
65
@include("/include/entry/summary-card.html", {
76
"ctx": "cid/%{CID}/page/%{PAGE}/%{DATE_YEAR}/%{DATE_MONTH}/keyword/%{KEYWORD}/tag/%{TAG}/"
87
})

src/develop/include/tag/filter.html

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<!-- BEGIN_MODULE Tag_Filter id="{{module_id}}" -->
2-
<div class="{{addtional_class}}">
3-
<!-- BEGIN tagBox -->
4-
<p class="flex flex-wrap gap-3 text-gray-900 text-2xl font-bold"><!-- BEGIN selected:loop -->
5-
<span>#{name}</span>
6-
<!-- END selected:loop -->の検索結果</p>
2+
<div class="mb-10">
3+
<!-- BEGIN tagBox -->
4+
<p class="flex flex-wrap gap-3 text-gray-900 text-2xl font-bold"><!-- BEGIN selected:loop -->
5+
<span>#{name}</span>
6+
<!-- END selected:loop -->の検索結果</p>
77

8-
<!-- BEGIN choice:veil -->
9-
<div class="mt-4">
10-
<h2 class="text-gray-500">さらに絞り込む</h2>
11-
<ul class="flex flex-wrap gap-x-4 gap-y-1.5 mt-2">
12-
<!-- BEGIN choice:loop -->
13-
<li>
14-
<a href="{url}" class="text-gray-900 hover:opacity-70"
15-
hx-push-url="{url}"
16-
hx-get="{url}tpl/include/htmx/swap-index.html"
17-
hx-target="#swap-htmx"
18-
hx-swap="innerHTML"
19-
>#{name}</a>
20-
</li>
21-
<!-- END choice:loop -->
22-
</ul>
23-
</div>
24-
<!-- END choice:veil -->
25-
<!-- END tagBox -->
8+
<!-- BEGIN choice:veil -->
9+
<div class="mt-4">
10+
<h2 class="text-gray-500">さらに絞り込む</h2>
11+
<ul class="flex flex-wrap gap-x-4 gap-y-1.5 mt-2">
12+
<!-- BEGIN choice:loop -->
13+
<li>
14+
<a href="{url}" class="text-gray-900 hover:opacity-70"
15+
hx-push-url="{url}"
16+
hx-get="{url}tpl/include/htmx/swap-index.html"
17+
hx-target="#swap-htmx"
18+
hx-swap="innerHTML"
19+
>#{name}</a>
20+
</li>
21+
<!-- END choice:loop -->
22+
</ul>
23+
</div>
24+
<!-- END choice:veil -->
25+
<!-- END tagBox -->
2626
</div>
2727
<!-- END_MODULE Tag_Filter -->

src/develop/index.html

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<!-- BEGIN_MODULE Touch_Category -->
55
<h2 class="text-gray-900 font-bold text-2xl mb-10">%{CATEGORY_NAME}</h2>
66
<!-- END_MODULE Touch_Category -->
7+
<!-- BEGIN_IF [%{DATE_MONTH}/nem] -->
8+
<h2 class="text-gray-900 font-bold text-2xl mb-10">%{DATE_YEAR}年%{DATE_MONTH}月<!-- BEGIN_IF [%{DATE_DAY}/nem] -->%{DATE_DAY}日<!-- END_IF --></h2>
9+
<!-- END_IF -->
710
<div id="swap-htmx">
811
@include("/include/htmx/swap-index.html")
912
</div>

0 commit comments

Comments
 (0)