General refactor

This commit is contained in:
2025-06-09 08:53:29 +02:00
parent e9296b44be
commit 9081853a6f
15 changed files with 43 additions and 72 deletions
+5
View File
@@ -15,6 +15,7 @@ function errorPageRenderer(res, emoji, message) {
res.render("error", {
page_title: app_conf.name,
program: app_conf.program,
app_url: app_conf.app_url,
css_path: path.join(app_conf.paths.css.web, "stylesheet.css"),
js_path: path.join(app_conf.paths.js.web, "error.js"),
error_emoji: emoji,
@@ -124,6 +125,7 @@ router.get("/add", async (req, res) => {
res.render("add", {
page_title: app_conf.name,
program: app_conf.program,
app_url: app_conf.app_url,
css_path: path.join(app_conf.paths.css.web, "stylesheet.css"),
js_path: path.join(app_conf.paths.js.web, "add.js"),
chartjs: app_conf.paths.chartjs.web + "/chart.umd.js",
@@ -143,6 +145,7 @@ router.get("/edit", async (req, res) => {
res.render("edit", {
page_title: app_conf.name,
program: app_conf.program,
app_url: app_conf.app_url,
css_path: path.join(app_conf.paths.css.web, "stylesheet.css"),
js_path: path.join(app_conf.paths.js.web, "edit.js"),
chartjs: app_conf.paths.chartjs.web + "/chart.umd.js",
@@ -203,6 +206,7 @@ router.get("/", async (req, res) => {
res.render("index", {
page_title: app_conf.name,
program: app_conf.program,
app_url: app_conf.app_url,
css_path: path.join(app_conf.paths.css.web, "stylesheet.css"),
js_path: path.join(app_conf.paths.js.web, "index.js"),
map_name_msg: (selected_map_name != "" ? "Using: " + selected_map_name : ""),
@@ -222,6 +226,7 @@ router.get("/about", (req, res) => {
res.render("about", {
page_title: app_conf.name,
program: app_conf.program,
app_url: app_conf.app_url,
css_path: path.join(app_conf.paths.css.web, "stylesheet.css"),
version: app_conf.version
});