1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > LTR vs RTL Comparison</ title >
7+ < link rel ="stylesheet " href ="../../../src/quantecon_book_theme/theme/quantecon_book_theme/static/styles/quantecon-book-theme.css ">
8+ < style >
9+ .comparison {
10+ display : flex;
11+ gap : 20px ;
12+ margin : 20px ;
13+ }
14+ .test-section {
15+ flex : 1 ;
16+ border : 2px solid # ccc ;
17+ padding : 20px ;
18+ background : # f9f9f9 ;
19+ }
20+ .test-section h3 {
21+ margin-top : 0 ;
22+ color : # 0072bc ;
23+ text-align : center;
24+ }
25+ body {
26+ margin : 0 ;
27+ padding : 0 ;
28+ }
29+ </ style >
30+ </ head >
31+ < body >
32+ < h1 style ="text-align: center; margin: 20px; "> QuantEcon Book Theme: LTR vs RTL Comparison</ h1 >
33+
34+ < div class ="comparison ">
35+ <!-- LTR Section -->
36+ < div class ="test-section ">
37+ < h3 > LTR Mode (Default)</ h3 >
38+ < div class ="qe-wrapper ">
39+ < div class ="qe-main ">
40+ < div class ="qe-page ">
41+ < div class ="qe-page__header ">
42+ < div class ="qe-page__header-copy ">
43+ < p class ="qe-page__header-heading "> English Book</ p >
44+ < p class ="qe-page__header-subheading "> Testing Left-to-Right Layout</ p >
45+ </ div >
46+ </ div >
47+
48+ < div class ="qe-page__content ">
49+ < h2 > English Content</ h2 >
50+ < p > This is a test of normal left-to-right text flow. The sidebar should be on the left, and text should align to the left.</ p >
51+
52+ < blockquote >
53+ < p > This is a blockquote in English. The border should be on the left side.</ p >
54+ </ blockquote >
55+
56+ < pre > < code > def example():
57+ return "Hello World"</ code > </ pre >
58+ </ div >
59+ </ div >
60+
61+ < div class ="qe-sidebar ">
62+ < div class ="qe-sidebar__header "> Contents</ div >
63+ < nav class ="qe-sidebar__nav ">
64+ < ul >
65+ < li > < a href ="#section1 "> Section 1</ a > </ li >
66+ < li > < a href ="#section2 "> Section 2</ a > </ li >
67+ </ ul >
68+ </ nav >
69+ </ div >
70+ </ div >
71+
72+ < div class ="qe-toolbar ">
73+ < div class ="qe-toolbar__inner ">
74+ < ul >
75+ < li > < a href ="# "> Home</ a > </ li >
76+ < li > < a href ="# "> Search</ a > </ li >
77+ </ ul >
78+ < ul >
79+ < li > < a href ="# "> Download</ a > </ li >
80+ < li > < a href ="# "> Share</ a > </ li >
81+ </ ul >
82+ </ div >
83+ </ div >
84+ </ div >
85+ </ div >
86+
87+ <!-- RTL Section -->
88+ < div class ="test-section " dir ="rtl ">
89+ < h3 > RTL Mode (script_right_to_left = True)</ h3 >
90+ < div class ="qe-wrapper ">
91+ < div class ="qe-main ">
92+ < div class ="qe-page ">
93+ < div class ="qe-page__header ">
94+ < div class ="qe-page__header-copy ">
95+ < p class ="qe-page__header-heading "> كتاب عربي</ p >
96+ < p class ="qe-page__header-subheading "> اختبار تخطيط من اليمين إلى اليسار</ p >
97+ </ div >
98+ </ div >
99+
100+ < div class ="qe-page__content ">
101+ < h2 > محتوى عربي</ h2 >
102+ < p > هذا اختبار لتدفق النص الطبيعي من اليمين إلى اليسار. يجب أن يكون الشريط الجانبي على اليمين، ويجب أن يكون النص محاذاة إلى اليمين.</ p >
103+
104+ < blockquote >
105+ < p > هذا اقتباس باللغة العربية. يجب أن تكون الحدود على الجانب الأيمن.</ p >
106+ </ blockquote >
107+
108+ < pre > < code > def example():
109+ return "مرحبا بالعالم"</ code > </ pre >
110+ </ div >
111+ </ div >
112+
113+ < div class ="qe-sidebar ">
114+ < div class ="qe-sidebar__header "> المحتويات</ div >
115+ < nav class ="qe-sidebar__nav ">
116+ < ul >
117+ < li > < a href ="#section1 "> القسم 1</ a > </ li >
118+ < li > < a href ="#section2 "> القسم 2</ a > </ li >
119+ </ ul >
120+ </ nav >
121+ </ div >
122+ </ div >
123+
124+ < div class ="qe-toolbar ">
125+ < div class ="qe-toolbar__inner ">
126+ < ul >
127+ < li > < a href ="# "> الرئيسية</ a > </ li >
128+ < li > < a href ="# "> البحث</ a > </ li >
129+ </ ul >
130+ < ul >
131+ < li > < a href ="# "> تنزيل</ a > </ li >
132+ < li > < a href ="# "> مشاركة</ a > </ li >
133+ </ ul >
134+ </ div >
135+ </ div >
136+ </ div >
137+ </ div >
138+ </ div >
139+
140+ < div style ="margin: 20px; padding: 20px; background: #e8f4f8; border-radius: 8px; ">
141+ < h3 > Key Differences to Note:</ h3 >
142+ < ul >
143+ < li > < strong > Text Direction:</ strong > LTR flows left-to-right, RTL flows right-to-left</ li >
144+ < li > < strong > Sidebar Position:</ strong > LTR has sidebar on left, RTL has sidebar on right</ li >
145+ < li > < strong > Blockquote Borders:</ strong > LTR has left border, RTL has right border</ li >
146+ < li > < strong > Code Blocks:</ strong > Remain LTR in both modes for better readability</ li >
147+ < li > < strong > Navigation:</ strong > Toolbar elements are reversed in RTL mode</ li >
148+ </ ul >
149+ </ div >
150+ </ body >
151+ </ html >
0 commit comments