aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2025-01-05 08:34:26 +0100
committerdefault <nobody@localhost>2025-01-05 08:34:26 +0100
commit17d7e0027abb48040ef989b1894bcd0bc28c9faa (patch)
tree27c9fe19b620da9765c34c8f82b3ee47d197821d
parentc7178f91e71b3684812a34717a7083629efc13de (diff)
Use the site's CSS in the /share page.
-rw-r--r--httpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 73e539d..804ff1b 100644
--- a/httpd.c
+++ b/httpd.c
@@ -169,7 +169,8 @@ const char *share_page = ""
"<html>\n"
"<head>\n"
"<title>%s - snac</title>\n"
-"<meta content=\"width=device-width, initial-scale=1, minimum-scale=1, user-scalable=no\" name=\"viewport\">"
+"<meta content=\"width=device-width, initial-scale=1, minimum-scale=1, user-scalable=no\" name=\"viewport\">\n"
+"<link rel=\"stylesheet\" type=\"text/css\" href=\"%s/style.css\"/>\n"
"<style>:root {color-scheme: light dark}</style>\n"
"</head>\n"
"<body><h1>%s link share</h1>\n"
@@ -310,6 +311,7 @@ int server_get_handler(xs_dict *req, const char *q_path,
*ctype = "text/html";
*body = xs_fmt(share_page,
xs_dict_get(srv_config, "host"),
+ srv_baseurl,
xs_dict_get(srv_config, "host"),
srv_baseurl,
s,