feat: add initial RTL language support

This commit is contained in:
George Cushen committed 2020-04-11 22:25:03 +01:00
1 parent 14839190f6
commit 2d63a0090a
2 files changed
+4 -1

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
# List of ISO 639-1 language codes for which text is directed from right to left.
rtl = ["ar", "fa", "he", "ur"]
+2 -1
View File
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="{{ site.LanguageCode | default "en-us" }}">
{{- $language_code := site.LanguageCode | default "en-us" -}}
<html lang="{{$language_code}}" {{ if in site.Data.i18n.rtl.rtl $language_code }}dir="rtl"{{end}}>
{{ partial "site_head" . }}
<body id="top" data-spy="scroll" data-offset="70" data-target="{{ if or .IsHome (eq .Type "widget_page") }}#navbar-main{{else}}#TableOfContents{{end}}" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>