Images by theme
Closed this issue · 3 comments
Very often when you design a themeable website, you'll want different images per theme. For example, you probably want the standard burger-menu icon, and probably other icons, to tone with the colours you've established in your CSS. Now of course youcould design all your icons in SVG and colour them through CSS, and that would work, but I'd like to be able to put a directory for images into each theme,
Currently, resources are copied from the theme into public
by the function cryogen-core.io/copy-resources-from-theme
which explicitly copies only the directories css
, js
, the file html/404.html
and any resources listed in the value of :theme-resources
in the configuration.
Which sort-of answers my question in as much as I could list a directory in :theme-resources
but
- I think this is something which could usefully be added as a default feature; and
- there is a decision to be made about how it should be added.
So, would you accept a pull request to cryogen-core
which added a standard image directory to copy-resources-from-theme
, and if so, should that directory be called img
(in which case images from that directory would overwrite images of the same name from content/img
, or theme-img
(in which case a new directory theme-img
would be created in public
and no name collisions would occur)?
Obviously there would be documentation changes in consequence, which I would also seek to do in a related pull request.
Splitting out images sounds pretty reasonable to me, and a pr would be very welcome. :)
Working on it!
Actually, this issue should have been raised on cryogen-core
. Closing it here and opening it there.