diff options
-rwxr-xr-x | blogthon.cgi | 18 | ||||
-rw-r--r-- | styles/blogthon.css | 14 |
2 files changed, 27 insertions, 5 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index 7a39863..5dd7d11 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -143,20 +143,28 @@ else: # Show regular entry # Comments are shown when post_display and comments_file comments_file = glob.glob(entries_dir + title + '.comments') if comments_file and post_display: - print ' <br><hr>' + print ' <br /><hr>' comments_file = glob.glob(entries_dir + title + '.comments') comments_content = open(comments_file[0], "r") for line in comments_content: if line.split(".", 1)[0] == "-": - print ' <br />' - print ' <i>' + line.split(".", 1)[1] + '</i><small> wrote at ' + print ' <br />' + print ' <b><i>' + line.split(".", 1)[1].strip() + '</i><small> wrote at ' elif line.split(".", 1)[0] == "+": - print ' ' + line.split(".", 1)[1] + ':</small><br />' + print ' ' + line.split(".", 1)[1].strip() + ':</small></b><br />' else: line = line.split(".", 1)[1] - print ' ' + line.strip() + '<br />' + print ' ' + line.strip() + '<br />' comments_content.close() + # Form for adding comments + print ' <br /><br /><br />' + print ' <form action=# method=get>' + print ' <label for="name">name:</label><input type="text" id="name" name="name">' + print ' <br /><label for="text">text:</label><textarea rows="5" id="text" name="text"></textarea>' + print ' <br /><input type="submit" id="submit" value="post comment">' + print ' </form>' + if comments == "True": comments_file = glob.glob(entries_dir + title + '.comments') if not comments_file and not post_display: diff --git a/styles/blogthon.css b/styles/blogthon.css index 5d6349a..378385e 100644 --- a/styles/blogthon.css +++ b/styles/blogthon.css @@ -84,4 +84,18 @@ a.comment:link, a.comment:hover, a.comment:active, a.comment:visited { font-size: 10px; } +input, textarea { + font-family: Verdana; + font-size: 10px; + display: block; + width: 300px; + background: #333; + color: #FFF; + border: thin dotted; +} + +input#submit { + width: 120px; +} + # vim: set tw=0 ts=4: |