fontawesome

This commit is contained in:
Hubert
2021-07-03 10:21:54 +02:00
parent f8256e3f3a
commit b60214499e
18 changed files with 2634 additions and 39 deletions

View File

@@ -1,6 +1,7 @@
mod git;
mod ite;
use actix_files::Files;
use actix_web::{get, post, web, App, HttpResponse, HttpServer, Responder, Error, HttpRequest};
use askama_actix::Template;
use actix_session::{Session, CookieSession};
@@ -97,9 +98,6 @@ async fn git_main(web::Path((owner, reponame, commitname, rootname)): web::Path<
let user = User { name : "Hubert".to_string()};
GitMainTemplate { repo, browse : browse, root : path, user_opt : Some(user)}
}
#[derive(Template)]
#[template(path = "fontawesome.css")]
struct CSSFontAwsome{}
#[post("/echo")]
async fn echo(req_body: String) -> impl Responder {
@@ -167,6 +165,12 @@ async fn main() -> std::io::Result<()> {
.wrap(auth)
.route(web::get().to(hello_auth))
)
.service(
Files::new("/static", "static")
.use_last_modified(true)
.use_etag(true)
// .show_files_listing()
)
.route("/hey", web::get().to(manual_hello))
})
.bind("127.0.0.1:8080")?