constance

Scripts for generating (an earlier obsolete version of) my personal web site
git clone https://code.djc.id.au/git/constance/
commit 2174d3a069ac25f12709afea97e1822bdb965555
parent 9edfabef9e810fc9e2e44a119bd885ca4cade5db
Author: Dan Callaghan <djc@djc.id.au>
Date:   Tue, 16 Sep 2008 19:58:49 +1000

comment form a bit prettier

Diffstat:
MTODO | 4+++-
Mstatic/css/common.css | 13+++++++++++++
Mtemplates/_entry.xml | 22++++++++++++++++------
3 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/TODO b/TODO
@@ -2,7 +2,6 @@
 - feeds everywhere else
   - RSS as well as Atom
 - monthly archives
-- make comment submission form prettier
 - more styles: blockquote, pre, code, ...?
 - <!-- more -->
 - customisation:
@@ -22,3 +21,6 @@
 - tests!!!!!!!!
 - escape high bytes in URLs (should work properly since the page is UTF-8 anyway, but it seems to confuse at least MSN-Bot (and probably IE) sigh)
   - better means of generating URLs?
+- fix unicode in comments
+  - really, this means cleaning up the whole self.charset crap (move into config) and apply it consistently!
+    - *really*, this means patching or ditching colubrid ergh ...
diff --git a/static/css/common.css b/static/css/common.css
@@ -102,6 +102,19 @@ div.blocksep {
     color: #888;
 }
 
+/* Comment form */
+.entry .commentform label {
+    display: block;
+}
+.entry .commentform input {
+    display: block;
+    width: 30em;
+}
+.entry .commentform textarea {
+    width: 100%;
+    font-size: 1em;
+}
+
 /* Reading log entries */
 .readinglog h3.entrytitle {
     font-size: 1.2em;
diff --git a/templates/_entry.xml b/templates/_entry.xml
@@ -49,14 +49,24 @@ from viewutils import mini_markdown, tag_list
             </p>
             ${block_sep()}
         </div>
-        <div><form method="post" action="${environ.get('SCRIPT_NAME', '')}/${entry.id}/comments/+new">
+        <div class="commentform"><form method="post" action="${environ.get('SCRIPT_NAME', '')}/${entry.id}/comments/+new">
             <p>
-                <label for="commentform-from">Name:</label> <input type="text" id="commentform-from" name="from" /><br />
-                <label for="commentform-author-url">URL:</label> <input type="text" id="commentform-author-url" name="author-url" /><br />
-                <label for="commentform-author-email">E-mail address:</label> <input type="text" id="commentform-author-email" name="author-email" /> (not published)<br />
+                <label for="commentform-from">Name</label>
+                <input type="text" id="commentform-from" name="from" />
             </p>
-            <p><textarea name="comment"></textarea></p>
-            <p><input type="submit" value="Submit" /></p>
+            <p>
+                <label for="commentform-author-email">E-mail address (not published)</label>
+                <input type="text" id="commentform-author-email" name="author-email" />
+            </p>
+            <p>
+                <label for="commentform-author-url">URL</label>
+                <input type="text" id="commentform-author-url" name="author-url" />
+            </p>
+            <p>
+                <label for="commentform-comment">Comment (use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>, no HTML)</label>
+                <textarea id="commentform-comment" name="comment" rows="7" cols="30"></textarea>
+            </p>
+            <p><button type="submit">Submit</button></p>
         </form></div>
     </div>