Skip to content

Commit 595c3b1

Browse files
committed
link to day and notification for empty calendar
1 parent 935c24b commit 595c3b1

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

extensions/date/templates/calendar.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ <h2>{{.Name}}</h2>
4444
{{range .}}
4545
<td>
4646
{{if .}}
47-
<span class="tag">{{.Date.Day}}</span>
47+
<a href="/+/date/{{printf "%d-%d-%d" .Date.Day .Date.Month .Date.Year}}">
48+
<span class="tag">{{.Date.Day}}</span>
49+
</a>
4850

4951
{{ if .Pages }}
5052
<aside class="menu" dir="auto">
@@ -53,9 +55,9 @@ <h2>{{.Name}}</h2>
5355
{{range .Pages}}
5456
<a href="/{{.Name}}" dir="auto">
5557
<span class="page">
56-
{{ emoji . }}
57-
{{ $props := properties . }}
58-
{{ with $props.title }} {{ .Value }} {{ else }} {{ .Name }} {{ end }}
58+
{{ emoji . }}
59+
{{ $props := properties . }}
60+
{{ with $props.title }} {{ .Value }} {{ else }} {{ .Name }} {{ end }}
5961
</span>
6062
</a>
6163
{{end}}
@@ -72,6 +74,10 @@ <h2>{{.Name}}</h2>
7274
</tbody>
7375
</table>
7476
{{end}}
77+
{{else}}
78+
<div class="notification is-info">
79+
There are no posts that contains dates yet...
80+
</div>
7581
{{end}}
7682

7783
{{ template "footer" . }}

0 commit comments

Comments
 (0)