box.css and bugfixes:

* Added comments in box.css
* Fixed a div bug in blogthon.cgi
* Added containers for form inputs
This commit is contained in:
Stefan Ritter 2009-07-10 00:50:26 +02:00
parent 9553b56291
commit ca145a3d23
2 changed files with 107 additions and 7 deletions

View File

@ -410,18 +410,26 @@ else:
print ' </div>' print ' </div>'
print '' print ''
print ' <div class="comments">' print ' <div class="comments">'
print ' <div>'
notfirstline = 0 # Ugly fix for closing comment containers
for line in comments_content: for line in comments_content:
if line.split(".", 1)[0] == "-": if line.split(".", 1)[0] == "-":
print ' </div>' if notfirstline == 1:
print ' </div>'
print ' </div>'
notfirstline = 0;
print ' <div class="comment">' print ' <div class="comment">'
print ' <div class="comment_author">' + line.split(".", 1)[1].strip() + '</div>' print ' <div class="comment_author">' + line.split(".", 1)[1].strip() + '</div>'
elif line.split(".", 1)[0] == "+": elif line.split(".", 1)[0] == "+":
print ' <div class="comment_date">' + line.split(".", 1)[1].strip() + '</div>' print ' <div class="comment_date">' + line.split(".", 1)[1].strip() + '</div>'
print ' <div class="comment_content">'
else: else:
notfirstline = 1;
line = line.split(".", 1)[1] line = line.split(".", 1)[1]
print ' ' + line.strip() + '<br />' print ' ' + line.strip() + '<br />'
print '' print ''
print ' </div>'
print ' </div>' print ' </div>'
comments_content.close() comments_content.close()
else: else:
@ -436,12 +444,13 @@ else:
print ' <form action="" method="post">' print ' <form action="" method="post">'
print ' <input type="hidden" name="ctitle" value="' + title + '" />' print ' <input type="hidden" name="ctitle" value="' + title + '" />'
print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />' print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />'
print ' <label class="submit_comment_name">name:</label><input type="text" id="cname" name="cname" />' print ' <label class="submit_comment_name">name:</label><input class="submit_comment_name_input" type="text" id="cname" name="cname" />'
print ' <br /><label class="submit_comment_text">text:</label><textarea class="submit_comment_textarea" rows="5" cols="80" id="ctext" name="ctext"></textarea>' print ' <br /><label class="submit_comment_text">text:</label><textarea class="submit_comment_textarea" id="ctext" name="ctext"></textarea>'
print ' <br /><label class="submit_comment_quiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input type="text" id="cquiz" name="cquiz" />' print ' <br /><label class="submit_comment_quiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input class="submit_comment_quiz_input" type="text" id="cquiz" name="cquiz" />'
print ' <br /><input class="submit_comment_button" type="submit" id="submit" value="post comment" />' print ' <br /><input class="submit_comment_button" type="submit" id="submit" value="post comment" />'
print ' </form>' print ' </form>'
print ' </div>' print ' </div>'
print ' <div class="submit_border_bottom"></div>'
print '' print ''
if comments == "True": if comments == "True":

View File

@ -66,6 +66,8 @@ a.atom_link {
text-decoration: none; text-decoration: none;
} }
/* PAGES */
div.pages { div.pages {
position: absolute; position: absolute;
top: 39px; top: 39px;
@ -97,16 +99,18 @@ a.pages_list_entry {
color: #666666; color: #666666;
} }
/* ENTRIES */
div.entries { div.entries {
width: 580px; width: 580px;
background: #333333; background: #333333;
padding-left: 10px; padding-left: 10px;
padding-top: 25px; padding-top: 5px;
padding-right: 10px; padding-right: 10px;
} }
div.entry { div.entry {
margin-bottom: 20px; margin-top: 20px;
background: #444444; background: #444444;
border: 1px dotted #000000; border: 1px dotted #000000;
} }
@ -140,3 +144,90 @@ div.entry_comment {
a.entry_comment { a.entry_comment {
text-decoration: none; text-decoration: none;
} }
div.entry_border_bottom {
background: #333333;
}
/* COMMENTS */
div.comments {
width: 580px;
background: #333333;
padding-left: 20px;
padding-top: 10px;
}
div.comment {
border: 1px dotted #000000;
background: #414141;
width: 560px;
margin-bottom: 10px;
}
div.comment_author {
color: #66CC00;
padding-top: 5px;
padding-left: 5px;
}
div.comment_date {
margin-top: -12px;
margin-right: 5px;
float: right;
color: #666666;
}
div.comment_content {
margin-left: 10px;
margin-bottom: 10px;
width: 540px;
}
div.submit_comment {
border: 1px dotted #000000;
background: #414141;
width: 560px;
}
label.submit_comment_name {
color: #CCCCCC;
font-size: 12px;
display: block;
}
input.submit_comment_name_input {
width: 100px;
margin-left: 10px;
}
label.submit_comment_text {
color: #CCCCCC;
font-size: 12px;
display: block;
}
textarea.submit_comment_textarea {
width: 520px;
margin-left: 10px;
}
label.submit_comment_quiz {
color: #CCCCCC;
font-size: 12px;
display: block;
}
input.submit_comment_quiz_input {
width: 20px;
margin-left: 10px;
}
input.submit_comment_button {
margin: 10px;
}
div.submit_border_bottom {
background: #333333;
height: 10px;
}