1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-25 09:27:28 +00:00

Fix the rtl problem in the settings page

This commit is contained in:
Esmail Almaleeh 2021-07-31 13:59:50 +03:00 committed by Cadence Ember
parent b8c44cdd0d
commit c901c5e691
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
2 changed files with 8 additions and 4 deletions

View File

@ -10,7 +10,7 @@ mixin fieldset(name)
mixin input(id, description, placeholder, disabled, list) mixin input(id, description, placeholder, disabled, list)
.field-row .field-row
label.description(for=id)= description label.description(for=id)= description
input(type="text" id=id name=id value=settings[id] placeholder=placeholder disabled=disabled list=`${id}-list`) input(type="text" dir="ltr" id=id name=id value=settings[id] placeholder=placeholder disabled=disabled list=`${id}-list`)
if list if list
datalist(id=`${id}-list`) datalist(id=`${id}-list`)
each item in list each item in list
@ -21,7 +21,7 @@ mixin checkbox(id, description, label, disabled)
label.description(for=id)= description label.description(for=id)= description
input.checkbox(type="checkbox" id=id name=id checked=(settings[id] !== 0) disabled=disabled autocomplete="off") input.checkbox(type="checkbox" id=id name=id checked=(settings[id] !== 0) disabled=disabled autocomplete="off")
label.pill(for=id tabindex=(disabled ? null : 0) onkeypress=`[" ", "Enter"].includes(event.key) && this.click()`)= label label.pill(for=id tabindex=(disabled ? null : 0) onkeypress=`[" ", "Enter"].includes(event.key) && this.click()`)= label
span.fake-checkbox span.fake-checkbox(class=ll.meta_direction)
mixin select(id, description, disabled, options) mixin select(id, description, disabled, options)
.field-row .field-row
@ -31,7 +31,7 @@ mixin select(id, description, disabled, options)
option(value=option.value selected=(option.value === settings[id]))= option.text option(value=option.value selected=(option.value === settings[id]))= option.text
doctype html doctype html
html html(dir=ll.meta_direction)
head head
title= `${ll.t_settings} | Bibliogram` title= `${ll.t_settings} | Bibliogram`
include includes/head include includes/head
@ -47,7 +47,7 @@ html
+fieldset(ll.t_features) +fieldset(ll.t_features)
+select("language", ll.t_language, false, [ +select("language", ll.t_language, false, [
{value: "ar", text: "اَلْعَرَبِيَّةُ‎"}, {value: "ar", text: "العربية"},
{value: "bg", text: "Български"}, {value: "bg", text: "Български"},
{value: "de", text: "Deutsch"}, {value: "de", text: "Deutsch"},
{value: "en", text: "English (International)"}, {value: "en", text: "English (International)"},

View File

@ -137,6 +137,10 @@ button
position: relative position: relative
outline: none outline: none
&.rtl
margin-left: 0px
margin-right: 8px
.checkbox .checkbox
display: none display: none