Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
316 stars 157 forks source link

[Rails][Administrate] Add ability to upload sponsor logos in Theme #506

Closed mirandawang closed 3 years ago

mirandawang commented 4 years ago

We have a Theme model which allows us to change different UI features of the Terrastories app for different communities that use it.

Admin are able to update the Theme properties through the admin panel and have one active Theme at a time.

To login to the admin panel, you can use the default terrastories admin account which is set up in the seeds.rb file.

Let’s add the ability to set sponsor logos which will change add images on the welcome screen : Screen Shot 2020-09-03 at 5 35 20 PM

The sponsor images should go underneath the box and below the container for the custom logo here https://github.com/Terrastories/terrastories/blob/master/rails/app/views/welcome/index.html.erb#L30 in it's own div. Let's add an extra span with the text "Built with :heart: by" above the sponsor images. Ideally this is centered but feel free to design what looks nice to you!

The Ruby For Good logo should always be included by default! If there are no sponsor logos attached to the Theme, then only the R4G logo should be displayed. Here's the R4G logo we can use: rubyforgood

If the user attempts to upload a non image format file, we should show an error.

Acceptance Criteria: Theme can be created/edited with multiple sponsor logos attached The sponsor logos appear,along with the R4G logo, on the initial Welcome page If there is no theme active or no sponsor logos attached, only the R4G logo is shown There's some text that says "Built with :heart: by" above the sponsor logos. Errors are shown on the admin page if non images are uploaded.

Bonus points: Add unit tests

tauhir commented 3 years ago

@FeminismIsAwesome @mirandawang Can I give this a go?

mirandawang commented 3 years ago

@tauhir Sure thing!

tauhir commented 3 years ago

@mirandawang Just commenting to let you know that I am working on this, I only managed to get my local environment up and running this weekend 😄 - issues with docker and wsl2 🤦

mirandawang commented 3 years ago

Thanks for the update @tauhir, and glad the local env is working now! :D Feel free to come over to Slack if you have any more q's -- you can find info in the wiki!