Backlink component
This commit is contained in:
@@ -15,3 +15,23 @@ impl<T: Render> Render for FarLink<'_, T> {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Backlinks(
|
||||
pub &'static [(&'static str, &'static str)],
|
||||
pub &'static str,
|
||||
);
|
||||
|
||||
impl Render for Backlinks {
|
||||
fn render(&self) -> Markup {
|
||||
html! {
|
||||
div {
|
||||
@for (url, text) in self.0 {
|
||||
a href=(url) style="padding-left:5pt;padding-right:5pt;" { (text) }
|
||||
"/"
|
||||
}
|
||||
|
||||
span style="color:var(--metaColor);padding-left:5pt;padding-right:5pt;" { (self.1) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user