From 3f689068b37923eb768e87ce0f52bfa2720756ce Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Mon, 2 Mar 2009 17:06:22 +0100 Subject: Added a linklist to the sidebar --- blogthon.cgi | 19 +++++++++++++++---- configuration | 1 + linklist | 1 + styles/blogthon.css | 10 +--------- 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 linklist diff --git a/blogthon.cgi b/blogthon.cgi index c82aa3a..8488393 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -28,6 +28,7 @@ style = configuration.get('look', 'style') entries_per_page = configuration.getint('look', 'entries_per_page') monthlist = configuration.get('look', 'monthlist') staticpages = configuration.get('look', 'staticpages') +linklist = configuration.get('look', 'linklist') permalinks = configuration.get('look', 'permalinks') newest_first = configuration.get('look', 'newest_first') @@ -75,27 +76,37 @@ if staticpages: staticpages = [] staticpages_list = glob.glob(staticpages_dir + '*') staticpages_list.sort() - print '
' + print '
' print ' pages
' for staticpage in staticpages_list: title = re.sub('\w+?\/\d+?-', '', staticpage) link = re.sub('\w+?\/', '', staticpage) print '  ' + title + ' 
' - if monthlist and staticpages_list != []: print '
' + if monthlist: print '
' print '
' if monthlist: olddate = "" - print '
' + print '
' print ' months
' for entry in entries: date = time.strftime("%m%Y", entry[0]) date_display = time.strftime("%h %Y", entry[0]) if not olddate == date: - print ' ' + date_display + '
' + print '  ' + date_display + ' 
' olddate = date + if linklist: print '
' print '
' +if linklist: + content = open("linklist", "r") + print '
' + print ' links
' + for line in content: + print '  ' + line.split(" ")[-1].strip() + ' 
' + print '
' + content.close() + print '
' print '
' diff --git a/configuration b/configuration index 68c0285..a468d70 100644 --- a/configuration +++ b/configuration @@ -10,5 +10,6 @@ style: blogthon.css entries_per_page: 20 monthlist: True staticpages: True +linklist: True permalinks: True newest_first: True diff --git a/linklist b/linklist new file mode 100644 index 0000000..dd5449c --- /dev/null +++ b/linklist @@ -0,0 +1 @@ +http://www.thehappy.de thehappy.de diff --git a/styles/blogthon.css b/styles/blogthon.css index 7d7568f..ecaaa63 100644 --- a/styles/blogthon.css +++ b/styles/blogthon.css @@ -64,15 +64,7 @@ a.entrytitle:link, a.entrytitle:hover, a.entrytitle:visited, a.entrytitle:active background: #0F0; } -.monthlist { - font-family: Verdana; - font-size: 12px; - color: #5577BB; - text-align: center; - background: #111; -} - -.staticpages { +.sidebarentry { font-family: Verdana; font-size: 12px; color: #5577BB; -- cgit v1.2.3