From a23866075a7e99c8119c2eda03a600e7b272f1b9 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Tue, 18 May 2021 15:21:42 +0200 Subject: [PATCH] refactor: improve index html page look --- src/static_files.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/static_files.rs b/src/static_files.rs index 2f619e5..9e4e375 100644 --- a/src/static_files.rs +++ b/src/static_files.rs @@ -183,7 +183,7 @@ async fn read_directory_entries( let modified = parse_last_modified(meta.modified()?).unwrap(); entries_str = format!( - "{}{}{}{}", + "{}{}{}{}", entries_str, uri, name, @@ -194,8 +194,11 @@ async fn read_directory_entries( } let current_path = percent_decode_str(&base_path).decode_utf8()?.to_string(); + + let style_str = r#""#; + let footer_str = r#""#; let page_str = format!( - "Index of {}

Index of {}

{}


", current_path, current_path, entries_str + "Index of {}{}

Index of {}

{}


{}", current_path, style_str, current_path, entries_str, footer_str ); let mut resp = Response::new(Body::empty()); -- libgit2 1.7.2