Merge pull request 'Fix RTL problem in post card' (#956) from mskf1383/Plume:main into main

Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/956
Reviewed-by: KitaitiMakoto <kitaitimakoto@noreply@joinplu.me>
This commit is contained in:
KitaitiMakoto 2021-11-21 14:32:14 +00:00
commit 82ebdc023c
2 changed files with 10 additions and 8 deletions

View File

@ -237,6 +237,8 @@ p.error {
font-size: 1.75em; font-size: 1.75em;
font-weight: normal; font-weight: normal;
line-height: 1.75; line-height: 1.75;
display: inline-block;
position: absolute;
a { a {
display: block; display: block;
transition: color 0.1s ease-in; transition: color 0.1s ease-in;
@ -247,7 +249,7 @@ p.error {
} }
.controls { .controls {
float: right; text-align: end;
.button { .button {
margin-top: 0; margin-top: 0;
@ -261,7 +263,7 @@ p.error {
font-family: $lora; font-family: $lora;
font-size: 1em; font-size: 1em;
line-height: 1.25; line-height: 1.25;
text-align: left; text-align: initial;
overflow: hidden; overflow: hidden;
} }
} }

View File

@ -8,17 +8,17 @@
@if article.cover_id.is_some() { @if article.cover_id.is_some() {
<a href="@uri!(posts::details: blog = article.get_blog_fqn(ctx.0), slug = &article.slug, responding_to = _)"><div class="cover" style="background-image: url('@Html(article.cover_url(ctx.0).unwrap_or_default())')"></div></a> <a href="@uri!(posts::details: blog = article.get_blog_fqn(ctx.0), slug = &article.slug, responding_to = _)"><div class="cover" style="background-image: url('@Html(article.cover_url(ctx.0).unwrap_or_default())')"></div></a>
} }
<header> <header dir="auto">
<h3 class="p-name">
<a class="u-url" href="@uri!(posts::details: blog = article.get_blog_fqn(ctx.0), slug = &article.slug, responding_to = _)">
@article.title
</a>
</h3>
@if ctx.2.clone().and_then(|u| article.is_author(ctx.0, u.id).ok()).unwrap_or(false) { @if ctx.2.clone().and_then(|u| article.is_author(ctx.0, u.id).ok()).unwrap_or(false) {
<div class="controls"> <div class="controls">
<a class="button" href="@uri!(posts::edit: blog = &article.get_blog_fqn(ctx.0), slug = &article.slug)">@i18n!(ctx.1, "Edit")</a> <a class="button" href="@uri!(posts::edit: blog = &article.get_blog_fqn(ctx.0), slug = &article.slug)">@i18n!(ctx.1, "Edit")</a>
</div> </div>
} }
<h3 class="p-name" dir="auto">
<a class="u-url" href="@uri!(posts::details: blog = article.get_blog_fqn(ctx.0), slug = &article.slug, responding_to = _)">
@article.title
</a>
</h3>
</header> </header>
<main> <main>
<p class="p-summary" dir="auto">@article.subtitle</p> <p class="p-summary" dir="auto">@article.subtitle</p>