gbif / hp-uk-collections

Source for the DiSSCoUK Data Portal provided by GBIF Hosted Portals
https://dissco-uk.org/
2 stars 1 forks source link

Add counts to home page with appropriate style and html changes #49

Closed jrdh closed 6 months ago

jrdh commented 6 months ago

The counts are collected from the GBIF graphql API which is unstable and not public - we'll need to keep an eye on it to make sure things continue to work going forward. If the counts can't be collected then an alternative line is shown so that users don't get met with an error on the home page. Also worth noting, this change causes the home page to call the GBIF graphql every time it is loaded. They seem to have some decent caching in place so this isn't a problem from the user's perspective but we could cache it in a cookie or something if we wanted to be a bit kinder on their API. Realistically though, the number of people using the site isn't high enough for it to cause a problem and it doesn't impact initial page load times.

Closes #48