summaryrefslogtreecommitdiff
path: root/src/templates/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/mod.rs')
-rw-r--r--src/templates/mod.rs25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/templates/mod.rs b/src/templates/mod.rs
index 99e3bf3..e0e194a 100644
--- a/src/templates/mod.rs
+++ b/src/templates/mod.rs
@@ -1,19 +1,12 @@
use handlebars::Handlebars;
-lazy_static! {
- pub static ref REGISTRY: Handlebars<'static> = {
- let mut handlebars = Handlebars::new();
- handlebars
- .register_template_string("index", include_str!("index.hbs"))
- .unwrap();
- handlebars
- .register_template_string("login", include_str!("login.hbs"))
- .unwrap();
- handlebars
- .register_template_string("base", include_str!("base.hbs"))
- .unwrap();
- handlebars
- };
+pub fn init() -> Handlebars<'static> {
+ let mut handlebars = Handlebars::new();
+ handlebars
+ .register_template_string("index", include_str!("index.hbs"))
+ .unwrap();
+ handlebars
+ .register_template_string("base", include_str!("base.hbs"))
+ .unwrap();
+ handlebars
}
-
-pub static FAVICON: &str = include_str!("favicon.svg");