Skip to content

Commit

Permalink
add rtl support
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadYounes committed Feb 2, 2018
1 parent 8a628b9 commit 9510716
Show file tree
Hide file tree
Showing 98 changed files with 12,648 additions and 229 deletions.
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
getbootstrap.com
bootstrap.rtlcss.com
22 changes: 12 additions & 10 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ destination: ./_gh_pages
host: 0.0.0.0
port: 9001
baseurl: ""
url: "https://getbootstrap.com"
url: "https://bootstrap.rtlcss.com"
encoding: UTF-8
exclude:
- .git/
Expand Down Expand Up @@ -43,9 +43,9 @@ plugins:
- jekyll-toc

# Social
title: Bootstrap
description: "The most popular HTML, CSS, and JS library in the world."
twitter: getbootstrap
title: Bootstrap 4 RTL
description: "The most popular HTML, CSS, and JS library in the world made right-to-left."
twitter: rtlcss
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
social_image_path: /assets/brand/bootstrap-social.png
social_logo_path: /assets/brand/bootstrap-social-logo.png
Expand All @@ -54,23 +54,25 @@ social_logo_path: /assets/brand/bootstrap-social-logo.png
current_version: 4.0.0
current_ruby_version: 4.0.0
docs_version: 4.0
repo: "https://github.com/twbs/bootstrap"
repo: "https://github.com/RTLCSS/bootstrap"
slack: "https://bootstrap-slack.herokuapp.com"
blog: "https://blog.getbootstrap.com"
expo: "https://expo.getbootstrap.com"
jobs: "https://jobs.getbootstrap.com"
themes: "https://themes.getbootstrap.com"

download:
source: "https://github.com/twbs/bootstrap/archive/v4.0.0.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v4.0.0/bootstrap-4.0.0-dist.zip"
source: "https://github.com/RTLCSS/bootstrap/archive/v4.0.0.zip"
dist: "https://github.com/RTLCSS/bootstrap/releases/download/v4.0.0/bootstrap-4.0.0-dist.zip"

cdn:
# See https://www.srihash.org for info on how to generate the hashes
rtlcss: "https://cdn.rtlcss.com/bootstrap/v4.0.0/css/bootstrap.min.css"
rtlcss_hash: "sha384-P4uhUIGk/q1gaD/NdgkBIl3a6QywJjlsFJFk7SPRdruoGddvRVSwv5qFnvZ73cpz"
css: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
css_hash: "sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
js: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
js_hash: "sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
css_hash: "sha384-WOekEFi+C4CJUQcdTKSQhnT55t5NeJtSJWpannIQIu/E1p2wK1mQDZJf7jyGzEbQ"
js: "https://cdn.rtlcss.com/bootstrap/v4.0.0/js/bootstrap.min.js"
js_hash: "sha384-54+cucJ4QbVb99v8dcttx/0JRx4FHMmhOWi4W+xrXpKcsKQodCBwAvu3xxkZAwsH"
jquery: "https://code.jquery.com/jquery-3.2.1.slim.min.js"
jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
Expand Down
2 changes: 1 addition & 1 deletion _includes/ads.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script async src="https://cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=getbootstrapcom" id="_carbonads_js"></script>
<script async src="https://cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=rtlcsscom" id="_carbonads_js"></script>
12 changes: 7 additions & 5 deletions _includes/docs-navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<li class="nav-item">
<a class="nav-link {% if page.title == "Examples" %}active{% endif %}" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Examples');">Examples</a>
</li>
<!--
<li class="nav-item">
<a class="nav-link" href="{{ site.themes }}" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Themes');" target="_blank" rel="noopener">Themes</a>
</li>
Expand All @@ -26,6 +27,7 @@
<li class="nav-item">
<a class="nav-link" href="{{ site.blog }}" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Blog');" target="_blank" rel="noopener">Blog</a>
</li>
-->
</ul>
</div>

Expand All @@ -36,9 +38,9 @@
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-versions">
<a class="dropdown-item active" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/">Latest (4.x)</a>
<a class="dropdown-item" href="https://v4-alpha.getbootstrap.com/">v4 Alpha 6</a>
<a class="dropdown-item" href="https://getbootstrap.com/docs/3.3/">v3.3.7</a>
<a class="dropdown-item" href="https://getbootstrap.com/2.3.2/">v2.3.2</a>
<!-- <a class="dropdown-item" href="https://v4-alpha.getbootstrap.com/">v4 Alpha 6</a> -->
<a class="dropdown-item" href="http://bootstrap.rtlcss.com/docs/3.3/">v3.3.7</a>
<!-- <a class="dropdown-item" href="https://getbootstrap.com/2.3.2/">v2.3.2</a> -->
</div>
</li>

Expand All @@ -52,11 +54,11 @@
{%- include icons/twitter.svg class="navbar-nav-svg" -%}
</a>
</li>
<li class="nav-item">
<!-- <li class="nav-item">
<a class="nav-link p-2" href="{{ site.slack }}" target="_blank" rel="noopener" aria-label="Slack">
{%- include icons/slack.svg class="navbar-nav-svg" -%}
</a>
</li>
</li> -->
</ul>

<a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3" href="{{ site.download.source }}">Download</a>
Expand Down
3 changes: 2 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<li><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/">Examples</a></li>
<li><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/about/overview/">About</a></li>
</ul>
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank" rel="noopener">@mdo</a> and <a href="https://twitter.com/fat" target="_blank" rel="noopener">@fat</a>. Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
<p>This documentation is an adaptation made by <a href="https://github.com/MohammadYounes" target="_blank" rel="noopener">Mohammad Younes</a></p>
<p>Original version designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank" rel="noopener">@mdo</a> and <a href="https://twitter.com/fat" target="_blank" rel="noopener">@fat</a>. Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
<p>Currently v{{ site.current_version }}. Code licensed <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank" rel="license noopener">MIT</a>, docs <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="license noopener">CC BY 3.0</a>.</p>
</div>
</footer>
6 changes: 3 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

<!-- Bootstrap core CSS -->
{% if site.github %}
<link href="{{ site.baseurl }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
<link href="{{ site.baseurl }}/dist/css/rtl/bootstrap.min.css" rel="stylesheet" integrity="{{ site.cdn.rtlcss_hash }}" crossorigin="anonymous">
{% else %}
<link href="{{ site.baseurl }}/dist/css/bootstrap.css" rel="stylesheet">
<link href="{{ site.baseurl }}/dist/css/rtl/bootstrap.css" rel="stylesheet">
{% endif %}

<!-- Documentation extras -->
Expand All @@ -34,6 +34,6 @@
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-146052-10', 'getbootstrap.com');
ga('create', 'UA-80003507-1', 'rtlcss.com');
ga('send', 'pageview');
</script>
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" dir="rtl">
<head>
{% include header.html %}
</head>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/docs.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" dir="rtl">
<head>
{% include header.html %}
</head>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" dir="rtl">
<head>
{% include header.html %}
</head>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/redirect.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Expand Down
2 changes: 1 addition & 1 deletion assets/css/docs.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/docs.min.css.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions assets/css/docs.rtl.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/scss/_clipboard-js.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.bd-clipboard {
position: relative;
display: none;
float: right;
float: right #{"/*!rtl:ignore*/"};

+ .highlight {
margin-top: 0;
Expand All @@ -15,7 +15,7 @@
.btn-clipboard {
position: absolute;
top: .5rem;
right: .5rem;
right: .5rem #{"/*!rtl:ignore*/"};
z-index: 10;
display: block;
padding: .25rem .5rem;
Expand Down
2 changes: 2 additions & 0 deletions assets/scss/_component-examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,11 @@
//

.highlight {
direction: ltr#{"/*!rtl:ignore*/"};
padding: 1rem;
margin-top: 1rem;
margin-bottom: 1rem;
text-align: left#{"/*!rtl:ignore*/"};
background-color: #f7f7f9;
-ms-overflow-style: -ms-autohiding-scrollbar;

Expand Down
2 changes: 2 additions & 0 deletions assets/scss/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
> h2[id],
> h3[id],
> h4[id] {
direction: ltr #{"/*!rtl:ignore*/"};
unicode-bidi: bidi-override;
pointer-events: none;

> div,
Expand Down
4 changes: 4 additions & 0 deletions build/generate-sri.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const configFile = path.join(__dirname, '../_config.yml')
// `file` is the path from the root folder
// `configPropertyName` is the _config.yml variable's name of the file
const files = [
{
file: 'dist/css/rtl/bootstrap.min.css',
configPropertyName: 'rtlcss_hash'
},
{
file: 'dist/css/bootstrap.min.css',
configPropertyName: 'css_hash'
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap-grid.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap-reboot.min.css.map

Large diffs are not rendered by default.

58 changes: 30 additions & 28 deletions dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit 9510716

Please sign in to comment.