mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
ui: set RTL on some languages
checking with a list I found online. need to set some things as forced ltr, such as settings. For #450.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="{{ .cssClass }}">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="{{ .cssClass }}">
|
||||
<head>
|
||||
<title>404 - jfa-go</title>
|
||||
{{ template "header.html" . }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="{{ .cssClass }}">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="{{ .cssClass }}">
|
||||
<head>
|
||||
{{ template "syntaxhighlighting.html" . }}
|
||||
<script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ .shortLang }}">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}">
|
||||
<head>
|
||||
<!--- This CSS is inlined so we should keep this here! -->
|
||||
<link inline rel="stylesheet" type="text/css" href="web/css/v0.6.0bundle.css">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="{{ .cssClass }}">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="{{ .cssClass }}">
|
||||
<head>
|
||||
{{ template "header.html" . }}
|
||||
<title>{{ .strings.successHeader }} - jfa-go</title>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="{{ .cssClass }}">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="{{ .cssClass }}">
|
||||
<head>
|
||||
{{ template "header.html" . }}
|
||||
{{ if .passwordReset }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="{{ .cssClass }}">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="{{ .cssClass }}">
|
||||
<head>
|
||||
{{ template "header.html" . }}
|
||||
<title>Invalid Code - jfa-go</title>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="{{ .cssClass }}">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="{{ .cssClass }}">
|
||||
<head>
|
||||
{{ template "header.html" . }}
|
||||
<title>{{ .strings.passwordReset }} - jfa-go</title>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="light">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="light">
|
||||
<head>
|
||||
{{ template "header.html" . }}
|
||||
<title>{{ .lang.Strings.pageTitle }}</title>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .shortLang }}" class="light">
|
||||
<html lang="{{ .shortLang }}" dir="{{ .pageDirection }}" class="light">
|
||||
<head>
|
||||
<script>
|
||||
window.langFile = JSON.parse({{ .language }});
|
||||
|
||||
3
views.go
3
views.go
@@ -128,6 +128,9 @@ func (app *appContext) BasePageTemplateValues(gc *gin.Context, lang string, page
|
||||
} else {
|
||||
shortLang = langComponents[0]
|
||||
}
|
||||
if lang == "pk-pk" || shortLang == "ar" || shortLang == "fa" || shortLang == "he" || shortLang == "iw" || shortLang == "kd" || shortLang == "ps" || shortLang == "ug" || shortLang == "ur" || shortLang == "yi" {
|
||||
set("pageDirection", "rtl")
|
||||
}
|
||||
set("langName", lang)
|
||||
set("shortLang", shortLang)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user