Skip to content

Commit

Permalink
rtl mode
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed Apr 4, 2018
1 parent 2f95440 commit e7f0b01
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 35 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ _site/
.DS_Store
package-lock.json
/_test/
src/assets/css/dashboard.css
src/assets/css/dashboard.min.css
src/assets/css/*.css
src/assets/plugins/**/plugin.css
src/assets/plugins/**/plugin.min.css
generated-site
Expand Down
5 changes: 5 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var gulp = require('gulp'),
sass = require('gulp-sass'),
rename = require('gulp-rename'),
autoprefixer = require('gulp-autoprefixer'),
rtlcss = require('gulp-rtlcss'),
pckg = require('./package.json');

gulp.task('styles', function () {
Expand All @@ -15,6 +16,10 @@ gulp.task('styles', function () {
cascade: false
}))
.pipe(rename('dashboard.css'))
.pipe(gulp.dest('src/assets/css/'))

.pipe(rtlcss())
.pipe(rename('dashboard.rtl.css'))
.pipe(gulp.dest('src/assets/css/'));
});

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"gulp": "^3.9.1",
"gulp-autoprefixer": "^5.0.0",
"gulp-rename": "^1.2.2",
"gulp-rtlcss": "^1.2.0",
"gulp-sass": "^3.1.0",
"npm-run-all": "^4.1.2"
},
Expand Down
6 changes: 3 additions & 3 deletions src/_includes/cards/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ <h3 class="card-title text-center">December 2017</h3>
<ul class="list-group card-list-group">
<li class="list-group-item list-group-item-red">
<a href="javascript:void(0)" class="text-inherit">Cras justo odio</a>
<span class="pull-right text-muted">16 Dec</span>
<span class="float-right text-muted">16 Dec</span>
</li>
<li class="list-group-item list-group-item-blue">
<a href="javascript:void(0)" class="text-inherit">Dapibus ac facilisis in</a>
<span class="pull-right text-muted">22 Dec</span>
<span class="float-right text-muted">22 Dec</span>
</li>
<li class="list-group-item list-group-item-red">
<a href="javascript:void(0)" class="text-inherit">Vestibulum at eros</a>
<span class="pull-right text-muted">29 Dec</span>
<span class="float-right text-muted">29 Dec</span>
</li>
</ul>
</div>
2 changes: 1 addition & 1 deletion src/_includes/cards/chart-bg.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="card">
<div class="card-body">
<div class="card-value pull-right text-{{ color }}">{{ include.rate | default: '+5%' }}</div>
<div class="card-value float-right text-{{ color }}">{{ include.rate | default: '+5%' }}</div>
<h3 class="mb-1">{{ include.title | default: '423' }}</h3>
<div class="text-muted">{{ include.description | default: 'Users online' }}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/cards/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="form-group">
<label class="form-label">
Password
<a href="{{ site.base }}/forgot-password.html" class="pull-right small">I forgot password</a>
<a href="{{ site.base }}/forgot-password.html" class="float-right small">I forgot password</a>
</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/cards/media-inverse.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="card bg-{{ include.color | default: 'success' }}">
<div class="card-body text-white">
<div class="card-value pull-right">{{ include.rate | default: '23%' }}</div>
<div class="card-value float-right">{{ include.rate | default: '23%' }}</div>
<h3 class="mb-1">{{ include.title | default: '423' }}</h3>
<div>{{ include.description | default: 'Users online' }}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/cards/media.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="card">
<div class="card-body">
<div class="card-value pull-right text-{{ include.color | default: 'success' }}">{{ include.rate | default: '23%' }}</div>
<div class="card-value float-right text-{{ include.color | default: 'success' }}">{{ include.rate | default: '23%' }}</div>
<h3 class="mb-1">{{ include.title | default: '423' }}</h3>
<div>{{ include.description | default: 'Users online' }}</div>
{% if include.progress %}
Expand Down
8 changes: 4 additions & 4 deletions src/_includes/cards/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,31 @@
<div class="card-body">
<div class="card-text">
<div class="mt-0">
<small class="pull-right text-muted">10/200 GB</small>
<small class="float-right text-muted">10/200 GB</small>
<h5>Memory</h5>
<div class="progress progress-sm">
<div style="width: 60%;" class="progress-bar"></div>
</div>
</div>

<div class="mt-5">
<small class="pull-right text-muted">20 GB</small>
<small class="float-right text-muted">20 GB</small>
<h5>Bandwidth</h5>
<div class="progress progress-sm">
<div style="width: 50%;" class="progress-bar"></div>
</div>
</div>

<div class="mt-5">
<small class="pull-right text-muted">73%</small>
<small class="float-right text-muted">73%</small>
<h5>Activity</h5>
<div class="progress progress-sm">
<div style="width: 40%;" class="progress-bar"></div>
</div>
</div>

<div class="mt-5">
<small class="pull-right text-muted">400 GB</small>
<small class="float-right text-muted">400 GB</small>
<h5>FTP</h5>
<div class="progress progress-sm">
<div style="width: 80%;" class="progress-bar bg-danger"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/cards/sparkline.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="card">
<div class="card-body">
<div class="card-value pull-right text-warning">
<div class="card-value float-right text-warning">
<div class="sparkline" data-sparkline="{% include chart-data.html limit=limit offset=offset aggregate=aggregate %}" data-sparkline-color="{{ site.colors[color] }}" data-sparkline-type="{{ chart_type }}"></div>
</div>
<h3 class="mb-1">$10M <i class="mdi mdi-trending-up text-success"></i></h3>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/cards/twitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="content">

<p class="h5">
John Smith <small>@johnsmith</small> <small class="pull-right text-muted">31 minutes ago</small>
John Smith <small>@johnsmith</small> <small class="float-right text-muted">31 minutes ago</small>
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean efficitur sit amet massa fringilla egestas. Nullam condimentum luctus turpis.
Expand Down
18 changes: 18 additions & 0 deletions src/_includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@

<title>{% if page.title %}{{ page.title }} - {% endif %}{% if layout.title %}{{ layout.title }} - {% endif %}{{ site.description }}</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,500,500i,600,600i,700,700i&amp;subset=latin-ext">
<script src="{{ site.base }}/assets/js/require.min.js"></script>
<script>
requirejs.config({
baseUrl: '{{ site.base }}'
});
</script>

<!-- Dashboard Core -->
<link href="{{ site.base }}/assets/css/dashboard{% if page.rtl %}.rtl{% endif %}.css" rel="stylesheet" />
<script src="{{ site.base }}/assets/js/dashboard.js"></script>

{% for plugin in site.theme-plugins %}
<!-- {{ plugin[1].name }} Plugin -->
{% if plugin[1].files contains 'css' %}<link href="{{ site.base }}/assets/plugins/{{ plugin[0] }}/plugin.css" rel="stylesheet" />{% endif %}
{% if plugin[1].files contains 'js' %}<script src="{{ site.base }}/assets/plugins/{{ plugin[0] }}/plugin.js"></script>{% endif %}
{% endfor %}
21 changes: 1 addition & 20 deletions src/_layouts/base.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
<!doctype html>
{% assign min-ext = '' %}{% if jekyll.environment == 'production' %}{% assign min-ext = '.min' %}{% endif %}
<html lang="en">
<html lang="en" dir="{% if page.rtl %}rtl{% else %}ltr{% endif %}">
<head>
{% include head.html %}

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,500,500i,600,600i,700,700i&amp;subset=latin-ext">
<script src="{{ site.base }}/assets/js/require.min.js"></script>
<script>
requirejs.config({
baseUrl: '{{ site.base }}'
});
</script>

<!-- Dashboard Core -->
<link href="{{ site.base }}/assets/css/dashboard.css" rel="stylesheet" />
<script src="{{ site.base }}/assets/js/dashboard.js"></script>

{% for plugin in site.theme-plugins %}
<!-- {{ plugin[1].name }} Plugin -->
{% if plugin[1].files contains 'css' %}<link href="{{ site.base }}/assets/plugins/{{ plugin[0] }}/plugin.css" rel="stylesheet" />{% endif %}
{% if plugin[1].files contains 'js' %}<script src="{{ site.base }}/assets/plugins/{{ plugin[0] }}/plugin.js"></script>{% endif %}
{% endfor %}
</head>
<body class="{{ page.body-class }}">

Expand Down
1 change: 1 addition & 0 deletions src/assets/scss/dashboard/_core.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
html {
font-size: 15px;
height: 100%;
direction: ltr;

@include media-breakpoint-up('md') {
font-size: 16px;
Expand Down
38 changes: 38 additions & 0 deletions src/rtl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: default
rtl: true
title: RTL mode
---

<div class="container">
{% include page-title.html title="RTL mode" %}

<div class="row">
<div class="col-6">
{% capture body %}
لكن لا بد أن أوضح لك أن كل هذه الأفكار المغلوطة حول استنكار النشوة وتمجيد الألم نشأت بالفعل، وسأعرض لك التفاصيل لتكتشف حقيقة وأساس تلك السعادة البشرية، فلا أحد يرفض أو يكره أو يتجنب الشعور بالسعادة، ولكن بفضل هؤلاء الأشخاص الذين لا يدركون بأن السعادة لا بد أن نستشعرها بصورة أكثر عقلانية ومنطقية فيعرضهم هذا لمواجهة الظروف الأليمة، وأكرر بأنه لا يوجد من يرغب في الحب ونيل المنال ويتلذذ بالآلام، الألم هو الألم ولكن نتيجة لظروف ما قد تكمن السعاده فيما نتحمله من كد وأسي.

و سأعرض مثال حي لهذا، من منا لم يتحمل جهد بدني شاق إلا من أجل الحصول على ميزة أو فائدة؟ ولكن من لديه الحق أن ينتقد شخص ما أراد أن يشعر بالسعادة التي لا تشوبها عواقب أليمة أو آخر أراد أن يتجنب الألم الذي ربما تنجم عنه بعض المتعة ؟
علي الجانب الآخر نشجب ونستنكر هؤلاء الرجال المفتونون بنشوة اللحظة الهائمون في رغباتهم فلا يدركون ما يعقبها من الألم والأسي المحتم، واللوم كذلك يشمل هؤلاء الذين أخفقوا في واجباتهم نتيجة لضعف إرادتهم فيتساوي مع هؤلاء الذين يتجنبون وينأون عن تحمل الكدح والألم .
{% endcapture %}

{% include cards/card.html body=body title="عنوان البطاقة" %}
</div>
<div class="col-6">
<div class="row">
<div class="col-4">
{% include cards/stats-1.html number=43 title="تذاكر جديدة" percentage=6 %}
</div>
<div class="col-4">
{% include cards/stats-1.html number=17 title="مغلق اليوم" percentage=-3 %}
</div>
<div class="col-4">
{% include cards/stats-1.html number="27.3K" title="متابعون" percentage=2 %}
</div>
<div class="col-12">
{% include cards/twitter.html %}
</div>
</div>
</div>
</div>
</div>

0 comments on commit e7f0b01

Please sign in to comment.