work on cal, non func

This commit is contained in:
worktop 2024-02-15 15:54:26 -05:00
parent 2f1228da9a
commit 48823310da
2 changed files with 34 additions and 2 deletions

View File

@ -9,5 +9,6 @@
<li><a href="{{ .RelPermalink }}">{{ .Title}}</a></li> <li><a href="{{ .RelPermalink }}">{{ .Title}}</a></li>
{{ end }} {{ end }}
</ul> </ul>
<h2>LOL</h2>
</div> </div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -26,9 +26,40 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ range seq 1 $daysInMonth }} {{ range seq 1 $daysInMonth }}
<div class="day">{{ . }}</div> <div class="day">
{{ $startDate := printf "%4d-%02d-%02dT00:00:00" $year $month . }}
{{ $startDate := time.AsTime $startDate }}
{{ $endDate := printf "%4d-%02d-%02dT23:59:59" $year $month . }}
{{ $endDate := time.AsTime $endDate }}
{{ . }}
`
{{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date | int }}
{{ if after $eventStart $startDate }}
<h2>{{ .Title }}</h2>
{{ end }} {{ end }}
{{ end }}
</div>
{{ end }}
{{ range where .Site.Pages "Type" "event" }}
{{ if (and (gt .Params.start_date $.Date) (lt .Params.end_date $.Date)) }}
<h2>{{ .Title }}</h2>
{{ end }}
{{ end }}
</div> </div>
</div> </div>