mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 12:21:09 +00:00
Format
This commit is contained in:
parent
b89fcb6dc4
commit
4ebd4600fc
2 changed files with 37 additions and 31 deletions
|
@ -46,36 +46,36 @@ pub fn InstanceDetails() -> impl IntoView {
|
||||||
let instance_ = instance.clone();
|
let instance_ = instance.clone();
|
||||||
view! {
|
view! {
|
||||||
<div class="grid gap-3 mt-4">
|
<div class="grid gap-3 mt-4">
|
||||||
<div class="flex flex-row items-center">
|
<div class="flex flex-row items-center">
|
||||||
<h1 class="text-4xl font-bold font-serif w-full">
|
<h1 class="text-4xl font-bold font-serif w-full">
|
||||||
{instance.domain}
|
{instance.domain}
|
||||||
</h1>
|
</h1>
|
||||||
<InstanceFollowButton instance=instance_.clone() />
|
<InstanceFollowButton instance=instance_.clone() />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div>{instance.description}</div>
|
<div>{instance.description}</div>
|
||||||
<h2 class="text-xl font-bold font-serif">Articles</h2>
|
<h2 class="text-xl font-bold font-serif">Articles</h2>
|
||||||
<ul class="list-none">
|
<ul class="list-none">
|
||||||
{move || {
|
{move || {
|
||||||
articles
|
articles
|
||||||
.get()
|
.get()
|
||||||
.map(|a| {
|
.map(|a| {
|
||||||
a.into_iter()
|
a.into_iter()
|
||||||
.map(|a| {
|
.map(|a| {
|
||||||
view! {
|
view! {
|
||||||
<li>
|
<li>
|
||||||
<a class="link text-lg" href=article_link(&a)>
|
<a class="link text-lg" href=article_link(&a)>
|
||||||
{article_title(&a)}
|
{article_title(&a)}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -52,7 +52,9 @@ pub fn Search() -> impl IntoView {
|
||||||
});
|
});
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<h1 class="text-4xl font-bold font-serif my-6 grow flex-auto">"Search results for " {query}</h1>
|
<h1 class="text-4xl font-bold font-serif my-6 grow flex-auto">
|
||||||
|
"Search results for " {query}
|
||||||
|
</h1>
|
||||||
<Suspense fallback=|| {
|
<Suspense fallback=|| {
|
||||||
view! { "Loading..." }
|
view! { "Loading..." }
|
||||||
}>
|
}>
|
||||||
|
@ -87,7 +89,9 @@ pub fn Search() -> impl IntoView {
|
||||||
vec![
|
vec![
|
||||||
view! {
|
view! {
|
||||||
<li>
|
<li>
|
||||||
<a class="link text-lg" href=format!("/instance/{domain}")>{domain}</a>
|
<a class="link text-lg" href=format!("/instance/{domain}")>
|
||||||
|
{domain}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -100,7 +104,9 @@ pub fn Search() -> impl IntoView {
|
||||||
.map(|a| {
|
.map(|a| {
|
||||||
view! {
|
view! {
|
||||||
<li>
|
<li>
|
||||||
<a class="link text-lg" href=article_link(a)>{article_title(a)}</a>
|
<a class="link text-lg" href=article_link(a)>
|
||||||
|
{article_title(a)}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue