billimarie / prosecutor-database

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

Feature/default thumbnail article #97

Closed baspalinckx closed 3 years ago

baspalinckx commented 3 years ago

This should do it. Added a royalty free article thumbnail and if statement in article view. I have some trouble installing Meteor on my windows machine, so can't test it tonight. But I will try on my Ubuntu box tomorrow and update accordingly if it isn't up to spec!

Issue: https://github.com/billimarie/prosecutor-database/issues/94

billimarie commented 3 years ago

Hi @baspalinckx, thanks for contributing. It looks like we're getting an error--try changing it from a div to an img.

If you need any help setting up Meteor tomorrow, feel free to submit an issue & we'll troubleshoot together.

baspalinckx commented 3 years ago

Hi @billimarie I'm sorry fixed that issue, it was late... I got the application running and compiles well, but I still can't test it. Are articles actually already implemented? Because I can't find anything about it in the app. Thanks!

billimarie commented 3 years ago

Great question--we have to manually insert the article data into the local MongoDB instance. This means;

  1. Opening a separate terminal window & running meteor mongo
  2. Adding a document: db.Attorneys.insertOne({"name": "Name Here", "role": "District Attorney", "state": "Pennsylvania", "articles": [{"title": "Title", "url": "link", "summary": "Lorem ipsum", "featuredImage": "link"}]})

You can read more about it in the docs as well as the official MongoDB docs. ~Unfortunately I haven't had a chance to go into detailed~ I just added a very basic explanation on how to add dummy code to the local MongoDB instance; if you get this untangled you're more than welcome to add it to the dev docs.

baspalinckx commented 3 years ago

There it is. I didn't really get the initial styling that was set. So I just made up something quickly on my own. The default thumbnail is all working! Screenshot_1

billimarie commented 3 years ago

Checks out great. Merging; thanks for contributing.