refactor
This commit is contained in:
parent
9f463bd41a
commit
1273a77f61
|
@ -136,6 +136,7 @@ fn full<'s, 'p, 'html>(
|
||||||
sack: &'s MySack,
|
sack: &'s MySack,
|
||||||
main: impl Renderable + 'p,
|
main: impl Renderable + 'p,
|
||||||
title: String,
|
title: String,
|
||||||
|
js: Option<&'s [String]>,
|
||||||
) -> Result<impl Renderable + 'html, String>
|
) -> Result<impl Renderable + 'html, String>
|
||||||
where
|
where
|
||||||
's: 'html,
|
's: 'html,
|
||||||
|
@ -143,7 +144,7 @@ where
|
||||||
{
|
{
|
||||||
let main = maud_move!((navbar())(main));
|
let main = maud_move!((navbar())(main));
|
||||||
|
|
||||||
bare(sack, main, title, None)
|
bare(sack, main, title, js)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn page<'s, 'p, 'html>(
|
fn page<'s, 'p, 'html>(
|
||||||
|
@ -181,7 +182,10 @@ pub(crate) fn to_list(sack: &MySack, list: Vec<LinkDate>, title: String) -> Stri
|
||||||
list::list(sack, &groups, title).unwrap().render().into()
|
list::list(sack, &groups, title).unwrap().render().into()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn map<'s, 'html>(sack: &'s MySack) -> Result<impl Renderable + 'html, String>
|
pub(crate) fn map<'s, 'html>(
|
||||||
|
sack: &'s MySack,
|
||||||
|
js: Option<&'s [String]>,
|
||||||
|
) -> Result<impl Renderable + 'html, String>
|
||||||
where
|
where
|
||||||
's: 'html,
|
's: 'html,
|
||||||
{
|
{
|
||||||
|
@ -195,6 +199,7 @@ where
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
String::from("Map"),
|
String::from("Map"),
|
||||||
|
js,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,11 @@ fn main() {
|
||||||
.add_task(|sack| {
|
.add_task(|sack| {
|
||||||
vec![(
|
vec![(
|
||||||
"map/index.html".into(),
|
"map/index.html".into(),
|
||||||
crate::html::map(&sack).unwrap().render().to_owned().into(),
|
crate::html::map(&sack, Some(&["photos".into()]))
|
||||||
|
.unwrap()
|
||||||
|
.render()
|
||||||
|
.to_owned()
|
||||||
|
.into(),
|
||||||
)]
|
)]
|
||||||
})
|
})
|
||||||
// Task: generate search
|
// Task: generate search
|
||||||
|
|
Loading…
Reference in a new issue