From cd0f6067b160e53a0a1a5bebea6fcaf9dde0254b Mon Sep 17 00:00:00 2001 From: Worktop Date: Tue, 13 Feb 2024 15:55:36 -0500 Subject: [PATCH] work on claendar layout --- layouts/shortcodes/calendar.html | 80 ++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 layouts/shortcodes/calendar.html diff --git a/layouts/shortcodes/calendar.html b/layouts/shortcodes/calendar.html new file mode 100644 index 0000000..e11f3bc --- /dev/null +++ b/layouts/shortcodes/calendar.html @@ -0,0 +1,80 @@ +{{ $month := .Get "month" }} +{{ if not $month }} + {{ errorf "Error: 'month' is a required parameter." }} +{{ end }} + +{{ $year := .Get "year" }} +{{ if not $year }} + {{ errorf "Error: 'year' is a required parameter." }} +{{ end }} + +{{ $label := .Get "label" }} +{{ if not $label }} + {{ errorf "Error: 'label' is a required parameter." }} +{{ end }} + + +{{ $daysInMonth := 27 }} + + +
+ {{ time.Format "January 2006" "01 Dec 2024" }} +
+ {{ $padding := 4 }} + {{ range seq 1 1}} +
+ {{ end }} + {{ range seq 1 $daysInMonth }} +
{{ . }}
+ {{ end }} +
+
+ + + \ No newline at end of file