Open mhipo1364 opened 7 years ago
Needs work.
Apparently, if active language is rtl, dir="rtl"
is added to html element and admin/css/rtl.css
file is loaded.
I am using this CSS (sass) to fix the most important layout problems in rtl mode:
/* Dashboard */
// Captions & Model names
.module
caption
text-align: right
tr[class^="model-"]
th
text-align: right
#recent-actions-module
h2
text-align: right
/* Objects List Page */
// breadcrumbs separator icon
.breadcrumbs
.breadcrumbs-separator.icon-arrow-right::before
content: "\e60a"
// Tables
thead th,
tfoot td
text-align: right
&:first-child
border-radius: 0 4px 0 0
&:last-child
border-radius: 4px 0 0 0
&:first-child:last-child
border-radius: 4px 4px 0 0
// Results Table
.results
tbody
th
text-align: right
/* Change Object Page */
.changeform-navigation
// next button should be on left (because logical flow is rtl), but
// this needs to change the order of child a elements.
// This is a hack for it:
direction: ltr
.aligned
label
float: right
.submit-row
p.deletelink-box
float: left
Good work!
where i should put this code ? i am confused i'm not perfect in django and i need help about rtl for farsi language ! can any body help me ?
These code have to be in style files, not inside django project.
yes i put it in admin/css/rtl.css but nothing happend! i don't know what should i do :(
@mrillusion please check out these file:
This is what I would do. Basically you have to clone django-jet, checkout the dev branch, install JS dependencies with npm, make you changes to the css, rebuild static files bundle with gulp, clear your browser cache and reload, after that you should see the change.
If it works as intended then you can make a PR.
Also, since you are creating a new file, you should add it too to the gulp build chain, so it goes into the bundle. Im no css expert, but that is what I would do according to CONTRIBUTING.md and what I have understood so far.
Please come to the django-jet Discord server so we can organize if you like:
Welcome! 😄
I make rtl.css file and it works very well but some bugs in JS popups like time picker Take a look https://gist.github.com/amirasaran/0bfd8d33b0ed1a1ad9c0b850f1c6c17d
@amirasaran , thanks, works like a charm
@amirasaran can you make a PR?
Hi guys, many thanks for this awesome package
I need to have this package in
RTL
mode, has this option?