Browse Source

Add configuration to Reverse layout

Ján Koščo 8 years ago
parent
commit
a04b9e1574
2 changed files with 16 additions and 6 deletions
  1. 15
    5
      README.md
  2. 1
    1
      layouts/index.html

+ 15
- 5
README.md View File

84
 
84
 
85
 ![Hyde with reverse layout](https://f.cloud.github.com/assets/98681/1831230/42b0d3ac-7384-11e3-8d54-2065afd03f9e.png)
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
 ### Disqus
105
 ### Disqus

+ 1
- 1
layouts/index.html View File

1
 {{ partial "head.html" . }}
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
 {{ partial "sidebar.html" . }}
4
 {{ partial "sidebar.html" . }}
5
 
5