Add calendar endpoint - #23
Conversation
|
Looks good! |
Unfortunately, I do not have time to implement this myself at the moment. But if you want to do it yourself you could look at when I did this for nollk.it: cthit/nollk.it#72 |
|
@Oscariremma I found some spare time and have implemented the requested changes. Let me know if there is anything that needs changing! I also made the decision to break out the CSS and JavaScript into separate files because there was suddenly a lot more of it and it was easier to develop this way (and likely to maintain) |
Oscariremma
left a comment
There was a problem hiding this comment.
Looks great and thanks for the contribution!



This pull request adds
GET /cal.icswhich generates a calendar file containing the study weeks in a time period around the current date. It also adds a dependency, iamcal, which is used to generate the calendar. The library is maintained by me.The time period defaults to 8 weeks before and after the current date. The time period can be customized by the
beforeandafterquery parameters which can be between 0 and a maximum value defined by the environment variablesMAX_BEFOREandMAX_AFTERrespectively (both default to 20 weeks).The events are full-day events on every Monday with the study week as the summary (see screenshot below).