diff options
author | Stefan Ritter <xeno@goliath.thehappy.de> | 2009-05-18 21:24:58 +0200 |
---|---|---|
committer | Stefan Ritter <xeno@goliath.thehappy.de> | 2009-05-18 21:24:58 +0200 |
commit | 9cbc71157e16135666af89df34bb8152dbca67a5 (patch) | |
tree | 72f97723f89790d10aaa05b8d528ca218a6f4588 | |
parent | 03a1d02ee3f5b855ccdfc4e8f8a0a794f41bf564 (diff) |
Added 'entry' container around each entry
-rwxr-xr-x | blogthon.cgi | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index a56dc28..b111ac2 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -1,3 +1,4 @@ +w #!/usr/bin/python # This program is free software. It comes without any warranty, to @@ -290,19 +291,19 @@ else: # Staticpage if static_display != "": content = open(staticpages_dir + static_display, "r") - print ' <div class="entry_title">' + re.sub('\d+?-', '', static_display) + '</div>' - print ' <div class="entry_content">' - print ' <p>' + print ' <div class="entry">' + print ' <div class="entry_title">' + re.sub('\d+?-', '', static_display) + '</div>' + print ' <div class="entry_content">' + print ' <p>' for line in content: - print ' ' + line.strip() + '<br />' - print ' </p>' - print ' </div>' - print ' <div class="entry_footer"></div>' - print ' <div class="entry_comments"></div>' - print ' <div class="entry_border_left"></div>' - print ' <div class="entry_border_right"></div>' - print ' <div class="entry_border_top"></div>' - print ' <div class="entry_border_bottom"></div>' + print ' ' + line.strip() + '<br />' + print ' </p>' + print ' </div>' + print ' <div class="entry_footer"></div>' + print ' <div class="entry_border_left"></div>' + print ' <div class="entry_border_right"></div>' + print ' <div class="entry_border_top"></div>' + print ' <div class="entry_border_bottom"></div>' content.close() # Entry else: @@ -318,20 +319,20 @@ else: if post_display == title or not post_display: if allentries_display == "1" or entry_counter < entries_per_page: content = open(entry, "r") + print ' <div class="entry">' if permalinks: - print ' <div class="entry_title"><a href="?p=' + title + '" class="entry_title">' + title + '</a></div>' + print ' <div class="entry_title"><a href="?p=' + title + '" class="entry_title">' + title + '</a></div>' else: - print ' <div class="entry_title">' + title + '</div>' - print ' <div class="entry_content">' + print ' <div class="entry_title">' + title + '</div>' + print ' <div class="entry_content">' for line in content: - print ' ' + line.strip() + '<br />' - print ' </div>' - print ' <div class="entry_footer"></div>' - print ' <div class="entry_comments"></div>' - print ' <div class="entry_border_left"></div>' - print ' <div class="entry_border_right"></div>' - print ' <div class="entry_border_top"></div>' - print ' <div class="entry_border_bottom"></div>' + print ' ' + line.strip() + '<br />' + print ' </div>' + print ' <div class="entry_footer"></div>' + print ' <div class="entry_border_left"></div>' + print ' <div class="entry_border_right"></div>' + print ' <div class="entry_border_top"></div>' + print ' <div class="entry_border_bottom"></div>' # Comments... # ... are shown when post_display and comments_file isn't false @@ -374,8 +375,9 @@ else: if comments == "True": comments_file = glob.glob(entries_dir + title + '.comments') if not comments_file and not post_display: - print ' <div class="entry_comments">' - print ' <a href="?p=' + title + '" class="entry_comments">no comments</a>' + print ' <div class="entry_comments">' + print ' <a href="?p=' + title + '" class="entry_comments">no comments</a>' + print ' </div>' print ' </div>' print '' elif comments_file and not post_display: @@ -383,8 +385,9 @@ else: comments_counter = 0 for line in comments_content: if line.split(".", 1)[0] == "-": comments_counter += 1 - print ' <div class="entry_comments">' - print ' <a href="?p=' + title + '" class="entry_comments">comments (' + str(comments_counter) + ')</a>' + print ' <div class="entry_comments">' + print ' <a href="?p=' + title + '" class="entry_comments">comments (' + str(comments_counter) + ')</a>' + print ' </div>' print ' </div>' print '' comments_content.close() |