Mainroad icon indicating copy to clipboard operation
Mainroad copied to clipboard

Customize with more colors

Open randruc opened this issue 4 years ago • 3 comments

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

randruc avatar Apr 15 '20 09:04 randruc

HI,

I managed to make the "dark" color customizable in this way:

  1. Added this line to "assets/css/styles.css": {{- $themeMainColor := .Site.Params.style.vars.themeMainColor | default (.Site.Params.themeMainColor | default "#2a2a2a") -}}

  2. Find and replace any occurrence of #2a2a2a from "assets/css/styles.css"

  3. Added themeMainColor to [Params.style.vars] in config.toml themeMainColor = "#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

rugginic avatar Nov 06 '20 08:11 rugginic

Thanks for your suggestion. As far as I remember, this is more or less what I also did.

randruc avatar Nov 08 '20 12:11 randruc

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:

sampleformat any suggestion is welcome

fervilber avatar Dec 02 '20 08:12 fervilber