summaryrefslogtreecommitdiff
path: root/cmd/generate/imworkingon.html.tmpl
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-04-20 22:58:30 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-04-20 22:58:30 -0600
commit1ca444d3e659b61317ea62588930a0a5156934c5 (patch)
treeecedc3e82487439d2e5da29f8f752b4049661a9e /cmd/generate/imworkingon.html.tmpl
parent0856e4aab26f88ab0573f9227561ea0d80bcb352 (diff)
imworkingon: Initial go at daily statuses
Diffstat (limited to 'cmd/generate/imworkingon.html.tmpl')
-rw-r--r--cmd/generate/imworkingon.html.tmpl72
1 files changed, 72 insertions, 0 deletions
diff --git a/cmd/generate/imworkingon.html.tmpl b/cmd/generate/imworkingon.html.tmpl
index fb24ac6..1be3960 100644
--- a/cmd/generate/imworkingon.html.tmpl
+++ b/cmd/generate/imworkingon.html.tmpl
@@ -81,6 +81,78 @@
</article>
{{- end }}
</section>
+ <section id="standups">
+ <h2>Daily statuses</h2>
+ <p>Posted daily on <a href="https://fosstodon.org/@lukeshu">Mastodon</a>.</p>
+
+ <details><summary>Calendar view</summary>
+ <table>
+ <thead>
+ <tr>
+ <th></th>
+ <th><abbr title="Sunday">Su</abbr></th>
+ <th><abbr title="Monday">M</abbr></th>
+ <th><abbr title="Tuesday">Tu</abbr></th>
+ <th><abbr title="Wednesday">W</abbr></th>
+ <th><abbr title="Thursday">Th</abbr></th>
+ <th><abbr title="Friday">F</abbr></th>
+ <th><abbr title="Saturday">S</abbr></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{- $cal := .StandupCalendar }}
+ {{- $curSunMonth := 0 }}
+ {{- $curSatMonth := 0 }}
+ {{- range $i, $week := reverse .StandupCalendar }}
+ <tr>
+ {{- $sun := (index $week time.Sunday) }}
+ {{- if not $sun.Day }}
+ <th></th>
+ {{- else if ne $sun.Month $curSunMonth }}
+ <th class="{{ monthClass $sun.Month }}" rowspan="{{ $cal.NumWeekdaysInMonth time.Sunday $sun.Date }}">
+ <span>{{ $sun.Month }} {{ $sun.Year }}</span>
+ </th>
+ {{- $curSunMonth = $sun.Month }}
+ {{- end }}
+ {{- range $day := $week }}
+ {{- if not $day.Day }}
+ <td></td>
+ {{- else if not $day.Data }}
+ <td class="{{ monthClass $day.Month }}">
+ {{ $day.Day }}
+ </td>
+ {{- else }}
+ <td class="{{ monthClass $day.Month }}">
+ <a href="#standup-id-{{ $day.Data.ID }}">
+ {{ $day.Day }}
+ </a>
+ </td>
+ {{- end }}
+ </td>
+ {{- end }}
+ {{- $sat := (index $week time.Saturday) }}
+ {{- if not $sat.Day }}
+ <th></th>
+ {{- else if ne $sat.Month $curSatMonth }}
+ <th class="{{ monthClass $sat.Month }}" rowspan="{{ $cal.NumWeekdaysInMonth time.Saturday $sat.Date }}">
+ <span>{{ $sat.Month }} {{ $sat.Year }}</span>
+ </th>
+ {{- $curSatMonth = $sat.Month }}
+ {{- end }}
+ {{- end }}
+ </tr>
+ </tbody>
+ </table>
+ </details>
+
+ {{- range $status := .Standups }}
+ <article class="standup" id="standup-id-{{ $status.ID }}">
+ <div class="standup-title"><a href="{{ $status.URL }}">{{ timeTag $status.CreatedAt "2006-01-02" }}</a></div>
+ <div class="standup-content">{{ $status.Content }}</div>
+ </article>
+ {{- end }}
+ </section>
<footer>
<p>The content of this page is Copyright © Luke T. Shumaker.</p>