Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Carousel of our supporters #490

Open
swantzter opened this issue Feb 25, 2021 · 0 comments
Open

Carousel of our supporters #490

swantzter opened this issue Feb 25, 2021 · 0 comments

Comments

@swantzter
Copy link
Contributor

swantzter commented Feb 25, 2021

We'd like to add a carousel showcasing our supporting organisations just before the footer (I'd say on the homepage only, maybe) If we don't have the logo for a supporter we should fallback to text

I would envision doing it as follows:

extract content/pages/acknowledgements.md into a YAML file say config/supporters.yml looking something like this

- name: Sponsor A
  link: https://example.com
  logo: /static/img/logos/sponsor-a.svg
- name: Sponsor B
  link: https://example.com

include that in config.yml

SPONSORS:
  !include config/supporters.yml

Then, of course, us that to generate the list in acknowledgements.md as well as the new carousel.
You can look at how this is done in templates/footer.yml
Possibly make the acknowledgements.md page a grid or use the carousel there too.

Then I'd be interested in doing this with only css if possible using things like scroll-snap-type, but with that auto-scroll might be difficult so it might make more sense to make an animation with keyframes, or give in and do the scrolling with js

CSS Tricks has god articles on both these approaches

Things to consider

  • @media (prefers-reduced-motion: reduce) needs to be respected
  • Might want to use a wee bit of js to randomise the start position of the carousel so we don't risk never showing some sponsors
  • Given it would be placed just before the footer we can most likely take advantage of <img loading=lazy>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant