main
cel 5 years ago
parent 9e302395a1
commit 1d1cf89973
Signed by: cel
GPG Key ID: C28D95BB012367EA

@ -210,7 +210,7 @@ static int write_topbar(int fd, enum page page, const char *id, const char *titl
rc |= write_buf(fd, "</form></td>"); rc |= write_buf(fd, "</form></td>");
} }
rc |= write_buf(fd, "</tr></table>"); rc |= write_buf(fd, "</tr></table>\n");
return rc; return rc;
} }
@ -434,7 +434,7 @@ static int dpi_serve_zet_all(int fd) {
"<title>Notes - All</title>" "<title>Notes - All</title>"
"<meta charset=utf-8>" "<meta charset=utf-8>"
"</head>" "</head>"
"<body style=\"margin:0\">"); "<body style=\"margin:0\">\n");
rc |= write_topbar(fd, PAGE_ALL, NULL, NULL); rc |= write_topbar(fd, PAGE_ALL, NULL, NULL);
if (rc < 0) { warn("write"); close(fd); return 0; } if (rc < 0) { warn("write"); close(fd); return 0; }
char errbuf[LINE_MAX] = ""; char errbuf[LINE_MAX] = "";
@ -488,7 +488,7 @@ static int dpi_serve_zet_recent(int fd) {
"<title>Notes - Recent</title>" "<title>Notes - Recent</title>"
"<meta charset=utf-8>" "<meta charset=utf-8>"
"</head>" "</head>"
"<body style=\"margin:0\">"); "<body style=\"margin:0\">\n");
rc |= write_topbar(fd, PAGE_RECENT, NULL, NULL); rc |= write_topbar(fd, PAGE_RECENT, NULL, NULL);
if (rc < 0) { warn("write"); goto cleanup; } if (rc < 0) { warn("write"); goto cleanup; }
char errbuf[LINE_MAX] = ""; char errbuf[LINE_MAX] = "";
@ -589,7 +589,7 @@ static int dpi_serve_zet_search(int fd, char *qs) {
"<title>Notes</title>" "<title>Notes</title>"
"<meta charset=utf-8>" "<meta charset=utf-8>"
"</head>" "</head>"
"<body style=\"margin:0\">" "<body style=\"margin:0\">\n"
); );
rc |= write_topbar(fd, PAGE_SEARCH, query, NULL); rc |= write_topbar(fd, PAGE_SEARCH, query, NULL);
if (rc < 0) { warn("write"); close(fd); return 0; } if (rc < 0) { warn("write"); close(fd); return 0; }
@ -641,7 +641,7 @@ static int dpi_serve_zet_new(int fd) {
"<title>New Note</title>" "<title>New Note</title>"
"<meta charset=utf-8>" "<meta charset=utf-8>"
"</head>" "</head>"
"<body style=\"margin:0\">"); "<body style=\"margin:0\">\n");
write_topbar(fd, PAGE_NEW, NULL, NULL); write_topbar(fd, PAGE_NEW, NULL, NULL);
dprintf(fd, dprintf(fd,
"<table style=\"width:100%%; height:100%%; border-collapse:collapse\"><tr>" "<table style=\"width:100%%; height:100%%; border-collapse:collapse\"><tr>"
@ -877,7 +877,7 @@ static int dpi_serve_zet(int fd, char *path) {
&& (query[5] == '\0' || query[5] == '&' || && (query[5] == '\0' || query[5] == '&' ||
(query[5] == '=' && !(query[6] == '\0' || query[6] == '&'))); (query[5] == '=' && !(query[6] == '\0' || query[6] == '&')));
if (!print) { if (!print) {
rc |= write_buf(fd, "<body style=\"margin:0\">"); rc |= write_buf(fd, "<body style=\"margin:0\">\n");
rc |= write_topbar(fd, PAGE_ZET, id, title); rc |= write_topbar(fd, PAGE_ZET, id, title);
rc |= dprintf(fd, rc |= dprintf(fd,
"<table style=\"width:100%%; height:100%%; border-collapse:collapse\"><tr>" "<table style=\"width:100%%; height:100%%; border-collapse:collapse\"><tr>"

Loading…
Cancel
Save