aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfr33domlover <fr33domlover@web>2014-07-11 08:25:31 -0400
committeradmin <admin@branchable.com>2014-07-11 08:25:31 -0400
commit2eda4b2cd73f1dd35da04618eac277895ffd0f31 (patch)
tree104cfb24286e2b95a743518681b83671c854d50f
parent799b2b53a15aee986a21fa473cac53170a618c4a (diff)
downloadikiwiki-2eda4b2cd73f1dd35da04618eac277895ffd0f31.tar
ikiwiki-2eda4b2cd73f1dd35da04618eac277895ffd0f31.tar.gz
Write a tip about RTL pages
-rw-r--r--doc/tips/Right-to-left___40__RTL__41___page_text.mdwn49
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/tips/Right-to-left___40__RTL__41___page_text.mdwn b/doc/tips/Right-to-left___40__RTL__41___page_text.mdwn
new file mode 100644
index 000000000..2b176c811
--- /dev/null
+++ b/doc/tips/Right-to-left___40__RTL__41___page_text.mdwn
@@ -0,0 +1,49 @@
+Here's a simple way to create pages in which the page body (or a part of it) goes right-to-left.
+This includes things you insert into the page, such as polls and blockquotes and
+lists and a progress bar and so on. Some things don't work perfectly, but if
+you want to have some RTL pages in your wiki, this will probably do.
+
+It does not modify the things around the body, such as the page header and the
+footer. Only what is rendered from the mdwn file is affected.
+
+# 1 Add an RTL Template
+
+Create a new template page *templates/rtl.mdwn* with the following content:
+
+ <div class="rtl">
+ <TMPL_VAR text>
+ </div>
+ <TMPL_UNLESS text>
+ Use this template to insert RTL text into a page.
+ This template has one parameter:
+ <ul>
+ <li>`text` - the text to display in RTL
+ </ul>
+ </TMPL_UNLESS>
+
+# 2 Add an RTL class to the CSS
+
+In your *local.css* add the following:
+
+[[!format css """
+/* rtl template */
+.rtl {
+ direction: rtl;
+}
+"""]]
+
+# 3 Use the Template
+
+To make a page or part of it RTL, use the [[ikiwiki/directive/template]] directive:
+
+ \[[!template id="rtl" text="""
+
+ This text will be aligned to the right. You can write here in Hebrew, Arabic, etc. You can
+ put here anything you want to put on the page. As said above, some elements may not
+ align perfectly, but:
+
+ 1. It can be solved per case
+ 2. It's not critical, everything works quite well and is readable. If you have any comments,
+ suggestions, improvements, bugs, etc - please share here :-)
+
+ """]]