-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bin/banner
script for random banner generation
#165
Conversation
✅ Deploy Preview for conda-dot-org ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
fd21ae1
to
91dc97f
Compare
e95bdca
to
bec6dac
Compare
bin/backdrop/backdrop.js
Outdated
width: 1200, | ||
height: 630, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the "correct" size for a banner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exact size doesn't matter, but it should be close to a 2:1 aspect ratio
src/components/NewsCard/index.jsx
Outdated
} else if (props.index === 0) { | ||
image = ( | ||
<CondaCSVG /> | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why we get the big C if no image is defined in the frontMatter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opted to remove this, it looks cleaner IMO to display the image if present and to have no image otherwise
bin/banner
script for random banner generation
e3d4d91
to
edbc303
Compare
edbc303
to
1355afa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you so much @kenodegard !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The layout of the cards on the front page doesn't look quite right yet. The addition of the images for the other cards causes the big green card to be a lot taller and creates a lot of empty space.
Another problem with the layout of the smaller cards is the unequal height of the images. This makes everything look out of alignment.
Description
Instead of hunting around for free/permissive icons and generic/stock images to use for our blog posts lets just generate something random.
This is (shamelessly) inspired by GitHub's blog (https://github.blog/) where most of the banners are some abstract gradient with the GitHub logo.
This script relies on the https://github.com/qrohlf/trianglify library and is intended to be be invoked as:
This will generate images like the following:
Version 1