mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Regis Philibert
21.23.2022 c49009b823de58ec21e4038eec91329cb538f8d2
Only add html[dir] attr if languageDirection is explicitly set
1 files deleted
1 files modified
1 files added
12 ■■■■■ changed files
layouts/_default/baseof.html 2 ●●● patch | view | raw | blame | history
layouts/partials/func/GetLanguageDirection.html 7 ●●●●● patch | view | raw | blame | history
layouts/partials/language-direction.html 3 ●●●●● patch | view | raw | blame | history
layouts/_default/baseof.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode | default "en" }}" {{ partial "language-direction.html" . | safeHTMLAttr }}>
<html lang="{{ site.LanguageCode | default "en" }}" {{- with partialCached "func/GetLanguageDirection" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
layouts/partials/func/GetLanguageDirection.html
New file
@@ -0,0 +1,7 @@
{{ $dir := "" }}
{{ if ge hugo.Version "0.67.1" }}
  {{ with  site.Language.LanguageDirection }}
     {{ $dir = . }}
  {{ end }}
{{ end }}
{{ return $dir }}
layouts/partials/language-direction.html
File was deleted