diff options
author | June McEnroe <june@causal.agency> | 2020-07-10 11:00:04 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-10 11:00:04 -0400 |
commit | 1f6eacb77c39a7e53acb43b032c4bf3f5de03505 (patch) | |
tree | 29b7230d208d6f1dacf2a97c8dcf2c935c2259ab /html.c | |
parent | Add meta viewport tag (diff) | |
download | scooper-1f6eacb77c39a7e53acb43b032c4bf3f5de03505.tar.gz scooper-1f6eacb77c39a7e53acb43b032c4bf3f5de03505.zip |
Move search help to footer
Diffstat (limited to '')
-rw-r--r-- | html.c | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/html.c b/html.c index 35b9d82..6141514 100644 --- a/html.c +++ b/html.c @@ -46,13 +46,6 @@ enum kcgi_err htmlHead(struct khtmlreq *html, const char *title) { || khtml_closeelem(html, 1); } -static const char *SyntaxURL = { - "https://www.sqlite.org/fts5.html#full_text_query_syntax" -}; -static const char *Columns = { - "network, channel, query, nick, user, target, message" -}; - enum kcgi_err htmlNav(struct khtmlreq *html, const char *network, const char *context) { enum kcgi_err error = 0 @@ -121,13 +114,6 @@ htmlNav(struct khtmlreq *html, const char *network, const char *context) { KATTR_VALUE, label, KATTR__MAX ) - || khtml_putc(html, ' ') - || khtml_attr(html, KELEM_A, KATTR_HREF, SyntaxURL, KATTR__MAX) - || khtml_puts(html, "Syntax") - || khtml_closeelem(html, 1) - || khtml_putc(html, ' ') - || khtml_attr(html, KELEM_SPAN, KATTR_TITLE, Columns, KATTR__MAX) - || khtml_puts(html, "Columns") || khtml_closeelem(html, 1); if (error) return error; @@ -155,3 +141,30 @@ htmlNav(struct khtmlreq *html, const char *network, const char *context) { return khtml_closeelem(html, 2); } + +static const char *SourceURL = "https://git.causal.agency/scooper"; +static const char *SyntaxURL = { + "https://www.sqlite.org/fts5.html#full_text_query_syntax" +}; +static const char *Columns = { + "network, channel, query, nick, user, target, message" +}; + +enum kcgi_err htmlFooter(struct khtmlreq *html) { + return 0 + || khtml_closeto(html, 0) + || khtml_elem(html, KELEM_FOOTER) + || khtml_elem(html, KELEM_SPAN) + || khtml_attr(html, KELEM_A, KATTR_HREF, SourceURL, KATTR__MAX) + || khtml_puts(html, "scooper is AGPLv3+") + || khtml_closeelem(html, 2) + || khtml_putc(html, ' ') + || khtml_elem(html, KELEM_SPAN) + || khtml_attr(html, KELEM_A, KATTR_HREF, SyntaxURL, KATTR__MAX) + || khtml_puts(html, "Search syntax") + || khtml_closeelem(html, 1) + || khtml_putc(html, ' ') + || khtml_attr(html, KELEM_SPAN, KATTR_TITLE, Columns, KATTR__MAX) + || khtml_puts(html, "Columns") + || khtml_closeto(html, 0); +} |