Fredrik Håård avatar Fredrik Håård committed 9a43336

new markup with left column

Comments (0)

Files changed (3)

-b6a747a72c2d539db645a8e2c5f73b06c610c8bc example_blaag
+2a369433122603278cb3a6c4b71642cc92206b74 example_blaag
 from genshi.template import TemplateLoader
 from genshi.core import Markup
 class Config(object):
     def __init__(self, path, defaults):
         self.config_parser = SafeConfigParser()
                 return d[option]
             except KeyError:
                 raise NoOptionError(option, section)
     def get(self, section, option):
         return self._get_default(self.config_parser.get, section, option)
     def getboolean(self, section, option):    
         return self._get_default(self.config_parser.getboolean, section, option)
 def get_configuration(path):
     defaults = {
         description = description,
         lastBuildDate = datetime.utcnow(),
         items = items)
 def get_data(entry):
     """Parse the rst in the string entry and return the parts dict"""
     return publish_parts(entry, writer_name="html")
     if os.path.exists(source):
         return open(source).read()
-        return None
+        return ''
 class Article(object): 
     def __init__(self, full=True):
     footer = get_custom(
         config.get('content','custom_path'), 'footer')
+    blurbs = get_custom(
+        config.get('content','custom_path'), 'blurbs')
     defaults = {
         'disqus': disqus,
         'css': config.get('html', 'css_url') + "?" + str(int(time())), #force reload. 
         'author': config.get('content', 'author'),
         'google_analytics': google_analytics,
         'footer': Markup(footer),
+        'blurbs': Markup(blurbs)


       <header class="page">
-      <span py:for="article in articles">
-        <article  id="$article.article_id" class="blog box">
+      <div class="blurbs">
+        <span py:if="blurbs">
+          $blurbs
+        </span>
+        <div class="box blurb">
+          <a href='/rss.xml' class='menu_link'>RSS Feed</a>
+        </div>
+      </div>
+      <div class='blog'>
+        <article py:for="article in articles" id="$article.article_id" class="blog box">
           <div class="document" id="$article.article_id">
           <div class='timestamp'>
             Blaag created $article.timestamp
-      </span>
+        <footer py:if="footer" class="page">
+          <p class="fineprint">$footer</p>
+        </footer>
       <nav class="blogs">
         <a href='/' class='menu_link'>- index -</a>
-        <a href='/rss.xml' class='menu_link'>RSS Feed</a>
         <h4>My recent posts</h4>
         <a py:for="article in all_articles" href='$article.article_url' class='menu_link'>$article.article_title</a>
-      <footer py:if="footer" class="page">
-        <p class="fineprint">$footer</p>
-      </footer>
     <!-- Add JavaScript after this point, it makes the page load faster when client does not need to interpret JS at start -->
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.