Commits

Puria Nafisi Azizi  committed b165896 Draft

Default articles retrieve for excerpts, and some additional styling

  • Participants
  • Parent commits 4b9f09d

Comments (0)

Files changed (3)

File smallpress/partials.py

     return dict(articles=articles)
 
 @expose('genshi:smallpress.templates.articles_excerpt')
-def excerpts(all_articles):
+def excerpts(all_articles=None, blog=None):
+    if all_articles is None:
+        all_articles=Article.get_published(blog)
     return articles(all_articles)
 
 @expose('genshi:smallpress.templates.excerpt')

File smallpress/templates/articles_excerpt.html

-<div xmlns:py="http://genshi.edgewall.org/" id="smallpress_articles">
+<ul xmlns:py="http://genshi.edgewall.org/" id="smallpress_articles">
     <py:for each="article in articles">
         ${article.excerpt()}
     </py:for>
-</div>
+</ul>

File smallpress/templates/excerpt.html

-<div xmlns:py="http://genshi.edgewall.org/" class="smallpress_article">
-    <h2>
+<li xmlns:py="http://genshi.edgewall.org/" class="smallpress_article">
+    <h4>
         <a href="${h.plug_url('smallpress', '/view/%s'%article.uid)}">${article.title}</a>
-    </h2>
-</div>
+    </h4>
+</li>