diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-23 17:11:21 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-23 17:11:21 +0200 |
commit | 27f25ae1749f28d59edb925c3989efbeb83fcc41 (patch) | |
tree | 4565cee869c0f192b6d1fd485633ad625f6d810b /module/html/view/small-calendar.scm | |
parent | Repair tests. (diff) | |
download | calp-27f25ae1749f28d59edb925c3989efbeb83fcc41.tar.gz calp-27f25ae1749f28d59edb925c3989efbeb83fcc41.tar.xz |
Add rendering of standalone small-cal.
Diffstat (limited to 'module/html/view/small-calendar.scm')
-rw-r--r-- | module/html/view/small-calendar.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/module/html/view/small-calendar.scm b/module/html/view/small-calendar.scm new file mode 100644 index 00000000..e6378176 --- /dev/null +++ b/module/html/view/small-calendar.scm @@ -0,0 +1,19 @@ +(define-module (html view small-calendar) + :use-module ((html components) :select (xhtml-doc include-css)) + :use-module ((html caltable) :select (cal-table)) + :use-module ((datetime) :select (month- month+ remove-day date->string)) + ) + +(define-public (render-small-calendar month standalone) + (define table (cal-table + start-date: month + end-date: (remove-day (month+ month)) + next-start: month+ + prev-start: month- + )) + (if standalone + (xhtml-doc + (head (title ,(date->string month "~1")) + ,(include-css "/static/smallcal.css")) + (body ,table)) + table)) |