caciviclab / odca-jekyll

New ODCA front end
https://www.opendisclosure.io
GNU Affero General Public License v3.0
17 stars 13 forks source link

WIP: Path to locality- & date-nested contributions data in committee.html #436

Open ckingbailey opened 2 years ago

ckingbailey commented 2 years ago

HEADS UP: This work depends on yet-to-be-merged backend changes.

This work resolves #435.

Updates committee.html to get the contributions data for the committee at the path _data/committees/<locality>/<election-date>/<committee-id>.json, or in Jekyll-ish terms, site.data.committees[locality.slug][election_day][committee.filer_id].

Adds Jekyll "where" queries to get locality and election date for committee from site.localities and site.elections. Is there a better way to do this, perhaps building that information right into the committee's markdown file?

:shrug: NOTE: The query to get election date depends on committee.election, which is not a key that exists on the committee markdown file, and yet it seems to be working by some mystical interdimensional force. Maybe we should understanding how this is working before this gets merged.

Previews

Large screens

Small screens