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| {
|
||||
if let Some(tag) = tags.get(tag) {
|
||||
html! {
|
||||
<Link<Route>
|
||||
classes="text-sky-500 hover:text-sky-600"
|
||||
to={Route::Tags}>
|
||||
{tag.name.clone()}
|
||||
</Link<Route>>
|
||||
<span class="text-sky-500">{tag.name.clone()}</span>
|
||||
}
|
||||
} else {
|
||||
html! {
|
||||
|
@ -8,7 +8,6 @@ mod blog_post;
|
||||
mod disclaimer;
|
||||
mod home;
|
||||
mod not_found;
|
||||
mod tags;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Sequence, Routable)]
|
||||
pub enum Route {
|
||||
@ -22,8 +21,6 @@ pub enum Route {
|
||||
BlogPost { doc_id: crate::model::blog::DocId },
|
||||
#[at("/disclaimer")]
|
||||
Disclaimer,
|
||||
#[at("/tags")]
|
||||
Tags,
|
||||
#[not_found]
|
||||
#[at("/404")]
|
||||
NotFound,
|
||||
@ -37,7 +34,6 @@ impl Route {
|
||||
Self::Blog => html! { <blog::Page /> },
|
||||
Self::BlogPost { doc_id } => html! { <blog_post::Page {doc_id} /> },
|
||||
Self::Disclaimer => html! { <disclaimer::Page /> },
|
||||
Self::Tags => html! { <tags::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