theme(fix): use html.dir attribute configured in language setup

Signed-off-by: Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
This commit is contained in:
Patrick Kollitsch 2025-05-13 07:05:40 +07:00
parent 7e80c50dee
commit 92ee7adbb8
No known key found for this signature in database
GPG Key ID: 01A2661D61A772CA
2 changed files with 1 additions and 8 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ site.Language.LanguageCode }}" {{- with partials.IncludeCached "func/GetLanguageDirection.html" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}> <html lang="{{ site.Language.LanguageCode }}" {{- if eq site.Language.LanguageDirection "rtl" }} dir="rtl" {{- end }}>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

View File

@ -1,7 +0,0 @@
{{ $dir := "" }}
{{ if compare.Ge hugo.Version "0.67.1" }}
{{ with site.Language.LanguageDirection }}
{{ $dir = . }}
{{ end }}
{{ end }}
{{ return $dir }}