crate static_extra_scripts: &'a [&'a str],
}
+impl<'a> Page<'a> {
+ crate fn get_static_root_path(&self) -> &str {
+ self.static_root_path.unwrap_or(self.root_path)
+ }
+}
+
crate fn render<T: Print, S: Print>(
layout: &Layout,
page: &Page<'_>,
t: T,
style_files: &[StylePath],
) -> String {
- let static_root_path = page.static_root_path.unwrap_or(page.root_path);
+ let static_root_path = page.get_static_root_path();
format!(
"<!DOCTYPE html>\
<html lang=\"en\">\
placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \
type=\"search\">\
</div>\
- <button type=\"button\" class=\"help-button\">?</button>
+ <button type=\"button\" id=\"help-button\">?</button>
<a id=\"settings-menu\" href=\"{root_path}settings.html\">\
<img src=\"{static_root_path}wheel{suffix}.svg\" \
width=\"18\" height=\"18\" \