Header sizes consistent

This commit is contained in:
p11 2025-05-30 01:44:56 +02:00
parent f1d38b8cf1
commit 0eaddcbdac

View File

@ -319,7 +319,7 @@ fn handle_connection(
let mut mld_path = path.clone();
let mut data_path = path.clone();
let (pki_path, audio_path, start_level, relative_path) = if relative_path.is_empty() {
let (pki_path, audio_path, relative_path) = if relative_path.is_empty() {
if access == Access::Full {
pk_path.push("index.pk");
data_path.push("index.dat");
@ -328,7 +328,7 @@ fn handle_connection(
data_path.push("partial.dat");
}
(None, None, 0, String::new())
(None, None, String::new())
} else {
let mut pki_path = path.clone();
let mut audio_path = path.clone();
@ -359,7 +359,7 @@ fn handle_connection(
audio_path.push(format!("{path}.mp3"));
data_path.push(format!("{path}.dat"));
(Some(pki_path), Some(audio_path), 1, path.to_string())
(Some(pki_path), Some(audio_path), path.to_string())
};
let file_paths = DocumentPaths {
@ -421,7 +421,6 @@ fn handle_connection(
&relative_path,
&path,
file_paths,
start_level,
cookie,
access != Access::Full,
)
@ -483,7 +482,6 @@ fn handle_relative_connection(
relative_path: &str,
path: &Path,
file_paths: DocumentPaths,
start_level: usize,
cookie: Option<&str>,
censored: bool,
) {
@ -808,7 +806,7 @@ fn handle_relative_connection(
&mut stream,
Settings::default()
.with_handler(entry_handler(path, relative_path, censored))
.with_start_level(start_level)
.with_start_level(1)
.with_use_textboxes(true),
);
}
@ -834,7 +832,7 @@ fn handle_relative_connection(
unreachable!();
};
let _ = writeln!(stream, "<h1>Description</h1>");
let _ = writeln!(stream, "<h2>Description</h2>");
if let Some(audio_path) = &file_paths.audio {
if Path::is_file(audio_path) {
@ -850,7 +848,7 @@ fn handle_relative_connection(
}
TabInfo::Comment(comments) => {
let html = html! {
h1 { "Comments" }
h2 { "Comments" }
form method="POST" {
input type="text" name="name" value="anon" placeholder="Name";
br;