Switch over to WebAssembly, Rust and Yew #35
@ -43,11 +43,7 @@ pub fn post_card_details<S>(horizontal: bool, info: &Details<S>, tags: &TagsCont
|
|||||||
info.tags.iter().map(|tag| {
|
info.tags.iter().map(|tag| {
|
||||||
if let Some(tag) = tags.get(tag) {
|
if let Some(tag) = tags.get(tag) {
|
||||||
html! {
|
html! {
|
||||||
<Link<Route>
|
<span class="text-sky-500">{tag.name.clone()}</span>
|
||||||
classes="text-sky-500 hover:text-sky-600"
|
|
||||||
to={Route::Tags}>
|
|
||||||
{tag.name.clone()}
|
|
||||||
</Link<Route>>
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
html! {
|
html! {
|
||||||
|
@ -8,7 +8,6 @@ mod blog_post;
|
|||||||
mod disclaimer;
|
mod disclaimer;
|
||||||
mod home;
|
mod home;
|
||||||
mod not_found;
|
mod not_found;
|
||||||
mod tags;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Sequence, Routable)]
|
#[derive(Debug, Clone, PartialEq, Sequence, Routable)]
|
||||||
pub enum Route {
|
pub enum Route {
|
||||||
@ -22,8 +21,6 @@ pub enum Route {
|
|||||||
BlogPost { doc_id: crate::model::blog::DocId },
|
BlogPost { doc_id: crate::model::blog::DocId },
|
||||||
#[at("/disclaimer")]
|
#[at("/disclaimer")]
|
||||||
Disclaimer,
|
Disclaimer,
|
||||||
#[at("/tags")]
|
|
||||||
Tags,
|
|
||||||
#[not_found]
|
#[not_found]
|
||||||
#[at("/404")]
|
#[at("/404")]
|
||||||
NotFound,
|
NotFound,
|
||||||
@ -37,7 +34,6 @@ impl Route {
|
|||||||
Self::Blog => html! { <blog::Page /> },
|
Self::Blog => html! { <blog::Page /> },
|
||||||
Self::BlogPost { doc_id } => html! { <blog_post::Page {doc_id} /> },
|
Self::BlogPost { doc_id } => html! { <blog_post::Page {doc_id} /> },
|
||||||
Self::Disclaimer => html! { <disclaimer::Page /> },
|
Self::Disclaimer => html! { <disclaimer::Page /> },
|
||||||
Self::Tags => html! { <tags::Page /> },
|
|
||||||
Self::NotFound => html! { <not_found::Page /> },
|
Self::NotFound => html! { <not_found::Page /> },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
use yew::{function_component, html, Html};
|
|
||||||
|
|
||||||
#[function_component(Page)]
|
|
||||||
pub fn page() -> Html {
|
|
||||||
html! {
|
|
||||||
<div class="container">
|
|
||||||
<h1>{"Tags"}</h1>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user