Commit Diff


commit - 3c24af982ca3c4e92e4811979d4f4dedebad7f69
commit + aaed579298dbc6f4880b1fbb4e74641904aaec6a
blob - a40db9d2ddf82688d7d18718327f015101cd6422
blob + 69aa4cf436614a22a1b095740e698be9bc708f57
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -1626,9 +1626,86 @@ gw_template(size_t key, void *arg)
 
 	switch (key) {
 	case (TEMPL_HEAD):
-		kerr = khttp_puts(gw_trans->gw_req, head);
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_META,
+		    KATTR_CONTENT, "initial-scale=1.0, user-scalable=no",
+		    KATTR__MAX);
 		if (kerr != KCGI_OK)
 			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_META,
+		    KATTR_CHARSET, "utf-8",
+		    KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_META,
+		    KATTR_NAME, "msapplication-TileColor",
+		    KATTR_CONTENT, "#da532c", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_META,
+		    KATTR_NAME, "theme-color",
+		    KATTR_CONTENT, "#ffffff", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_LINK,
+		    KATTR_REL, "apple-touch-icon", KATTR_SIZES, "180x180",
+		    KATTR_HREF, "/apple-touch-icon.png", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_LINK,
+		    KATTR_REL, "icon", KATTR_TYPE, "image/png", KATTR_SIZES,
+		    "32x32", KATTR_HREF, "/favicon-32x32.png", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_LINK,
+		    KATTR_REL, "icon", KATTR_TYPE, "image/png", KATTR_SIZES,
+		    "16x16", KATTR_HREF, "/favicon-16x16.png", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_LINK,
+		    KATTR_REL, "manifest", KATTR_HREF, "/site.webmanifest",
+		    KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_LINK,
+		    KATTR_REL, "mask-icon", KATTR_HREF,
+		    "/safari-pinned-tab.svg", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_LINK,
+		    KATTR_REL, "stylesheet", KATTR_TYPE, "text/css",
+		    KATTR_HREF, "/gotweb.css", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			return 0;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			return 0;
 		break;
 	case(TEMPL_HEADER):
 		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
blob - 6e5ce0e1cf0d28cefdbe6472ea26802d786d72bd
blob + db3eb41d68a32c4fb7132f1103b9af4a3612e139
--- gotweb/gotweb_ui.h
+++ gotweb/gotweb_ui.h
@@ -19,28 +19,6 @@
 
 /* general html */
 
-char *head =
-	"<meta name='viewport' content='initial-scale=1.0," \
-	    " user-scalable=no' />" \
-	"<meta charset='utf-8' />" \
-	"<meta name='msapplication-TileColor' content='#da532c' />" \
-	"<meta name='theme-color' content='#ffffff' />" \
-	"<link rel='apple-touch-icon' sizes='180x180'" \
-	    " href='/apple-touch-icon.png' />" \
-	"<link rel='icon' type='image/png' sizes='32x32'" \
-	    " href='/favicon-32x32.png' />" \
-	"<link rel='icon' type='image/png' sizes='16x16'" \
-	    " href='/favicon-16x16.png' />" \
-	"<link rel='manifest' href='/site.webmanifest' />" \
-	"<link rel='mask-icon' href='/safari-pinned-tab.svg'" \
-	    " color='#5bbad5' />" \
-	"<link rel='stylesheet' type='text/css' href='/gotweb.css' />";
-
-char *got_link =
-	"<div id='got_link'>" \
-	"<a href='%s' target='_sotd'><img src='/%s' alt='logo' /></a>" \
-	"</div>";
-
 char *site_link =
 	"<div id='site_link'>" \
 	"<a href='%s'>%s</a> %s %s" \