This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
Added JS to randomize the homepage's splash image #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @swcurran, I've just wrapped up this request and ran a few quick tests. Give it a try in local development and let me know what you think (remember to use
bundle exec jekyll serve --baseurl ""
to start your local development servers). If you're running into issues starting up Jekyll, you may need to accept and merge from #113 first.Some notes:
v1.md
tov5.md
in favour of a single page:_pages/home.md
. The settings for hero images now lives in_data/hero.yml
. Each image requires aurl
to load the image, and aclass
to apply the correct CSS styles. If you add new images, you can reuse these classes, but I've only wrote 4 variations thus far and any future change will likely need new CSS classes (found under_sass/minimal-mistakes/_pages.scss
) unless the dimensions for the new image work out to be the same for what we already have./assets/js/random-hero-splash.js
. I've written this file to read from_data/hero.yml
so that if you add or remove new images in the YAML file, the script will work as intended (e.g. if you decide to pick between 3 random images or 10)Hope that covers it. Let me know if you have any questions!