Linklist:
Fixed a bug that occurs when adding an empty line to the list
This commit is contained in:
parent
5d99e09263
commit
aa2d5186f6
10
blogthon.cgi
10
blogthon.cgi
@ -105,6 +105,7 @@ else:
|
|||||||
|
|
||||||
print ' <div class="screen"><div class="sidebar">'
|
print ' <div class="screen"><div class="sidebar">'
|
||||||
|
|
||||||
|
# Sidebar: Staticpages
|
||||||
if staticpages == "True":
|
if staticpages == "True":
|
||||||
staticpages = []
|
staticpages = []
|
||||||
staticpages_list = glob.glob(staticpages_dir + '*')
|
staticpages_list = glob.glob(staticpages_dir + '*')
|
||||||
@ -123,6 +124,7 @@ if staticpages == "True":
|
|||||||
if monthlist == "True": print ' <br />'
|
if monthlist == "True": print ' <br />'
|
||||||
print ' </div>'
|
print ' </div>'
|
||||||
|
|
||||||
|
# Sidebar: Monthlist
|
||||||
if monthlist == "True":
|
if monthlist == "True":
|
||||||
olddate = ""
|
olddate = ""
|
||||||
print ' <div class="sidebarentry">'
|
print ' <div class="sidebarentry">'
|
||||||
@ -136,14 +138,16 @@ if monthlist == "True":
|
|||||||
if linklist == "True": print ' <br />'
|
if linklist == "True": print ' <br />'
|
||||||
print ' </div>'
|
print ' </div>'
|
||||||
|
|
||||||
|
# Sidebar: Linklist
|
||||||
if linklist == "True":
|
if linklist == "True":
|
||||||
content = open("linklist", "r")
|
|
||||||
print ' <div class="sidebarentry">'
|
print ' <div class="sidebarentry">'
|
||||||
print ' <small>links</small><br />'
|
print ' <small>links</small><br />'
|
||||||
|
content = open("linklist", "r")
|
||||||
for line in content:
|
for line in content:
|
||||||
print ' <a href=' + line.split(" ")[0] + ' target=_blank>' + line.split(" ", 1)[1].strip() + '</a> <br />'
|
if not line.strip() is "":
|
||||||
print ' </div>'
|
print ' <a href=' + line.split(" ")[0] + ' target=_blank>' + line.split(" ", 1)[1].strip() + '</a> <br />'
|
||||||
content.close()
|
content.close()
|
||||||
|
print ' </div>'
|
||||||
|
|
||||||
print ' </div>'
|
print ' </div>'
|
||||||
print ' <div class="content">'
|
print ' <div class="content">'
|
||||||
|
Loading…
Reference in New Issue
Block a user