]> njoseph.me Git - hyde.git/commitdiff
Added an option change the theme globally in the configs
authordigitalcraftsman <Unknown>
Tue, 2 Jun 2015 17:14:54 +0000 (19:14 +0200)
committerdigitalcraftsman <Unknown>
Tue, 2 Jun 2015 17:14:54 +0000 (19:14 +0200)
README.md
layouts/_default/list.html
layouts/_default/single.html
layouts/index.html

index 2502796f4aaf715bef975fa35ddf2f0ec6e7a3d6..3233a15329482b78a8bf300c5efd9dbf90a75290 100644 (file)
--- a/README.md
+++ b/README.md
@@ -60,12 +60,21 @@ There are eight themes available at this time.
 
 ![Hyde theme classes](https://f.cloud.github.com/assets/98681/1817044/e5b0ec06-6f68-11e3-83d7-acd1942797a1.png)
 
-To use a theme, add anyone of the available theme classes to the `<body>` element in the `default.html` layout, like so:
+To use a theme, add the `themeColor` variable under `params``, like so:
 
-```html
-<body class="theme-base-08">
-  ...
-</body>
+**TOML**
+```toml
+theme = "hyde"
+
+[params]
+  themeColor = "theme-base-09"
+```
+
+**YAML**
+```
+theme: "hyde"
+params:
+  themeColor: "theme-base-09"
 ```
 
 To create your own theme, look to the Themes section of [included CSS file](https://github.com/poole/hyde/blob/master/public/css/hyde.css). Copy any existing theme (they're only a few lines of CSS), rename it, and change the provided colors.
index f19a26fc517fd63f822e36749436cf988b26c9c0..23d4afcddc4d34d937feb19df1693ead50539dd1 100644 (file)
@@ -1,5 +1,5 @@
 {{ partial "head.html" . }}
-<body>
+<body class="{{ .Site.Params.themeColor }}">
 
 {{ partial "sidebar.html" . }}
 
index 61d009db9a1b69bdb7e6d0a19ea30f29859e123c..9f4f6034985f1849d1e8b31c18e8cda38cb88cd7 100644 (file)
@@ -1,5 +1,5 @@
 {{ partial "head.html" . }}
-<body>
+<body class="{{ .Site.Params.themeColor }}">
 
 {{ partial "sidebar.html" . }}
 
index b26cdf5c7c496783933d670c8e6acc2bfd368b28..468244b5a7fcd07b3e974c224187e61de4829a05 100644 (file)
@@ -1,5 +1,4 @@
 {{ partial "head.html" . }}
-<body>
 
 {{ partial "sidebar.html" . }}