Added languagedir param.
This commit is contained in:
parent
3eaa936f29
commit
5f0f61019a
5 changed files with 6 additions and 13 deletions
|
|
@ -37,7 +37,7 @@ $ cd themes
|
||||||
$ git clone https://github.com/frjo/hugo-theme-zen.git zen
|
$ git clone https://github.com/frjo/hugo-theme-zen.git zen
|
||||||
```
|
```
|
||||||
|
|
||||||
[Hugo - Installing Hugo](http://gohugo.io/overview/installing/)
|
[Hugo - Installing Hugo](https://gohugo.io/overview/installing/)
|
||||||
|
|
||||||
|
|
||||||
## config.yaml example
|
## config.yaml example
|
||||||
|
|
@ -61,6 +61,7 @@ params:
|
||||||
footer: "A [example.org](https://example.org/) production."
|
footer: "A [example.org](https://example.org/) production."
|
||||||
icon: "" # Relative path to icon in json feed, no leading slash.
|
icon: "" # Relative path to icon in json feed, no leading slash.
|
||||||
jquery: true # Add jQuery
|
jquery: true # Add jQuery
|
||||||
|
languageDir: "" # Set ltr or rtl, defaults to ltr.
|
||||||
logo: false # Turn off the logo.
|
logo: false # Turn off the logo.
|
||||||
piwikSiteId: # Piwik site id
|
piwikSiteId: # Piwik site id
|
||||||
piwikTrackerUrl: "" # Piwik url, schemaless and no slash on end (example.com/piwik).
|
piwikTrackerUrl: "" # Piwik url, schemaless and no slash on end (example.com/piwik).
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.Language.Lang }}">
|
<html lang="{{ .Site.Language.Lang }}" dir="{{ $.Param "languagedir" | default "ltr" }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>{{ block "title" . }}{{ .Title }} – {{ .Site.Title }}{{ end }}</title>
|
<title>{{ block "title" . }}{{ .Title }} – {{ .Site.Title }}{{ end }}</title>
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ partial "scripts.html" . -}}
|
{{ partial "scripts.html" . -}}
|
||||||
{{ partialCached "scripts_cache.html" . -}}
|
{{ partialCached "scripts_cache.html" . -}}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -312,9 +312,7 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Mobil menu */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.js-nav-wrapper {
|
.js-nav-wrapper {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
||||||
|
|
@ -142,9 +142,6 @@ $max-content-width: 960px;
|
||||||
// The default left/right gutter/padding.
|
// The default left/right gutter/padding.
|
||||||
$zen-gutters: 20px;
|
$zen-gutters: 20px;
|
||||||
|
|
||||||
// See $include-rtl below.
|
|
||||||
$zen-rtl-selector: '[dir="rtl"]';
|
|
||||||
|
|
||||||
|
|
||||||
// Miscellaneous variables
|
// Miscellaneous variables
|
||||||
//
|
//
|
||||||
|
|
@ -157,7 +154,3 @@ $zen-rtl-selector: '[dir="rtl"]';
|
||||||
$indent-amount: 2 * $base-font-size;
|
$indent-amount: 2 * $base-font-size;
|
||||||
|
|
||||||
$include-rtl: false;
|
$include-rtl: false;
|
||||||
// Automatically turn off Zen Grids' RTL support if $include-rtl is false.
|
|
||||||
@if not $include-rtl {
|
|
||||||
$zen-rtl-selector: false !global;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
var mq = window.matchMedia('(max-width: 666px)');
|
var mq = window.matchMedia('(max-width: 666px)');
|
||||||
if (mq.matches) {
|
if (mq.matches) {
|
||||||
// Create the nav toggle button and the nav sheet.
|
// Create the nav toggle button and the nav sheet.
|
||||||
$('.page').after('<div class="js-nav-wrapper"><div class="js-nav-cover"></div><a href="#navigation" class="js-nav-toggle" aria-haspopup="true" role="button">Menu</a><nav class="js-nav-sheet"></nav></div>');
|
$('.page').after('<div class="js-nav-wrapper"><div class="js-nav-cover"></div><a href="#navigation" class="js-nav-toggle" aria-haspopup="true" role="button">Menu</a><div class="js-nav-sheet"></div></div>');
|
||||||
|
|
||||||
// Populate the nav sheet.
|
// Populate the nav sheet.
|
||||||
$('.main-menu').addClass('hidden').clone().removeClass('main-menu layout__navigation layout__full hidden hidden').addClass('js-main-menu').appendTo('.js-nav-sheet').find('.navbar').removeClass('navbar').addClass('js-navbar');
|
$('.main-menu').addClass('hidden').clone().removeClass('main-menu layout__navigation layout__full hidden hidden').addClass('js-main-menu').appendTo('.js-nav-sheet').find('.navbar').removeClass('navbar').addClass('js-navbar');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue