Skip to content

Commit

Permalink
added ability to change the background color with a site param in the…
Browse files Browse the repository at this point in the history
… config file
  • Loading branch information
Nick Strayer committed Sep 26, 2017
1 parent 29c0666 commit c2ec534
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions layouts/partials/backgroundColor.html
@@ -0,0 +1,9 @@
<style>
body {
{{ if (not (isset .Site.Params "backgroundcolor")) | or (eq .Site.Params.backgroundcolor "") }}
background-color: #fffff8;
{{ else }}
background-color: {{ .Site.Params.backgroundColor}};
{{end}}
}
</style>
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Expand Up @@ -18,7 +18,7 @@
{{ with .Site.Params.copyright }}
{{ . | safeHTML }}
{{ else }}
&copy; {{.Now.Format "2006"}}
&copy;{{now.Format "2006"}}
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
All rights reserved.
{{end}}
Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/header.includes.html
Expand Up @@ -24,6 +24,8 @@

<!-- Main CSS file based on Pure blog layout -->
<link rel="stylesheet" href="{{ "/css/tuftesque.css" | absURL }}">
{{ partial "backgroundColor.html" . }}


<!-- Will load google analytics code if you have it.
Open themes/tuftesque/layouts/partials/googleAnalytics.html to see how to work this
Expand Down
1 change: 0 additions & 1 deletion static/css/tuftesque.css
@@ -1,6 +1,5 @@
body{
padding-left: 0;
background-color: #fffff8;
}

code {
Expand Down

0 comments on commit c2ec534

Please sign in to comment.