diff --git a/src/main.rs b/src/main.rs index 58561c2..4229ca3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -374,12 +374,24 @@ fn handle_relative_connection( let _ = write!(stream, "Content-Type: text/html; charset=\"utf-8\"\r\n"); let _ = write!(stream, "\r\n"); + let parent_path = relative_path + .rsplit_once('/') + .map(|(path, _)| path) + .unwrap_or_default(); + + let section = |stream: &mut TcpStream| { + let _ = writeln!(stream, "
👁️{} 💖️{} 💔️{}
", info.visits, info.up, info.down ); + section(&mut stream); + let title = relative_path .rsplit_once('/') .map(|(_, title)| title) @@ -503,16 +515,6 @@ fn handle_relative_connection( unreachable!(); } - let parent_path = relative_path - .rsplit_once('/') - .map(|(path, _)| path) - .unwrap_or_default(); - - let section = |stream: &mut TcpStream| { - let _ = writeln!(stream, "