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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -73,11 +73,11 @@ msgid "Your blog information have been updated."
msgstr ""
# src/routes/comments.rs:97
msgid "Your comment has been posted."
msgid "Your comment have been posted."
msgstr ""
# src/routes/comments.rs:172
msgid "Your comment has been deleted."
msgid "Your comment have been deleted."
msgstr ""
# src/routes/instance.rs:134
@ -109,7 +109,7 @@ msgid "You are not allowed to delete this media."
msgstr ""
# src/routes/medias.rs:163
msgid "Your avatar has been updated."
msgid "Your avatar have been updated."
msgstr ""
# src/routes/medias.rs:168
@ -145,15 +145,11 @@ msgid "You are not allowed to publish on this blog."
msgstr ""
# src/routes/posts.rs:350
msgid "Your article has been updated."
msgid "Your article have been updated."
msgstr ""
# src/routes/posts.rs:532
msgid "Your article has been saved."
msgstr ""
# src/routes/posts.rs:538
msgid "New article"
msgid "Your post have been saved."
msgstr ""
# src/routes/posts.rs:572
@ -161,7 +157,7 @@ msgid "You are not allowed to delete this article."
msgstr ""
# src/routes/posts.rs:597
msgid "Your article has been deleted."
msgid "Your article have been deleted."
msgstr ""
# src/routes/posts.rs:602
@ -212,152 +208,328 @@ msgstr ""
msgid "You are now following {}."
msgstr ""
# src/routes/user.rs:254
# src/routes/user.rs:255
msgid "To subscribe to someone, you need to be logged in"
msgstr ""
# src/routes/user.rs:356
# src/routes/user.rs:357
msgid "To edit your profile, you need to be logged in"
msgstr ""
# src/routes/user.rs:398
msgid "Your profile has been updated."
# src/routes/user.rs:399
msgid "Your profile have been updated."
msgstr ""
# src/routes/user.rs:425
msgid "Your account has been deleted."
# src/routes/user.rs:426
msgid "Your account have been deleted."
msgstr ""
# src/routes/user.rs:431
# src/routes/user.rs:432
msgid "You can't delete someone else's account."
msgstr ""
# src/routes/user.rs:503
# src/routes/user.rs:504
msgid "Registrations are closed on this instance."
msgstr ""
# src/routes/user.rs:527
msgid "Your account has been created. Now you just need to log in, before you can use it."
# src/routes/user.rs:528
msgid "Your account have been created. You just need to login before you can use it."
msgstr ""
msgid "Internal server error"
msgid "Plume"
msgstr ""
msgid "Something broke on our side."
msgid "Menu"
msgstr ""
msgid "Sorry about that. If you think this is a bug, please report it."
msgid "Search"
msgstr ""
msgid "You are not authorized."
msgid "Dashboard"
msgstr ""
msgid "Page not found"
msgid "Notifications"
msgstr ""
msgid "We couldn't find this page."
msgid "Log Out"
msgstr ""
msgid "The link that led you here may be broken."
msgid "My account"
msgstr ""
msgid "The content you sent can't be processed."
msgid "Log In"
msgstr ""
msgid "Maybe it was too long."
msgid "Register"
msgstr ""
msgid "Invalid CSRF token"
msgid "About this instance"
msgstr ""
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
msgid "Source code"
msgstr ""
msgid "Articles tagged \"{0}\""
msgid "Matrix room"
msgstr ""
msgid "There are currently no articles with such a tag"
msgid "Administration"
msgstr ""
msgid "New Blog"
msgid "Welcome to {}"
msgstr ""
msgid "Create a blog"
msgid "Latest articles"
msgstr ""
msgid "Your feed"
msgstr ""
msgid "Federated feed"
msgstr ""
msgid "Local feed"
msgstr ""
msgid "Administration of {0}"
msgstr ""
msgid "Instances"
msgstr ""
msgid "Configuration"
msgstr ""
msgid "Users"
msgstr ""
msgid "Unblock"
msgstr ""
msgid "Block"
msgstr ""
msgid "Ban"
msgstr ""
msgid "All the articles of the Fediverse"
msgstr ""
msgid "Articles from {}"
msgstr ""
msgid "Nothing to see here yet. Try subscribing to more people."
msgstr ""
# src/template_utils.rs:251
msgid "Title"
msgid "Name"
msgstr ""
# src/template_utils.rs:254
msgid "Optional"
msgstr ""
msgid "Create blog"
msgid "Allow anyone to register here"
msgstr ""
msgid "Edit \"{}\""
msgstr ""
msgid "Description"
msgid "Short description"
msgstr ""
msgid "Markdown syntax is supported"
msgstr ""
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
msgid "Long description"
msgstr ""
msgid "Upload images"
# src/template_utils.rs:251
msgid "Default article license"
msgstr ""
msgid "Blog icon"
msgid "Save these settings"
msgstr ""
msgid "Blog banner"
msgid "About {0}"
msgstr ""
msgid "Update blog"
msgid "Home to <em>{0}</em> people"
msgstr ""
msgid "Who wrote <em>{0}</em> articles"
msgstr ""
msgid "And are connected to <em>{0}</em> other instances"
msgstr ""
msgid "Administred by"
msgstr ""
msgid "Runs Plume {0}"
msgstr ""
msgid "Follow {}"
msgstr ""
msgid "Log in to follow"
msgstr ""
msgid "Enter your full username handle to follow"
msgstr ""
msgid "Edit your account"
msgstr ""
msgid "Your Profile"
msgstr ""
msgid "To change your avatar, upload it to your gallery and then select from there."
msgstr ""
msgid "Upload an avatar"
msgstr ""
# src/template_utils.rs:251
msgid "Display name"
msgstr ""
# src/template_utils.rs:251
msgid "Email"
msgstr ""
msgid "Summary"
msgstr ""
msgid "Update account"
msgstr ""
msgid "Danger zone"
msgstr ""
msgid "Be very careful, any action taken here can't be reversed."
msgid "Be very careful, any action taken here can't be cancelled."
msgstr ""
msgid "Permanently delete this blog"
msgid "Delete your account"
msgstr ""
msgid "{}'s icon"
msgid "Sorry, but as an admin, you can't leave your own instance."
msgstr ""
msgid "Edit"
msgid "Your Dashboard"
msgstr ""
msgid "There's one author on this blog: "
msgid_plural "There are {0} authors on this blog: "
msgstr[0] ""
msgid "Latest articles"
msgid "Your Blogs"
msgstr ""
msgid "No posts to see here yet."
msgid "You don't have any blog yet. Create your own, or ask to join one."
msgstr ""
msgid "Search result(s) for \"{0}\""
msgid "Start a new blog"
msgstr ""
msgid "Search result(s)"
msgid "Your Drafts"
msgstr ""
msgid "No results for your query"
msgid "Your media"
msgstr ""
msgid "No more results for your query"
msgid "Go to your gallery"
msgstr ""
msgid "Search"
msgid "Create your account"
msgstr ""
msgid "Create an account"
msgstr ""
# src/template_utils.rs:251
msgid "Username"
msgstr ""
# src/template_utils.rs:251
msgid "Password"
msgstr ""
# src/template_utils.rs:251
msgid "Password confirmation"
msgstr ""
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
msgstr ""
msgid "Articles"
msgstr ""
msgid "Subscribers"
msgstr ""
msgid "Subscriptions"
msgstr ""
msgid "Atom feed"
msgstr ""
msgid "Recently boosted"
msgstr ""
msgid "Admin"
msgstr ""
msgid "It is you"
msgstr ""
msgid "Edit your profile"
msgstr ""
msgid "Open on {0}"
msgstr ""
msgid "Unsubscribe"
msgstr ""
msgid "Subscribe"
msgstr ""
msgid "{0}'s subscriptions"
msgstr ""
msgid "{0}'s subscribers"
msgstr ""
msgid "Respond"
msgstr ""
msgid "Are you sure?"
msgstr ""
msgid "Delete this comment"
msgstr ""
msgid "What is Plume?"
msgstr ""
msgid "Plume is a decentralized blogging engine."
msgstr ""
msgid "Authors can manage multiple blogs, each as its own website."
msgstr ""
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
msgstr ""
msgid "Read the detailed rules"
msgstr ""
msgid "None"
msgstr ""
msgid "No description"
msgstr ""
msgid "View all"
msgstr ""
msgid "By {0}"
msgstr ""
msgid "Draft"
msgstr ""
msgid "Your query"
@ -370,6 +542,9 @@ msgstr ""
msgid "Article title matching these words"
msgstr ""
msgid "Title"
msgstr ""
# src/template_utils.rs:339
msgid "Subtitle matching these words"
msgstr ""
@ -434,6 +609,52 @@ msgstr ""
msgid "Article license"
msgstr ""
msgid "Search result(s) for \"{0}\""
msgstr ""
msgid "Search result(s)"
msgstr ""
msgid "No results for your query"
msgstr ""
msgid "No more results for your query"
msgstr ""
msgid "Reset your password"
msgstr ""
# src/template_utils.rs:251
msgid "New password"
msgstr ""
# src/template_utils.rs:251
msgid "Confirmation"
msgstr ""
msgid "Update password"
msgstr ""
msgid "Check your inbox!"
msgstr ""
msgid "We sent a mail to the address you gave us, with a link to reset your password."
msgstr ""
# src/template_utils.rs:251
msgid "E-mail"
msgstr ""
msgid "Send password reset link"
msgstr ""
msgid "Log in"
msgstr ""
# src/template_utils.rs:251
msgid "Username, or email"
msgstr ""
msgid "Interact with {}"
msgstr ""
@ -492,6 +713,12 @@ msgstr ""
msgid "Written by {0}"
msgstr ""
msgid "Edit"
msgstr ""
msgid "Delete this article"
msgstr ""
msgid "All rights reserved."
msgstr ""
@ -521,12 +748,6 @@ msgstr ""
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
msgstr ""
msgid "Unsubscribe"
msgstr ""
msgid "Subscribe"
msgstr ""
msgid "Comments"
msgstr ""
@ -543,16 +764,120 @@ msgstr ""
msgid "No comments yet. Be the first to react!"
msgstr ""
msgid "Are you sure?"
msgid "Invalid CSRF token"
msgstr ""
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
msgstr ""
msgid "Page not found"
msgstr ""
msgid "We couldn't find this page."
msgstr ""
msgid "The link that led you here may be broken."
msgstr ""
msgid "The content you sent can't be processed."
msgstr ""
msgid "Maybe it was too long."
msgstr ""
msgid "You are not authorized."
msgstr ""
msgid "Internal server error"
msgstr ""
msgid "Something broke on our side."
msgstr ""
msgid "Sorry about that. If you think this is a bug, please report it."
msgstr ""
msgid "Edit \"{}\""
msgstr ""
msgid "Description"
msgstr ""
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
msgstr ""
msgid "Upload images"
msgstr ""
msgid "Blog icon"
msgstr ""
msgid "Blog banner"
msgstr ""
msgid "Update blog"
msgstr ""
msgid "Be very careful, any action taken here can't be reversed."
msgstr ""
msgid "Permanently delete this blog"
msgstr ""
msgid "New Blog"
msgstr ""
msgid "Create a blog"
msgstr ""
msgid "Create blog"
msgstr ""
msgid "{}'s icon"
msgstr ""
msgid "New article"
msgstr ""
msgid "There's one author on this blog: "
msgid_plural "There are {0} authors on this blog: "
msgstr[0] ""
msgid "No posts to see here yet."
msgstr ""
msgid "Articles tagged \"{0}\""
msgstr ""
msgid "There are currently no articles with such a tag"
msgstr ""
msgid "I'm from this instance"
msgstr ""
msgid "I'm from another instance"
msgstr ""
# src/template_utils.rs:259
msgid "Example: user@plu.me"
msgstr ""
msgid "Continue to your instance"
msgstr ""
msgid "Upload"
msgstr ""
msgid "You don't have any media yet."
msgstr ""
msgid "Content warning: {0}"
msgstr ""
msgid "Delete"
msgstr ""
msgid "This article is still a draft. Only you and other authors can see it."
msgstr ""
msgid "Only you and other authors can edit this article."
msgid "Details"
msgstr ""
msgid "Media upload"
@ -570,21 +895,6 @@ msgstr ""
msgid "Send"
msgstr ""
msgid "Your media"
msgstr ""
msgid "Upload"
msgstr ""
msgid "You don't have any media yet."
msgstr ""
msgid "Content warning: {0}"
msgstr ""
msgid "Details"
msgstr ""
msgid "Media details"
msgstr ""
@ -599,333 +909,3 @@ msgstr ""
msgid "Use as an avatar"
msgstr ""
msgid "Notifications"
msgstr ""
msgid "Plume"
msgstr ""
msgid "Menu"
msgstr ""
msgid "Dashboard"
msgstr ""
msgid "Log Out"
msgstr ""
msgid "My account"
msgstr ""
msgid "Log In"
msgstr ""
msgid "Register"
msgstr ""
msgid "About this instance"
msgstr ""
msgid "Privacy policy"
msgstr ""
msgid "Administration"
msgstr ""
msgid "Documentation"
msgstr ""
msgid "Source code"
msgstr ""
msgid "Matrix room"
msgstr ""
msgid "Your feed"
msgstr ""
msgid "Federated feed"
msgstr ""
msgid "Local feed"
msgstr ""
msgid "Nothing to see here yet. Try subscribing to more people."
msgstr ""
msgid "Articles from {}"
msgstr ""
msgid "All the articles of the Fediverse"
msgstr ""
msgid "Users"
msgstr ""
msgid "Configuration"
msgstr ""
msgid "Instances"
msgstr ""
msgid "Ban"
msgstr ""
msgid "Administration of {0}"
msgstr ""
# src/template_utils.rs:251
msgid "Name"
msgstr ""
msgid "Allow anyone to register here"
msgstr ""
msgid "Short description"
msgstr ""
msgid "Long description"
msgstr ""
# src/template_utils.rs:251
msgid "Default article license"
msgstr ""
msgid "Save these settings"
msgstr ""
msgid "About {0}"
msgstr ""
msgid "Runs Plume {0}"
msgstr ""
msgid "Home to <em>{0}</em> people"
msgstr ""
msgid "Who wrote <em>{0}</em> articles"
msgstr ""
msgid "And are connected to <em>{0}</em> other instances"
msgstr ""
msgid "Administred by"
msgstr ""
msgid "If you are browsing this site as a visitor, no data about you is collected."
msgstr ""
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
msgstr ""
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
msgstr ""
msgid "Welcome to {}"
msgstr ""
msgid "Unblock"
msgstr ""
msgid "Block"
msgstr ""
msgid "Reset your password"
msgstr ""
# src/template_utils.rs:251
msgid "New password"
msgstr ""
# src/template_utils.rs:251
msgid "Confirmation"
msgstr ""
msgid "Update password"
msgstr ""
msgid "Log in"
msgstr ""
# src/template_utils.rs:251
msgid "Username, or email"
msgstr ""
# src/template_utils.rs:251
msgid "Password"
msgstr ""
# src/template_utils.rs:251
msgid "E-mail"
msgstr ""
msgid "Send password reset link"
msgstr ""
msgid "Check your inbox!"
msgstr ""
msgid "We sent a mail to the address you gave us, with a link to reset your password."
msgstr ""
msgid "Admin"
msgstr ""
msgid "It is you"
msgstr ""
msgid "Edit your profile"
msgstr ""
msgid "Open on {0}"
msgstr ""
msgid "Follow {}"
msgstr ""
msgid "Log in to follow"
msgstr ""
msgid "Enter your full username handle to follow"
msgstr ""
msgid "{0}'s subscriptions"
msgstr ""
msgid "Articles"
msgstr ""
msgid "Subscribers"
msgstr ""
msgid "Subscriptions"
msgstr ""
msgid "Create your account"
msgstr ""
msgid "Create an account"
msgstr ""
# src/template_utils.rs:251
msgid "Username"
msgstr ""
# src/template_utils.rs:251
msgid "Email"
msgstr ""
# src/template_utils.rs:251
msgid "Password confirmation"
msgstr ""
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
msgstr ""
msgid "{0}'s subscribers"
msgstr ""
msgid "Edit your account"
msgstr ""
msgid "Your Profile"
msgstr ""
msgid "To change your avatar, upload it to your gallery and then select from there."
msgstr ""
msgid "Upload an avatar"
msgstr ""
# src/template_utils.rs:251
msgid "Display name"
msgstr ""
msgid "Summary"
msgstr ""
msgid "Update account"
msgstr ""
msgid "Be very careful, any action taken here can't be cancelled."
msgstr ""
msgid "Delete your account"
msgstr ""
msgid "Sorry, but as an admin, you can't leave your own instance."
msgstr ""
msgid "Your Dashboard"
msgstr ""
msgid "Your Blogs"
msgstr ""
msgid "You don't have any blog yet. Create your own, or ask to join one."
msgstr ""
msgid "Start a new blog"
msgstr ""
msgid "Your Drafts"
msgstr ""
msgid "Go to your gallery"
msgstr ""
msgid "Atom feed"
msgstr ""
msgid "Recently boosted"
msgstr ""
msgid "What is Plume?"
msgstr ""
msgid "Plume is a decentralized blogging engine."
msgstr ""
msgid "Authors can manage multiple blogs, each as its own website."
msgstr ""
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
msgstr ""
msgid "Read the detailed rules"
msgstr ""
msgid "View all"
msgstr ""
msgid "None"
msgstr ""
msgid "No description"
msgstr ""
msgid "By {0}"
msgstr ""
msgid "Draft"
msgstr ""
msgid "Respond"
msgstr ""
msgid "Delete this comment"
msgstr ""
msgid "I'm from this instance"
msgstr ""
msgid "I'm from another instance"
msgstr ""
# src/template_utils.rs:259
msgid "Example: user@plu.me"
msgstr ""
msgid "Continue to your instance"
msgstr ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -146,7 +146,7 @@ pub fn avatar(
pub fn tabs(links: &[(&str, String, bool)]) -> Html<String> {
let mut res = String::from(r#"<div class="tabs">"#);
for (url, title, selected) in links {
res.push_str(r#"<a href=""#);
res.push_str(r#"<a dir="auto" href=""#);
res.push_str(url);
if *selected {
res.push_str(r#"" class="selected">"#);
@ -176,7 +176,7 @@ pub fn paginate_param(
p
})
.unwrap_or_default();
res.push_str(r#"<div class="pagination">"#);
res.push_str(r#"<div class="pagination" dir="auto">"#);
if page != 1 {
res.push_str(
format!(
@ -239,13 +239,13 @@ macro_rules! input {
Html(format!(
r#"
<label for="{name}">
<label for="{name}" dir="auto">
{label}
{optional}
{details}
</label>
{error}
<input type="{kind}" id="{name}" name="{name}" value="{val}" {props}/>
<input type="{kind}" id="{name}" name="{name}" value="{val}" {props} dir="auto"/>
"#,
name = stringify!($name),
label = i18n!(cat, $label),
@ -264,7 +264,7 @@ macro_rules! input {
$err.errors().get(stringify!($name))
{
format!(
r#"<p class="error">{}</p>"#,
r#"<p class="error" dir="auto">{}</p>"#,
errs[0]
.message
.clone()
@ -332,8 +332,8 @@ macro_rules! input {
let cat = $catalog;
Html(format!(
r#"
<label for="{name}">{label}</label>
<input type="{kind}" id="{name}" name="{name}" {props}/>
<label for="{name}" dir="auto">{label}</label>
<input type="{kind}" id="{name}" name="{name}" {props} dir="auto"/>
"#,
name = stringify!($name),
label = i18n!(cat, $label),

View File

@ -24,7 +24,7 @@
<link href='@Instance::get_local().unwrap().compute_box("~", &blog.fqn, "atom.xml")' rel='alternate' type='application/atom+xml'>
<link href='@blog.ap_url' rel='alternate' type='application/activity+json'>
}, {
<a href="@uri!(blogs::details: name = &blog.fqn, page = _)">@blog.title</a>
<a href="@uri!(blogs::details: name = &blog.fqn, page = _)" dir="auto">@blog.title</a>
}, {
<div class="hidden">
@for author in authors {
@ -41,38 +41,38 @@
}
<div class="h-card">
<div class="user">
<div class="flex wrap">
<div class="flex wrap" dir="auto">
<div class="avatar medium" style="background-image: url('@blog.icon_url(ctx.0)');" aria-label="@i18n!(ctx.1, "{}'s icon"; &blog.title)"></div>
<img class="hidden u-photo" src="@blog.icon_url(ctx.0)"/>
<h1 class="grow flex vertical">
<span class="p-name">@blog.title</span>
<small>~@blog.fqn</small>
<small dir="auto">~@blog.fqn</small>
</h1>
@if ctx.2.clone().and_then(|u| u.is_author_in(ctx.0, &blog).ok()).unwrap_or(false) {
<a href="@uri!(posts::new: blog = &blog.fqn)" class="button">@i18n!(ctx.1, "New article")</a>
<a href="@uri!(blogs::edit: name = &blog.fqn)" class="button">@i18n!(ctx.1, "Edit")</a>
<a href="@uri!(posts::new: blog = &blog.fqn)" class="button" dir="auto">@i18n!(ctx.1, "New article")</a>
<a href="@uri!(blogs::edit: name = &blog.fqn)" class="button" dir="auto">@i18n!(ctx.1, "Edit")</a>
}
</div>
<main class="user-summary">
<main class="user-summary" dir="auto">
<p>
@i18n!(ctx.1, "There's one author on this blog: ", "There are {0} authors on this blog: "; authors.len())
@for (i, author) in authors.iter().enumerate() {@if i >= 1 {, }
<a class="author p-author" href="@uri!(user::details: name = &author.fqn)">@author.name()</a>}
<a class="author p-author" href="@uri!(user::details: name = &author.fqn)" dir="auto">@author.name()</a>}
</p>
@Html(blog.summary_html.clone())
</main>
</div>
<section>
<h2>
<h2 dir="auto">
@i18n!(ctx.1, "Latest articles")
<small><a href="@uri!(blogs::atom_feed: name = &blog.fqn)" title="Atom feed">@icon!("rss")</a></small>
</h2>
@if posts.is_empty() {
<p>@i18n!(ctx.1, "No posts to see here yet.")</p>
<p dir="auto">@i18n!(ctx.1, "No posts to see here yet.")</p>
}
<div class="cards">
@for article in posts {

View File

@ -7,9 +7,9 @@
@(ctx: BaseContext, form: &NewBlogForm, errors: ValidationErrors)
@:base(ctx, i18n!(ctx.1, "New Blog"), {}, {}, {
<h1>@i18n!(ctx.1, "Create a blog")</h1>
<h1 dir="auto">@i18n!(ctx.1, "Create a blog")</h1>
<form method="post" action="@uri!(blogs::create)">
@input!(ctx.1, title (text), "Title", form, errors, "required minlength=\"1\"")
<input type="submit" value="@i18n!(ctx.1, "Create blog")"/>
<input type="submit" value="@i18n!(ctx.1, "Create blog")" dir="auto"/>
</form>
})

View File

@ -9,7 +9,7 @@
<div class="comment u-comment h-cite" id="comment-@comm.id">
<main class="content">
<header>
<a class="author u-author h-card" href="@uri!(user::details: name = &author.fqn)">
<a class="author u-author h-card" href="@uri!(user::details: name = &author.fqn)" dir="auto">
@avatar(ctx.0, &author, Size::Small, true, ctx.1)
<span class="display-name p-name">@author.name()</span>
<small>@author.fqn</small>
@ -27,7 +27,7 @@
<div class="text p-content">
@if comm.sensitive {
<details>
<summary>@comm.spoiler_text</summary>
<summary dir="auto">@comm.spoiler_text</summary>
}
@Html(&comm.content)
@if comm.sensitive {

View File

@ -6,7 +6,7 @@
@if !articles.is_empty() {
<div class="h-feed">
<h2><span class="p-name">@title</span> &mdash; <a href="@link">@i18n!(ctx.1, "View all")</a></h2>
<h2 dir="auto"><span class="p-name">@title</span> &mdash; <a href="@link">@i18n!(ctx.1, "View all")</a></h2>
<div class="cards">
@for article in articles {
@:post_card(ctx, article)

View File

@ -3,7 +3,7 @@
@(ctx: BaseContext, id: &str, title: String, optional: bool, medias: Vec<Media>, selected: Option<i32>)
<label for="@id">
<label for="@id" dir="auto">
@title
@if optional {
<small>@i18n!(ctx.1, "Optional")</small>
@ -13,7 +13,7 @@
<option value="none" @if selected.is_none() { selected }>@i18n!(ctx.1, "None")</option>
@for media in medias {
@if media.category() == MediaCategory::Image {
<option value="@media.id" @if selected.map(|c| c == media.id).unwrap_or(false) { selected }>
<option value="@media.id" @if selected.map(|c| c == media.id).unwrap_or(false) { selected } dir="auto">
@if !media.alt_text.is_empty() {
@media.alt_text
} else {

View File

@ -4,7 +4,7 @@
@(ctx: BaseContext, instance: Instance, n_users: i64, n_articles: i64)
<section class="split">
<section class="split" dir="auto">
<div class="presentation card">
<h2>@i18n!(ctx.1, "What is Plume?")</h2>
<main>

View File

@ -8,13 +8,13 @@
@if article.cover_id.is_some() {
<div class="cover" style="background-image: url('@Html(article.cover_url(ctx.0).unwrap_or_default())')"></div>
}
<h3 class="p-name">
<h3 class="p-name" dir="auto">
<a class="u-url" href="@uri!(posts::details: blog = article.get_blog(ctx.0).unwrap().fqn, slug = &article.slug, responding_to = _)">
@article.title
</a>
</h3>
<main>
<p class="p-summary">@article.subtitle</p>
<p class="p-summary" dir="auto">@article.subtitle</p>
</main>
<footer class="authors">
@Html(i18n!(ctx.1, "By {0}"; format!(

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>

View File

@ -12,8 +12,8 @@
@(ctx: BaseContext, title: String, blog: Blog, editing: bool, form: &NewPostForm, is_draft: bool, article: Option<Post>, errors: ValidationErrors, medias: Vec<Media>, content_len: u64)
@:base(ctx, title.clone(), {}, {}, {
<h1 id="plume-editor-title">@title</h1>
<div id="plume-editor" style="display: none;">
<h1 id="plume-editor-title" dir="auto">@title</h1>
<div id="plume-editor" style="display: none;" dir="auto">
<header>
<button id="publish" class="button">@i18n!(ctx.1, "Publish")</button>
<p id="char-count">@content_len</p>
@ -32,10 +32,10 @@
@format!(r#"<p class="error">{}</p>"#, errs[0].message.clone().unwrap_or_else(|| Cow::from("Unknown error")))
}
<label for="editor-content">@i18n!(ctx.1, "Content")<small>@i18n!(ctx.1, "Markdown syntax is supported")</small></label>
<textarea id="editor-content" name="content" rows="20">@Html(&form.content)</textarea>
<small id="editor-left">@content_len</small>
<p>
<label for="editor-content" dir="auto">@i18n!(ctx.1, "Content")<small>@i18n!(ctx.1, "Markdown syntax is supported")</small></label>
<textarea id="editor-content" name="content" rows="20" dir="auto">@Html(&form.content)</textarea>
<small id="editor-left" dir="auto">@content_len</small>
<p dir="auto">
@i18n!(ctx.1, "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them.")
<a href="@uri!(medias::new)">@i18n!(ctx.1, "Upload media")</a>
</p>
@ -47,7 +47,7 @@
@:image_select(ctx, "cover", i18n!(ctx.1, "Illustration"), true, medias, form.cover)
@if is_draft {
<label for="draft">
<label for="draft" dir="auto">
<input type="checkbox" name="draft" id="draft" checked>
@i18n!(ctx.1, "This is a draft, don't publish it yet.")
</label>

View File

@ -9,6 +9,6 @@
@(ctx: BaseContext, post: Post, login_form: LoginForm, login_errs: ValidationErrors, remote_form: RemoteForm, remote_errs: ValidationErrors)
@:remote_interact_base(ctx, i18n!(ctx.1, "Interact with {}"; post.title.clone()), i18n!(ctx.1, "Log in to interact"), i18n!(ctx.1, "Enter your full username to interact"), {
<h1>@i18n!(ctx.1, "Interact with {}"; post.title.clone())</h1>
<h1 dir="auto">@i18n!(ctx.1, "Interact with {}"; post.title.clone())</h1>
@:post_card(ctx, post)
}, login_form, login_errs, remote_form, remote_errs)