diff --git a/src/main.rs b/src/main.rs index 3aa0ec3..3ae567f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -577,19 +577,23 @@ fn handle_relative_connection( .map(|(path, _)| path) .unwrap_or_default(); + let title = relative_path + .rsplit_once('/') + .map_or(relative_path, |(_, title)| title); + + let back = !title.is_empty(); + let section = |stream: &mut TcpStream| { let _ = writeln!(stream, "
👁️{visits} 💖️{up} 💔️{down}
"); section(&mut stream); - let title = relative_path - .rsplit_once('/') - .map_or(relative_path, |(_, title)| title); - fn entry_handler