billimarie / prosecutor-database

An open-source, community oversight dataset of all U.S. Prosecutors. Happy Hacktoberfest 🎃
https://billimarie.github.io/prosecutor-database
Other
89 stars 85 forks source link

Add Recently Updated section to home page #108

Closed michaelknowles closed 4 years ago

michaelknowles commented 4 years ago

Solves #103

This populates the Recently Updated section of the home page. By default, it will get the 10 (this number is customizable through the count parameter) latest entries in the Attorneys DB. This is done by reverse sorting the _id field. If more granularity is required, it would be best to add something like a timestamp or lastUpdated field to the DB that this query could utilize.

It is formatted as a Bootstrap table for display efficiency and readability. The name of the prosecutor is a link that goes to the attorneyView page for the clicked prosecutor.

image

billimarie commented 4 years ago

Gorgeous. Thank you for contributing, @michaelknowles. Merging.