yggdrasil/components/post/
breadcrumbs.rs1use dioxus::prelude::*;
6use dioxus::router::components::Link;
7
8use crate::router::Route;
9
10#[component]
21pub fn Breadcrumbs(title: String, #[props(default = false)] full_reload: bool) -> Element {
22 let home_to = super::nav_target(Route::Home {}, full_reload);
23 rsx! {
24 nav {
25 class: "breadcrumbs",
26 role: "navigation",
27 aria_label: "Breadcrumb",
28 Link { to: home_to, "data-vt-return": (!full_reload).then_some("true"), "Home" }
29 svg {
30 xmlns: "http://www.w3.org/2000/svg",
31 view_box: "0 0 24 24",
32 fill: "none",
33 stroke: "currentColor",
34 stroke_width: "2",
35 stroke_linecap: "round",
36 stroke_linejoin: "round",
37 class: "feather feather-chevron-right",
38 width: "16",
39 height: "16",
40 polyline { points: "9 18 15 12 9 6" }
41 }
42 span { "{title}" }
43 }
44 }
45}