Skip to content
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

Allow for custom icons and colour schemes #241

Open
2 tasks
zkamvar opened this issue Feb 1, 2022 · 4 comments
Open
2 tasks

Allow for custom icons and colour schemes #241

zkamvar opened this issue Feb 1, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@zkamvar
Copy link
Contributor

zkamvar commented Feb 1, 2022

Right now we have a set of four colour schemes and logos based on our curricula. Of course, there are other organisations that use our infrastructure and would probably like to not have to create a new fork of varnish in order to use a different logo or colour scheme. Thus:

  • create yaml item that can point to a logo/favicon file/s to replace the existing logo/favicon.
  • create yaml item that can override some of the colorschemes (this may require modification of the scss directly, which would mean that varnish needs this as well)
@zkamvar zkamvar added the enhancement New feature or request label Feb 1, 2022
@zkamvar
Copy link
Contributor Author

zkamvar commented Feb 2, 2022

N.B. This is very related to #66

@RaoOfPhysics
Copy link

RaoOfPhysics commented Apr 7, 2022

Thanks for the lovely and useful package, @zkamvar, and thanks also for thinking about reuse of the template beyond The Carpentries!

I was wondering if you could also add “favicon” to the list of customisation options, as a the moment it seems like that’s hard-coded as well. (EDIT: Oh, and the footer too! See https://learntodiscover.github.io/lesson2_sandpaper/ and https://contributor.r-project.org/r-bug-tracking-lesson/ for example.)

Many thanks, once again!

@zkamvar
Copy link
Contributor Author

zkamvar commented Apr 7, 2022

I was wondering if you could also add “favicon” to the list of customisation options, as a the moment it seems like that’s hard-coded as well.

Of course! It's something that may take some time to get going since there are a few moving parts that dictate these (for example, see modifications in sandpaper and modifications in varnish needed to update the theme (note that Saba had to add a python and PDF engine to her version of sandpaper, so there's a lot more to her changes than styling)).

Right now, I've painted myself into a corner by building the source into the minified version before the package is built. This means that the colours are hard-coded in the CSS. The icons are a bit more flexible since I have the carpentry variable that controls them, but it's still a bit of a challenge.

In the meantime, one workaround that should work is:

  1. fork the varnish repository
  2. change the colours in https://github.com/carpentries/varnish/blob/main/source/stylesheets/variables.scss
  3. change carpentries-logo.svg and carpentries-logo-sm.svg to use your logo.
  4. add varnish: r-devel/varnish to your config file to use this version of varnish on your site.

The logo and colors are things I'm unlikely to change in varnish (until I work out the right path to allow for customisation), so you can keep up-to-date by merging and the github actions will regenerate the minified CSS once it gets to the main branch.

@RaoOfPhysics
Copy link

Sounds ace! Thanks for documenting the alternative options. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants