Bläddra i källkod

Add configuration to Reverse layout

Ján Koščo 8 år sedan
förälder
incheckning
a04b9e1574
2 ändrade filer med 16 tillägg och 6 borttagningar
  1. 15
    5
      README.md
  2. 1
    1
      layouts/index.html

+ 15
- 5
README.md Visa fil

@@ -84,12 +84,22 @@ To create your own theme, look to the Themes section of [included CSS file](http
84 84
 
85 85
 ![Hyde with reverse layout](https://f.cloud.github.com/assets/98681/1831230/42b0d3ac-7384-11e3-8d54-2065afd03f9e.png)
86 86
 
87
-Hyde's page orientation can be reversed with a single class.
87
+To reverse page orientation, add the `layoutReverse` variable under `params`, like so:
88 88
 
89
-```html
90
-<body class="layout-reverse">
91
-  ...
92
-</body>
89
+**TOML**
90
+```toml
91
+theme = "hyde"
92
+
93
+[params]
94
+  layoutReverse = true
95
+```
96
+
97
+**YAML**
98
+```yaml
99
+theme: "hyde"
100
+
101
+params:
102
+  layoutReverse: true
93 103
 ```
94 104
 
95 105
 ### Disqus

+ 1
- 1
layouts/index.html Visa fil

@@ -1,5 +1,5 @@
1 1
 {{ partial "head.html" . }}
2
-<body class="{{ .Site.Params.themeColor }}">
2
+<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
3 3
 
4 4
 {{ partial "sidebar.html" . }}
5 5