Mainroad
Mainroad copied to clipboard
Customize with more colors
Hi,
It seems that for now the only custom parameter involving color is highlightColor
.
I wish I could at least set the default "dark" color (that is used for the "lead tabs"), and ideally other main colors for the whole theme (e.g. titles, header background), in order to deal with palettes.
Let me know if more information is needed.
Remi
HI,
I managed to make the "dark" color customizable in this way:
-
Added this line to "assets/css/styles.css":
{{- $themeMainColor := .Site.Params.style.vars.themeMainColor | default (.Site.Params.themeMainColor | default "#2a2a2a") -}}
-
Find and replace any occurrence of
#2a2a2a
from "assets/css/styles.css" -
Added
themeMainColor
to[Params.style.vars]
in config.tomlthemeMainColor = "#002a4a" # Override main theme color
Hope this helps and it would be great to have it added to the main release so everyone can choose their own colors :) Nicola
Thanks for your suggestion. As far as I remember, this is more or less what I also did.
I used to manage format for code chunck in mainroad blog with library https://highlightjs.org/, using this parameters in config.toml: highlightjsCDN = "//cdn.bootcss.com" highlightjsLang = ["r", "yaml"] highlightjsTheme = "hybrid"
Now with new changes, all this special format in my blog is off, and I dont not how to do it ... Testing custom css and custom js, but no way.....
I want the code chunck look like this:
any suggestion is welcome