|
|
|
@ -163,10 +163,14 @@ static int write_topbar(int fd, enum page page, const char *id, const char *titl
|
|
|
|
|
rc |= write_buf(fd, ">");
|
|
|
|
|
|
|
|
|
|
if (page == PAGE_ZET) {
|
|
|
|
|
if (title == NULL) {
|
|
|
|
|
rc |= dprintf(fd, " <a href=\"%s\"><strong><code>§%s</code></strong></a>", id, id);
|
|
|
|
|
} else {
|
|
|
|
|
rc |= dprintf(fd, " <a href=\"%s\"><strong>[", id);
|
|
|
|
|
rc |= write_html(fd, title, strlen(title));
|
|
|
|
|
rc |= dprintf(fd, "](<code>§%s</code>)</strong></a>", id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rc |= write_buf(fd, "</form>");
|
|
|
|
|
return rc;
|
|
|
|
@ -757,6 +761,7 @@ static int dpi_serve_zet(int fd, char *path) {
|
|
|
|
|
|
|
|
|
|
char buf[128];
|
|
|
|
|
char *title = zet_get_title_fd(note_fd, buf, sizeof(buf));
|
|
|
|
|
if (title == NULL) title = id;
|
|
|
|
|
rc = lseek(note_fd, 0, SEEK_SET);
|
|
|
|
|
if (rc < 0) return dpi_respond_err(fd, "lseek");
|
|
|
|
|
|
|
|
|
|