From d41c7d0e1d864bec20cd917354fe82330d0781d5 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 9 Feb 2024 21:38:17 +0100 Subject: Removed duplication in svg itself Design is still quite questionable. Main point would be to make them stateful in a non-awkward/hacky way like currently. --- activity.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activity.lua') diff --git a/activity.lua b/activity.lua index 398d2e8..55cb061 100644 --- a/activity.lua +++ b/activity.lua @@ -33,6 +33,7 @@ function generate_rolling (lookup, format, date) return at.year, dates.day_of_year(at) end + local head = format.start_document"Activity" .. format.start_table() for index, weekday in pairs(weekdays) do rows = rows .. format.start_row() .. format.label(weekday) for week=0,51 do @@ -45,7 +46,7 @@ function generate_rolling (lookup, format, date) end rows = rows .. format.end_row() end - return format.start_document"Activity" .. format.start_table() .. rows .. format.end_table() .. format.end_document() + return head .. rows .. format.end_table() .. format.end_document() end -- cgit v1.1