tvote.c: include css - vote - simple cgi voting system for web and gopher | |
git clone git://src.adamsgaard.dk/vote | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 9f0bfbe30bcc20cbf5a144d8bf087ef24c3447bb | |
parent 0994d7f990110621e0dec05f95503a65cf4170c6 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
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… | |
+ "{ 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=\"quest… | |
+ " <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\"></te… | |
" </td>\n" | |
"</tr>\n" |