about summary refs log tree commit diff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--html.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/html.c b/html.c
index c6b4a42..dbc6631 100644
--- a/html.c
+++ b/html.c
@@ -21,27 +21,7 @@
 
 #include "server.h"
 
-static const char DefaultStyle[] = {
-#include "default.css.h"
-	,'\0'
-};
-
-const char *htmlStylesheet;
-
-static enum kcgi_err stylesheet(struct khtmlreq *html) {
-	if (htmlStylesheet) {
-		return khtml_attr(
-			html, KELEM_LINK,
-			KATTR_REL, "stylesheet",
-			KATTR_HREF, htmlStylesheet,
-			KATTR__MAX
-		);
-	}
-	return 0
-		|| khtml_elem(html, KELEM_STYLE)
-		|| khtml_puts(html, DefaultStyle)
-		|| khtml_closeelem(html, 1);
-}
+const char *htmlStylesheet = "stylesheet.css";
 
 enum kcgi_err htmlHead(struct khtmlreq *html, const char *title) {
 	return khtml_elem(html, KELEM_DOCTYPE)
@@ -49,7 +29,12 @@ enum kcgi_err htmlHead(struct khtmlreq *html, const char *title) {
 		|| khtml_elem(html, KELEM_TITLE)
 		|| khtml_puts(html, title)
 		|| khtml_closeelem(html, 1)
-		|| stylesheet(html)
+		|| khtml_attr(
+			html, KELEM_LINK,
+			KATTR_REL, "stylesheet",
+			KATTR_HREF, htmlStylesheet,
+			KATTR__MAX
+		)
 		|| khtml_elem(html, KELEM_H1)
 		|| khtml_puts(html, title)
 		|| khtml_closeelem(html, 1);