From 7726b3d5f7d43993b6561f64bcb4efde7b384bf1 Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Tue, 18 Apr 2017 21:12:00 +0200 Subject: [PATCH] Add colors in the config --- exampleSite/config.toml | 15 +++++++- .../css => layouts/partials}/colors.css | 34 +++++++++---------- layouts/partials/head_includes.html | 6 ++++ 3 files changed, 37 insertions(+), 18 deletions(-) rename {exampleSite/static/css => layouts/partials}/colors.css (50%) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index baac946..dc161cb 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -29,4 +29,17 @@ email = "you@example.com" linkedin = "john-example-aa80ue8รจ" twitter = "example" social_banner = "img/banner.png" -posts_navigation = true \ No newline at end of file +posts_navigation = true + +[params.colors] +identifier = "#527fc1f" +identifier_dark = "#1a3152" +trivial = "#6a7a8b" +foreground = "#181d2a" +background = "#f9f9f9" +background_dark = "#282a36" +code = "#87a5d2" +type = "#97d28b" +special = "#ffcb8d" +value = "#96c2d7" +statement = "#ff8e91" diff --git a/exampleSite/static/css/colors.css b/layouts/partials/colors.css similarity index 50% rename from exampleSite/static/css/colors.css rename to layouts/partials/colors.css index 5b8715c..2d5c173 100644 --- a/exampleSite/static/css/colors.css +++ b/layouts/partials/colors.css @@ -1,61 +1,61 @@ a { - color: #527fc1; + color: {{ .Param "colors.identifier" }}; } a:hover { - color: #1a3152; + color: {{ .Param "colors.identifier_dark" }}; } section.main .content .markdown, section.header .name, section.header nav ul li:hover { - color: #181d2a; + color: {{ .Param "colors.foreground" }}; } section.header nav ul li { - color: #6a7a8b; + color: {{ .Param "colors.trivial" }}; } section.main .content .markdown code { - background-color: #f9f9f9; - color: #527fc1; + background-color: {{ .Param "colors.background" }}; + color: {{ .Param "colors.identifier" }}; } section.main .content .markdown pre, section.main .content .markdown pre code { - background-color: #282a36; - color: #87a5d2; + background-color: {{ .Param "colors.background_dark" }}; + color: {{ .Param "colors.code" }}; } .hljs, .hljs-subst, .hljs-variable { - color: #87a5d2; + color: {{ .Param "colors.code" }}; } .hljs-type { - color: #97d28b; + color: {{ .Param "colors.type" }}; } .hljs-quote { - color: #ffcb8d; + color: {{ .Param "colors.special" }}; } .hljs-string, .hljs-number, .hljs-selector-id, .hljs-selector-class, .hljs-template-tag, .hljs-deletion { - color: #96c2d7; + color: {{ .Param "colors.value" }}; } .hljs-comment { - color: #9aacbf; + color: {{ .Param "colors.trivial" }}; } .hljs-regexp, .hljs-symbol, .hljs-template-variable { - color: #ffcb8d; + color: {{ .Param "colors.special" }}; } .hljs-keyword, .hljs-attribute, .hljs-meta-keyword, .hljs-doctag, .hljs-name { - color: #97d28b; + color: {{ .Param "colors.type" }}; } .hljs-link, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-title, .hljs-section { - color: #ff8e91; + color: {{ .Param "colors.statement" }}; } .hljs-built_in, .hljs-bullet, .hljs-code, .hljs-addition { - color: #97d28b; + color: {{ .Param "colors.type" }}; } \ No newline at end of file diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html index a78ce5f..e661791 100644 --- a/layouts/partials/head_includes.html +++ b/layouts/partials/head_includes.html @@ -20,6 +20,12 @@ {{ end }} +{{ if .Site.Params.colors }} + +{{ end }} + {{ range .Site.Params.extracssfiles }} {{ end }}