diff --git a/site/Cargo.lock b/site/Cargo.lock
index f64e6fd..1fb792b 100644
--- a/site/Cargo.lock
+++ b/site/Cargo.lock
@@ -572,7 +572,7 @@ checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
[[package]]
name = "crablog"
-version = "0.2.1"
+version = "0.2.2"
dependencies = [
"actix-files",
"actix-web",
diff --git a/site/src/html.rs b/site/src/html.rs
deleted file mode 100644
index 0af4976..0000000
--- a/site/src/html.rs
+++ /dev/null
@@ -1,164 +0,0 @@
-pub const INDEX: &str = r#"
-
-
-
-
-
-
-
-
- {{ username }}' site
-
-
-
-
-
- Hi, I'm {{ username }}
-
- I have a blog.
- If you have questions or input for me please send me an E-Mail to {{ email }}
-
-
-
-"#;
-
-pub const BLOG: &str = r#"
-
-
-
-
-
-
-
-
-
- {{ sitetitle }}
-
-
-
-
-
-
- All Posts
-
- {% for post in posts %}
-
- [link]
-
-
{{ post.title }}
-
{{ post.publish_date | date(format="%Y-%m-%d at %H:%M") }}
-
{{ post.body }}
-
-
- {% endfor %}
-
-
-
-"#;
-
-pub const SUBMIT: &str = r#"
-
-
-
-
-
-
-
-
- Submit post
-
-
-
-
-
-
Please set your token cookie first.
-
-
-
-
-
-
-
-
-
-"#;
-
-pub const EDIT: &str = r#"
-
-
-
-
-
-
-
-
- Edit posts...
-
-
-
-
-
- Edit posts
-
-
-
-"#;
-
-pub const POST_EDIT_FORM: &str = r#"
-
-
-
-
-
-
-
-
- Edit '{{ title }}'
-
-
-
-
-
-
Please set your token cookie first.
-
-
-
-
-
-
-
-
-
-
-
-
-"#;
-
diff --git a/site/src/main.rs b/site/src/main.rs
index c495713..ce98ba6 100644
--- a/site/src/main.rs
+++ b/site/src/main.rs
@@ -48,8 +48,7 @@ async fn main() -> std::io::Result<()> {
let mut tera = Tera::new(format!("{}{}", CONFIG_MAP.read().unwrap().get("ROOT_PATH").unwrap(), "/templates/*").as_str()).unwrap();
tera.autoescape_on(vec![".sql"]);
- env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
-
+ env_logger::Builder::from_env(Env::default().default_filter_or("info"));
App::new()
.data(tera)
@@ -65,7 +64,7 @@ async fn main() -> std::io::Result<()> {
.service(api::blog_edit_post)
.service(api::blog_hide_post)
.service(api::blog_delete_post)
- .service(fs::Files::new("/static", "../content/static"))
+ .service(fs::Files::new("/static", format!("{}{}", CONFIG_MAP.read().unwrap().get("ROOT_PATH").unwrap(), "/static")))
.wrap(Logger::new("%a %r %t"))
})
.bind(format!("0.0.0.0:{}", CONFIG_MAP.read().unwrap().get("BIND_PORT").unwrap()))?