shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

on the main pedalp page, start the events list from "today" #721

Closed ionous closed 5 months ago

ionous commented 5 months ago

pp pages specify event list options using a start and end date, for example: https://github.com/shift-org/shift-docs/blob/2c826225f8ed506b3a3128b6bc42922bef259b07/site/content/pedalpalooza-calendar.md?plain=1#L9

this pr changes main.js viewEvents() ( which builds the event list ) so that:

  1. when today's date is in that range, the list will use "today" as the start, and still use the specified end. ( previously it used "start" )
  2. when today isnt in that range ( archive pp pages ), it uses the specified start, and still use the specified end. ( same as old behavior )
  3. when there isn't a start and end range, like for the /calendar view, it uses today as start, and today + a constant as the end. ( same as old behavior )

code changes: