Skip to content

Commit 706206e

Browse files
Merge pull request vuejs#7 from vuejs-ar/3imed-jaberi-RTL-support
Add RTL support ..
2 parents c3023fb + 6ac0791 commit 706206e

File tree

14 files changed

+89
-45
lines changed

14 files changed

+89
-45
lines changed

themes/vue/layout/partials/header.ejs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<div id="header">
2+
<ul id="nav">
3+
<%- partial('partials/main_menu', { context: 'nav' }) %>
4+
</ul>
25
<a id="logo" href="<%- url_for("/") %>">
36
<img src="<%- url_for("/images/logo.png") %>" alt="vue logo">
47
<span>Vue.js</span>
58
</a>
6-
<ul id="nav">
7-
<%- partial('partials/main_menu', { context: 'nav' }) %>
8-
</ul>
99
</div>
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
<li>
2-
<form id="search-form">
3-
<input type="text" id="search-query-<%- context %>" class="search-query st-default-search-input">
4-
</form>
5-
</li>
1+
62
<%- partial('partials/learn_dropdown') %>
73
<%- partial('partials/ecosystem_dropdown') %>
84
<li>
95
<a href="<%- url_for("/v2/guide/team.html") %>" class="nav-link team<%- page.path.match(/team\.html/) ? ' current' : '' %>">Team</a>
106
</li>
117
<%- partial('partials/support_vue_dropdown') %>
128
<%- partial('partials/language_dropdown') %>
9+
10+
<li>
11+
<form id="search-form">
12+
<input type="text" id="search-query-<%- context %>" class="search-query st-default-search-input">
13+
</form>
14+
</li>

themes/vue/source/css/_ad.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
position: fixed
66
z-index: 99
77
bottom: 10px
8-
right: 10px
8+
left: 10px
99
padding: 10px
1010
background-color: #fff
1111
border-radius: 3px

themes/vue/source/css/_common.styl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ code
4141
margin: 0 2px
4242
border-radius: 2px
4343
white-space: nowrap
44+
text-align: left
45+
direction: ltr
4446

4547
em
4648
color: $light
@@ -63,7 +65,7 @@ input.button
6365
text-indent: 1.4em;
6466
> svg
6567
position: absolute
66-
left: 0.4em
68+
right: 0.4em
6769
top: 0.4em
6870
width: 2em
6971
&.white
@@ -79,7 +81,9 @@ input.button
7981
z-index: 1
8082
padding: 0 60px 30px
8183
overflow-x: hidden
82-
84+
text-align: right
85+
direction: rtl
86+
8387
#nav
8488
.nav-link
8589
cursor: pointer
@@ -101,7 +105,7 @@ input.button
101105
overflow-y: auto
102106
position: absolute
103107
top: 100%
104-
right: -15px
108+
left: -20px
105109
background-color: #fff
106110
padding: 10px 0
107111
border: 1px solid #ddd

themes/vue/source/css/_demo.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
-ms-user-select: none
1010
user-select: none
1111
overflow-x: auto
12+
&.ltr
13+
text-align: left
14+
direction: ltr
1215
h1
1316
margin: 0 0 .5em
1417
font-size: 1.8em

themes/vue/source/css/_header.styl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ body.docs
3030
margin: 0
3131
padding: 0
3232
position: absolute
33-
right: 30px
33+
left: 80px
3434
top: $heading-padding-vertical
3535
height: $header-height
3636
line-height: $header-height
@@ -42,6 +42,7 @@ body.docs
4242
margin: 0 .6em
4343

4444
.nav-dropdown
45+
text-align: right
4546
.nav-link
4647
&:hover, &.current
4748
border-bottom: none
@@ -93,7 +94,7 @@ body.docs
9394
color: $dark
9495
outline: none
9596
border-radius: 15px
96-
margin-right: 10px
97+
margin-left: 10%
9798
transition: border-color .2s ease
9899
background: #fff url(../images/search.png) 8px 5px no-repeat
99100
background-size: 20px
@@ -108,9 +109,11 @@ body.docs
108109
color: $dark
109110
font-family: $logo-font
110111
font-weight: 500
112+
position: absolute
113+
left: 89%
111114
img
112115
vertical-align: middle
113-
margin-right: 6px
116+
margin-left: 6px
114117
width: $header-height
115118
height: $header-height
116119

themes/vue/source/css/_scrimba.styl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
a
88
color #486491 !important
99
position relative
10-
padding-left 36px
10+
padding-right 36px
11+
display block
12+
font-weight normal !important
13+
line-height 25px
1114
&:before
1215
content ''
1316
position absolute
1417
display block
1518
width 30px
1619
height 30px
1720
top -5px
18-
left -4px
21+
right -4px
1922
border-radius 50%
2023
background-color #73abfe
2124
&:after
@@ -25,7 +28,7 @@
2528
width 0
2629
height 0
2730
top 5px
28-
left 8px
31+
right 6px
2932
border-top 5px solid transparent
3033
border-bottom 5px solid transparent
3134
border-left 8px solid #fff

themes/vue/source/css/_sidebar.styl

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
.sidebar
44
position: absolute
5+
direction: ltr
6+
border-left: solid 1px #eee
57
z-index: 10
68
top: $header-height
7-
left: 0
9+
right: 0
810
bottom: 0
911
overflow-x: hidden
1012
overflow-y: auto
@@ -20,13 +22,15 @@
2022
li
2123
margin-top: .5em
2224
.sidebar-inner
25+
direction rtl
2326
width: 260px
24-
padding: $content-padding-top + 40px 0px 60px 20px
27+
padding: $content-padding-top + 40px 20px 60px 0px
2528
.version-select
2629
vertical-align: middle
2730
margin-left: 5px
2831
.menu-root
2932
padding-left: 0
33+
padding-inline-start: 0
3034
.sidebar-link
3135
color: $light
3236
&.current
@@ -63,19 +67,21 @@
6367
margin: 0
6468

6569
@media screen and (max-width: 900px)
70+
#ad
71+
display: none
6672
.sidebar
6773
position: fixed
6874
z-index: 10
6975
background-color: #f9f9f9
7076
height: 100%
7177
top: 0
72-
left: 0
78+
right: 0
7379
box-shadow: 0 0 10px rgba(0,0,0,.2)
7480
transition: all .4s cubic-bezier(0.4, 0, 0, 1)
75-
-webkit-transform: translate(-280px, 0)
76-
transform: translate(-280px, 0)
81+
-webkit-transform: translate(280px, 0)
82+
transform: translate(280px, 0)
7783
.sidebar-inner
78-
padding: 50px 10px 10px 20px
84+
padding: 10px 10px 10px 20px
7985
box-sizing: border-box
8086
.sidebar-inner-index
8187
padding: 10px 10px 10px 20px
@@ -87,6 +93,11 @@
8793
&.open
8894
-webkit-transform: translate(0, 0)
8995
transform: translate(0, 0)
96+
padding-inline-start: 10px
97+
ul
98+
padding-inline-start: 10px
99+
div.list
100+
display: none
90101

91102
@media print
92103
.sidebar

themes/vue/source/css/_sponsors-index.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#sponsors
2+
direction: rtl
23
text-align: center
34
padding: 35px 40px 45px
45
background-color: #f6f6f6

themes/vue/source/css/_sponsors-sidebar.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
position fixed
3737
z-index 99
3838
top 90px
39-
right 20px
39+
left 20px
4040

4141
@media screen and (min-width: 1300px)
4242
#sidebar-sponsors-platinum-left

themes/vue/source/css/_syntax.styl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ pre code
1212
display: block
1313

1414
.hljs
15+
&-comment
16+
display inline-block
17+
direction rtl
18+
1519
&-tag,
1620
&-tag &-title,
1721
&-change,

themes/vue/source/css/_vue-mastery.styl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@
88
a
99
color #486491 !important
1010
position relative
11-
padding-left 36px
11+
padding-right 36px
12+
display block
13+
font-weight normal !important
14+
line-height 25px
1215
&:before
1316
content ''
1417
position absolute
1518
display block
1619
width 30px
1720
height 30px
1821
top -5px
19-
left -4px
22+
right -4px
2023
border-radius 50%
2124
background-color #73abfe
2225
&:after
@@ -26,7 +29,7 @@
2629
width 0
2730
height 0
2831
top 5px
29-
left 8px
32+
right 6px
3033
border-top 5px solid transparent
3134
border-bottom 5px solid transparent
32-
border-left 8px solid #fff
35+
border-left 8px solid #fff

themes/vue/source/css/index.styl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ body
2929

3030
#hero,
3131
#news
32+
direction: rtl
3233
padding: $space 40px 30px
3334
background-color: #fff
3435
.inner
@@ -44,12 +45,13 @@ body
4445
.hero-logo
4546
width: 215px
4647
height: 215px
47-
float: right
48-
margin-right: 60px
48+
float: left
49+
margin-left: 60px
4950
h1
50-
font-weight: 300
51+
font-weight: 200
5152
margin: 0
52-
font-size: 3.2em
53+
font-size: 2.5em
54+
line-height: 2em
5355
h2
5456
font-family: $logo-font
5557
font-weight: 500
@@ -88,7 +90,7 @@ body
8890
.newsletter-input
8991
width: 100%
9092
box-sizing: border-box
91-
padding: 10px 80px 10px 20px
93+
padding: 10px 20px 10px 80px
9294
height: 50px
9395
border-radius: 50px
9496
border: 1px solid #ccc
@@ -101,7 +103,7 @@ body
101103
padding: 4px 20px
102104
margin: 0
103105
height: calc(100% - 8px)
104-
right: 4px
106+
left: 4px
105107
top: 4px
106108

107109
#special-sponsor
@@ -121,6 +123,7 @@ body
121123
#highlights
122124
background-color: #fff
123125
padding-bottom: 70px
126+
direction: rtl
124127
.inner
125128
max-width: $width
126129
margin: 0 auto
@@ -144,6 +147,7 @@ body
144147
padding: $space 0
145148
color: #fff
146149
text-align: center
150+
direction: rtl
147151
.social-icon
148152
margin 0 5px
149153
svg

0 commit comments

Comments
 (0)