tvote.c: include css - vote - simple cgi voting system for web and gopher
 (HTM) git clone git://src.adamsgaard.dk/vote
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 9f0bfbe30bcc20cbf5a144d8bf087ef24c3447bb
 (DIR) parent 0994d7f990110621e0dec05f95503a65cf4170c6
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Mon, 28 Sep 2020 16:58:52 +0200
       
       vote.c: include css
       
       Diffstat:
         M vote.c                              |      21 ++++++++++++++++-----
       
       1 file changed, 16 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/vote.c b/vote.c
       t@@ -68,8 +68,19 @@ print_html_head()
                printf("<!DOCTYPE html>\n"
                        "<html>\n"
                        "<head>\n"
       -                "\t<link rel=\"stylesheet\" href=\"style.css\" "
       -                "type=\"text/css\" media=\"screen\" />\n"
       +                "        <style type=\"text/css\">\n"
       +                "                body {\n"
       +                "                margin: 40px auto;\n"
       +                "                padding: 30px auto;\n"
       +                "                max-width: 80ex;\n"
       +                "                line-height: 1.6;\n"
       +                "                font-size: 18px;\n"
       +                "                padding: 0 10px;\n"
       +                "        }\n"
       +                "        form { margin: 0; }\n"
       +                "        table.create, input.name, textarea.question, textarea.options "
       +                "{ width: 100%%; }\n"
       +                "        </style>\n"
                        "</head>\n"
                        "<body>\n");
        }
       t@@ -324,20 +335,20 @@ print_poll_create_form()
                        "<tr>\n"
                        "        <td width=\"100%\" class=\"input\">\n"
                        "                <input type=\"text\" name=\"poll\" "
       -                "placeholder=\"Name\" size=\"60\" "
       +                "placeholder=\"Name\" "
                        "autofocus=\"autofocus\" class=\"name\" />\n"
                        "        </td>\n"
                        "</tr>\n"
                        "<tr>\n"
                        "        <td width=\"100%\" class=\"input\">\n"
       -                "                <textarea rows=\"3\" cols=\"60\" name=\"question\" "
       +                "                <textarea rows=\"2\" name=\"question\" "
                        "placeholder=\"Question (first line is header)\" "
                        "class=\"question\"></textarea>\n"
                        "        </td>\n"
                        "</tr>\n"
                        "<tr>\n"
                        "        <td width=\"100%\" class=\"input\">\n"
       -                "       <textarea rows=\"5\" cols=\"60\" name=\"options\" "
       +                "       <textarea rows=\"5\" name=\"options\" "
                        "placeholder=\"Options (one per line)\" class=\"options\"></textarea>\n"
                        "        </td>\n"
                        "</tr>\n"