* breadcrumb navbar should make navigation easier now

This commit is contained in:
shockrah
2021-10-26 18:47:24 -07:00
parent baedfc72ea
commit 1e2ff50214
4 changed files with 58 additions and 38 deletions

View File

@@ -83,11 +83,10 @@ pub fn video(cat: PathBuf, file_base: PathBuf) -> Template {
let file = map_base_vfile(&cat, &file_base);
let cat = cat.to_string_lossy();
// First we have to try and find the file
let mut file_pretty = file.to_string();
for c in ["-", "_", ".mp4", ".mkv", ".webm"] {
file_pretty = file_pretty.replace(c, " ");
for c in [".mp4", ".mkv", ".webm"] {
file_pretty = file_pretty.replace(c, "");
}
h.insert("title", &file_pretty);
@@ -95,6 +94,8 @@ pub fn video(cat: PathBuf, file_base: PathBuf) -> Template {
let url = format!("/clip/{}/{}", &cat, &file);
h.insert("url", &url);
h.insert("desc", &SITEDESC);
h.insert("category", &cat);
h.insert("filename", &file_pretty);
let thumbnail = format!("/thumbnail/{}/{}", cat, file);
h.insert("ogimg", &thumbnail);