From c2eb93d3afd11b5cee4b60df37d6d047d72bab93 Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 10 Jan 2022 19:01:44 -0800 Subject: [PATCH] + Proper linkage in navbar --- api/src/page.rs | 1 + api/templates/list.html.tera | 21 +-------------------- api/templates/navbar.html.tera | 25 +++++++++++++++++++++++++ api/templates/video.html.tera | 17 +---------------- 4 files changed, 28 insertions(+), 36 deletions(-) create mode 100644 api/templates/navbar.html.tera diff --git a/api/src/page.rs b/api/src/page.rs index 42761eb..dd4891e 100644 --- a/api/src/page.rs +++ b/api/src/page.rs @@ -93,6 +93,7 @@ pub fn video(cat: PathBuf, file_base: PathBuf) -> Template { let url = format!("/clip/{}/{}", &cat, &file); h.insert("url", &url); + h.insert("page", "video"); h.insert("desc", &SITEDESC); h.insert("category", &cat); h.insert("filename", &file_pretty); diff --git a/api/templates/list.html.tera b/api/templates/list.html.tera index fe71f79..a69457b 100644 --- a/api/templates/list.html.tera +++ b/api/templates/list.html.tera @@ -32,26 +32,7 @@
- + {% include "navbar" %}

{{title}}

diff --git a/api/templates/navbar.html.tera b/api/templates/navbar.html.tera new file mode 100644 index 0000000..ae386af --- /dev/null +++ b/api/templates/navbar.html.tera @@ -0,0 +1,25 @@ + + diff --git a/api/templates/video.html.tera b/api/templates/video.html.tera index cc82834..72d894a 100644 --- a/api/templates/video.html.tera +++ b/api/templates/video.html.tera @@ -21,22 +21,7 @@
- + {% include "navbar" %}

{{title}}