Add all tags in posts #2

This commit is contained in:
Florian RICHER 2024-02-18 19:55:16 +01:00
parent 0436136cdd
commit 2789edc0d6

View file

@ -152,14 +152,12 @@ pub fn PostList() -> impl IntoView {
match tag() {
Some(tag) => {
view! {
<A class="tag" href="/posts".to_string()>{tag}<leptos_icons::Icon icon=icondata::IoClose class="scale-125 ml-1 inline" /></A>
<><A class="tag" href="/posts".to_string()>{tag}<leptos_icons::Icon icon=icondata::IoClose class="scale-125 ml-1 inline" /></A></>
}.into_view()
},
None => {
view! {
<div class="flex flex-wrap gap-2">
{tags_view}
</div>
<>{tags_view}</>
}.into_view()
}
}
@ -168,7 +166,8 @@ pub fn PostList() -> impl IntoView {
view! {
<Suspense fallback=move || view! { <Loading title="Chargement des posts...".to_string() /> }>
<Nav/>
<div class="mx-auto max-w-3xl mb-5">
<div class="mx-auto max-w-3xl mb-5 flex flex-wrap gap-2">
<span>Filtre : </span>
{filter_view}
</div>
<main class="posts">