forked from hasenj/bidiweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
81 lines (73 loc) · 2.66 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html>
<head>
<title>autobidi test</title>
<script type="text/javascript" src="bidiweb.build.js"> </script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
bidiweb.process_css('.content > *', {rtl: 'rtl', ltr: 'ltr'});
bidiweb.process_style(".direct");
});
</script>
<style type="text/css">
@import url(http://fonts.googleapis.com/earlyaccess/amiri.css);
@import url(http://fonts.googleapis.com/earlyaccess/droidarabickufi.css);
/* @import url(http://fonts.googleapis.com/earlyaccess/droidarabicnaskh.css); */
h1 {
font-family: Amiri, Georgia;
color: #333;
padding: 6px 12px;
border-radius: 6px;
font-size: 24pt;
}
p, .p {
background-color: hsl(120, 50%, 90%);
color: #333;
padding: 6px 12px;
border-radius: 6px;
font-family: 'Droid Arabic Kufi', sans-serif;
}
div {
width: 500px;
margin: 20px auto;
border: 1px solid silver;
padding: 12px 20px;
}
.ltr {
text-align: left;
direction: ltr;
background-color: hsl(0, 50%, 90%);
}
.rtl {
text-align: right;
direction: rtl;
background-color: hsl(200, 50%, 90%);
}
</style>
</head>
<body>
<div class="content">
<h1> Heading </h1>
<h1> عنوان </h1>
</div>
<div class="content">
<p> This is an english paragraph </p>
<p> هذه فقرة عربية </p>
<p> git هو نظام سورس كونترول. لاحظ ان هذه فقرة عربية مع انها تبدأ بكلمة انكليزية</p>
<p> ع is a letter that doesn't exist in english. Note how this is an english paragraph even though it starts with an arabic letter </p>
<p>זהו טקסט לדוגמה עברית</p>
</div>
<div>
<p class="direct">معالجة عنصر مباشرة</p>
<p class="direct">inline style processing</p>
</div>
<span style="direction: rtl">
<div class="content">
<p>هذا الجزء من اليمين الى اليسار باي ديفولت</p>
<p>By default, this container is RTL</p>
<p>これは日本語の文です。</p>
<p>이것은 한국의 문장입니다.</p>
</div>
</span>
</body>
</html>