aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-08 18:52:03 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-08 18:52:03 +0100
commitc4488c5e810c8a16ff331a7972b02658814adeb1 (patch)
treecd1ad6f4c0d6c337147616aab975f48832f12c81
parentf4c16b8e56f38463ac866223aa68e4582518f7d7 (diff)
downloadslcl-c4488c5e810c8a16ff331a7972b02658814adeb1.tar.gz
page.c: Set common <head> parameters
-rw-r--r--page.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/page.c b/page.c
index c408994..1c6023d 100644
--- a/page.c
+++ b/page.c
@@ -18,7 +18,7 @@
#define DOCTYPE_TAG "<!DOCTYPE html>\n"
#define PROJECT_NAME "slcl"
#define PROJECT_URL "https://gitea.privatedns.org/Xavi92/" PROJECT_NAME
-#define LOGIN_HEAD \
+#define COMMON_HEAD \
" <meta charset=\"UTF-8\">\n" \
" <meta name=\"viewport\"\n" \
" content=\"width=device-width, initial-scale=1,\n" \
@@ -857,7 +857,7 @@ int page_failed_login(struct http_response *const r)
DOCTYPE_TAG
"<html>\n"
" <head>\n"
- " " LOGIN_HEAD "\n"
+ " " COMMON_HEAD "\n"
" " STYLE_A "\n"
" </head>\n"
" <p>Invalid username or password.</p>\n"
@@ -887,7 +887,7 @@ int page_login(struct http_response *const r)
"<html>\n"
" <head>\n"
" " STYLE_A "\n"
- " " LOGIN_HEAD "\n"
+ " " COMMON_HEAD "\n"
" </head>\n"
" " LOGIN_BODY "\n"
"</html>\n";
@@ -913,6 +913,10 @@ int page_forbidden(struct http_response *const r)
static const char body[] =
DOCTYPE_TAG
"<html>\n"
+ " <head>\n"
+ " " PROJECT_TITLE "\n"
+ " " COMMON_HEAD "\n"
+ " </head>\n"
"Forbidden\n"
"</html>";