mirror of
https://forge.pointfixe.fr/hubert/gitust.git
synced 2026-02-04 17:47:29 +01:00
fontawesome
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -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")?
|
||||
|
||||
Reference in New Issue
Block a user