Skip to content

Commit

Permalink
Fix #35: Add RTL Support
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikborsadiya committed Feb 22, 2018
1 parent 12cd008 commit 9be149d
Show file tree
Hide file tree
Showing 23 changed files with 140 additions and 21 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Use `npm run build` task to compile all source files.
## Customiztion
For more information about customizing theme colors please follow this [guide](http://pratikborsadiya.in/blog/vali-admin/).

## RTL Support
Please follow this [guide](http://pratikborsadiya.in/blog/vali-admin/) to enable RTL support.

## Contributors

* **[Pratik Borsadiya](http://pratikborsadiya.in)** - *Project Author*
Expand Down
2 changes: 1 addition & 1 deletion docs/blank-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/bootstrap-components.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/charts.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -14248,7 +14248,7 @@ be a descendant of the grid when it is being dragged.
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
padding-left: 20px;
padding: 0 20px;
-ms-flex-item-align: center;
align-self: center;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/form-components.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/form-custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/form-notifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/form-samples.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down Expand Up @@ -211,7 +211,7 @@ <h3 class="tile-title">Features</h3>
</ul>
<p>Vali is a free and responsive admin theme built with Bootstrap 4, SASS and PUG.js. It's fully customizable and modular.</p>
<p>Vali is is light-weight, expendable and good looking theme. The theme has all the features required in a dashboard theme but this features are built like plug and play module. Take a look at the <a href="http://pratikborsadiya.in/blog/vali-admin" target="_blank">documentation</a> about customizing the theme colors and functionality.</p>
<p class="mt-4 mb-4"><a class="btn btn-primary mr-2 mb-2" href="http://pratikborsadiya.in/blog/vali-admin" target="_blank"><i class="fa fa-file"></i>Docs</a><a class="btn btn-info mr-2 mb-2" href="https://github.com/pratikborsadiya/vali-admin" target="_blank"><i class="fa fa-github"></i>GitHub</a><a class="btn btn-success mb-2" href="https://github.com/pratikborsadiya/vali-admin/archive/master.zip" target="_blank"><i class="fa fa-download"></i>Download</a></p>
<p class="mt-4 mb-4"><a class="btn btn-primary mr-2 mb-2" href="http://pratikborsadiya.in/blog/vali-admin" target="_blank"><i class="fa fa-file"></i>Docs</a><a class="btn btn-info mr-2 mb-2" href="https://github.com/pratikborsadiya/vali-admin" target="_blank"><i class="fa fa-github"></i>GitHub</a><a class="btn btn-success mr-2 mb-2" href="https://github.com/pratikborsadiya/vali-admin/archive/master.zip" target="_blank"><i class="fa fa-download"></i>Download</a></p>
</div>
</div>
<div class="col-md-6">
Expand Down
2 changes: 1 addition & 1 deletion docs/page-calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/page-invoice.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/page-mailbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/page-user.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/table-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/table-data-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/ui-cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/widgets.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Vali Admin</title>
</head>
<body class="app sidebar-mini">
<body class="app sidebar-mini rtl">
<!-- Navbar-->
<header class="app-header"><a class="app-header__logo" href="index.html">Vali</a>
<!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
Expand Down
2 changes: 1 addition & 1 deletion src/pug/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ block content
a.btn.btn-info.mr-2.mb-2(href="https://github.com/pratikborsadiya/vali-admin", target="_blank")
i.fa.fa-github
| GitHub
a.btn.btn-success.mb-2(href="https://github.com/pratikborsadiya/vali-admin/archive/master.zip", target="_blank")
a.btn.btn-success.mr-2.mb-2(href="https://github.com/pratikborsadiya/vali-admin/archive/master.zip", target="_blank")
i.fa.fa-download
| Download

Expand Down
2 changes: 1 addition & 1 deletion src/pug/layouts/_layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ html(lang="en")

include ../includes/_head.pug

body.app.sidebar-mini
body.app.sidebar-mini.rtl

// Navbar
include ../includes/_header.pug
Expand Down
110 changes: 110 additions & 0 deletions src/sass/3-component/_rtl.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// Componant: RTL
// Right to left support

[dir=rtl] {
body {
text-align: right;
direction: rtl;
}

.app-sidebar {
left: auto;
right: 0;
}

.app-sidebar__user-avatar {
margin-left: 15px;
margin-right: 0;
}

.dropdown-menu.dropdown-menu-right {
right: auto;
left: 0;
}

.list-unstyled,
.app-nav,
.app-menu,
.user .user-tabs,
.treeview-menu {
padding-right: 0;
}

.btn .icon,
.btn .fa,
.treeview-item .icon {
margin-right: 0;
margin-left: 5px;
}

.modal-header .close {
margin-left: 0;
margin-right: auto;
}

.modal-footer > :not(:last-child) {
margin-right: 0;
margin-left: 0.25rem;
}

.widget-small .icon { border-radius: 0 4px 4px 0; }

.user .timeline-post .post-media img {
margin-right: 0;
margin-left: 10px;
}

table.table-bordered.dataTable th:last-child,
table.table-bordered.dataTable th:last-child,
table.table-bordered.dataTable td:last-child,
table.table-bordered.dataTable td:last-child {
border-right-width: 1px;
}

@media(min-width: 768px) {
.app-header {
padding-right: 0;
padding-left: 30px;
}
.app-content {
margin-left: 0;
margin-right: 230px;
transition: margin-right 0.3s ease;
}
.sidebar-mini.sidenav-toggled .app-content {
margin-left: 0;
margin-right: 50px;
}
.sidebar-mini.sidenav-toggled .app-menu__label,
.sidebar-mini.sidenav-toggled .treeview-menu {
left: auto;
right: 50px;
}
.sidebar-mini.sidenav-toggled .treeview .app-menu__label {
border-top-left-radius: 4px;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
}
.sidebar-mini.sidenav-toggled .treeview-menu {
border-bottom-right-radius: 0;
border-bottom-left-radius: 4px;
}
.sidebar-mini.sidenav-toggled .app-menu__label {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
}

@media(max-width: 768px) {
.app.sidenav-toggled .app-sidebar {
left: auto;
right: 0;
}
.app .app-sidebar {
left: auto;
right: -230px;
}
}
}
2 changes: 1 addition & 1 deletion src/sass/3-component/_widgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

.info {
flex: 1;
padding-left: 20px;
padding: 0 20px;
align-self: center;

h4 {
Expand Down
6 changes: 6 additions & 0 deletions src/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
@import '3-component/header';
@import '3-component/sidebar';
@import '3-component/sidebar-mini';

// This styles are optional based on your preferance
@import '3-component/dropdown';
@import '3-component/button';
Expand All @@ -49,6 +50,11 @@
@import '3-component/widgets';
@import '3-component/chat';

// Include the following style if you need RTL support
// Also you will need to add dir="rtl" attribute to HTML tag

//@import '3-component/rtl';

// 4 -Pages
//---------------------------------------------------

Expand Down

0 comments on commit 9be149d

Please sign in to comment.