From 352f786db4c46e8c63dc91e1cb5db575aafe3fbf Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 01 Oct 2017 03:26:37 -0400 Subject: src/html.c: Add basic page and form styles --- (limited to 'src/html.c') diff --git a/src/html.c b/src/html.c index 3a25580..8fa89b9 100644 --- a/src/html.c +++ b/src/html.c @@ -27,6 +27,42 @@ #include "html.h" +static const gchar *styles = + "* {\n" + "margin: 6px;\n" + "padding: 0;\n" + "background: none;\n" + "border: 0 none;\n" + "}\n" + "body {\n" + "background-color: #CFCFCF;\n" + "font-family: sans-serif;\n" + "}\n" + "form input, form select {\n" + "border: 1px solid #9F9F9F;\n" + "border-radius: 3px;\n" + "background-color: #EFEFEF;\n" + "padding: 6px;\n" + "color: #000000;\n" + "transition: all 250ms ease-in-out 0s;\n" + "-moz-transition: all 250ms ease-in-out 0s;\n" + "-wekbit-transition: all 250ms ease-in-out 0s;\n" + "-o-transition: all 250ms ease-in-out 0s;\n" + "}\n" + "form input[type=submit], form input[type=reset] {\n" + "background-color: #DFDFDF;\n" + "}\n" + "form input:hover, form select:hover,\n" + "form input:focus, form select:focus {\n" + "border: 1px solid #4F8FCF;\n" + "outline: 0;\n" + "}\n" + "form input[type=submit]:hover, form input[type=reset]:hover,\n" + "form input[type=submit]:focus, form input[type=reset]:focus {\n" + "background-color: #EFEFEF;\n" + "}\n" + ; + gchar * mq_html_document(const gchar *title, ...) { @@ -41,7 +77,9 @@ mq_html_document(const gchar *title, ...) len += 3; /* "ltr" or "rtl" */ len += strlen("\">\n\n\n"); len += strlen(title); - len += strlen("\n\n\n"); + len += strlen("\n\n\n\n"); va_start(ap, title); while ((child = va_arg(ap, gchar *))) { len += strlen(child); @@ -57,7 +95,9 @@ mq_html_document(const gchar *title, ...) GTK_TEXT_DIR_RTL ? "rtl" : "ltr"); ptr = g_stpcpy(ptr, "\">\n\n\n"); ptr = g_stpcpy(ptr, title); - ptr = g_stpcpy(ptr, "\n\n\n"); + ptr = g_stpcpy(ptr, "\n\n\n\n"); va_start(ap, title); while ((child = va_arg(ap, gchar *))) { ptr = g_stpcpy(ptr, child); -- cgit v0.9.1