Update post page
This commit is contained in:
parent
9cd4298764
commit
4ab4b95d8a
1 changed files with 10 additions and 2 deletions
|
@ -128,11 +128,10 @@ pub fn PostElement() -> impl IntoView {
|
|||
post.and_then(|post| {
|
||||
view! {
|
||||
<>
|
||||
<PostTags tags=post.metadata.tags.clone()/>
|
||||
{
|
||||
if post.metadata.draft {
|
||||
Some(view!{
|
||||
<div class="bg-warning text-on_warning dark:bg-dark_warning dark:text-dart_on_warning rounded-md p-5">
|
||||
<div class="bg-warning text-on_warning dark:bg-dark_warning dark:text-dart_on_warning rounded-md p-5 mb-5">
|
||||
r#"
|
||||
L'article est en cours d'écriture. La formulation peut ne pas être exacte et les phrases peuvent contenir des fautes.
|
||||
"#
|
||||
|
@ -142,6 +141,15 @@ pub fn PostElement() -> impl IntoView {
|
|||
None
|
||||
}
|
||||
}
|
||||
|
||||
<div class="border-b-2 pb-5">
|
||||
<img src={post.metadata.image_path.clone()} alt=format!("Image {}", post.metadata.title)/>
|
||||
<h1>{post.metadata.title.clone()}</h1>
|
||||
<p>{post.metadata.description.clone()}</p>
|
||||
<span>{post.metadata.date.clone()}</span>
|
||||
<PostTags tags=post.metadata.tags.clone()/>
|
||||
</div>
|
||||
|
||||
<div inner_html={post.content.clone()}></div>
|
||||
</>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue