WIP - initial RTL support #575 (#577)

* initial RTL support

* fix dir in template-util

* fix dir in blogs new

* fix dir in blogs details

* fix dir in posts new

* fix dir in posts details

* fix dir in posts remote

* Fix dir in partials

some parts should be recheck carefully in real usage
This commit is contained in:
Mostafa Ahangarha
2019-07-11 12:04:27 +04:30
committed by Igor Galić
parent c031804464
commit 54c6d21fc5
34 changed files with 10381 additions and 11037 deletions
+10 -10
View File
@@ -28,8 +28,8 @@
@if article.cover_id.is_some() { style="background-image: url('@article.cover_url(ctx.0).unwrap_or_default()'" }
>
<div>
<h1 class="article p-name">@article.title</h1>
<div class="article-info">
<h1 class="article p-name" dir="auto">@article.title</h1>
<div class="article-info" dir="auto">
<span class="author">
@Html(i18n!(ctx.1, "Written by {0}"; format!("<a href=\"{}\">{}</a>",
uri!(user::details: name = &author.fqn),
@@ -38,7 +38,7 @@
&mdash;
<span class="date dt-published" datetime="@article.creation_date.format("%F %T")">@article.creation_date.format("%B %e, %Y")</span><a class="u-url" href="@article.ap_url"></a>
</div>
<h2 class="article p-summary">@article.subtitle</h2>
<h2 class="article p-summary" dir="auto">@article.subtitle</h2>
</div>
@if article.cover_id.is_some() {
<div class="shadow"></div>
@@ -46,12 +46,12 @@
}
</header>
<article class="e-content">
<article class="e-content" dir="auto">
@Html(&article.content)
</article>
<div class="article-meta">
<section class="split">
<ul class="tags">
<ul class="tags" dir="auto">
@for tag in tags {
@if !tag.is_hashtag {
<li><a class="p-category" href="@uri!(tags::tag: name = &tag.tag, page = _)">@tag.tag</a></li>
@@ -60,7 +60,7 @@
}
}
</ul>
<p class="right">
<p class="right" dir="auto">
@if article.license.is_empty() {
@i18n!(ctx.1, "All rights reserved."; &article.license)
} else {
@@ -116,7 +116,7 @@
</section>
}
<section class="banner">
<div class="flex p-author h-card user">
<div class="flex p-author h-card user" dir="auto">
@avatar(ctx.0, &author, Size::Medium, true, ctx.1)
<div class="grow">
<h2 class="p-name">
@@ -132,7 +132,7 @@
}
</div>
</section>
<section class="comments">
<section class="comments" dir="auto">
<h2>@i18n!(ctx.1, "Comments")</h2>
@if ctx.2.is_some() {
@@ -143,7 +143,7 @@
@if let Some(ref prev) = previous_comment {
<input type="hidden" name="responding_to" value="@prev.id"/>
}
<textarea id="plume-editor" name="content">@comment_form.content</textarea>
<textarea id="plume-editor" name="content" dir="auto">@comment_form.content</textarea>
<input type="submit" value="@i18n!(ctx.1, "Submit comment")" />
</form>
}
@@ -153,7 +153,7 @@
@:comment(ctx, &comm, Some(&article.ap_url), &blog.fqn, &article.slug)
}
} else {
<p class="center">@i18n!(ctx.1, "No comments yet. Be the first to react!")</p>
<p class="center" dir="auto">@i18n!(ctx.1, "No comments yet. Be the first to react!")</p>
}
</section>
</div>