diff examples/tutorial/geddit/templates/info.html @ 622:dc35e9882390

GenshiTutorial: add Atom feeds.
author cmlenz
date Thu, 30 Aug 2007 22:49:48 +0000
parents d218020fb92a
children dba522b4c31d
line wrap: on
line diff
--- a/examples/tutorial/geddit/templates/info.html
+++ b/examples/tutorial/geddit/templates/info.html
@@ -5,14 +5,18 @@
   <xi:include href="layout.html" />
   <head>
     <title>${link.title}</title>
+    <link rel="alternate" type="application/atom+xml" title="Geddit: ${link.title}"
+          href="${url('/feed/%s/' % link.id)}" />
   </head>
   <body>
     <h1>${link.title}</h1>
     <a href="${link.url}">${link.url}</a><br />
     posted by ${link.username} at ${link.time.strftime('%x %X')}<br />
-    <a href="${url('/comment/%s/' % link.id)}">comment</a>
+
+    <p><a class="action" href="${url('/comment/%s/' % link.id)}">comment</a></p>
+
     <ul py:if="link.comments" class="comments">
-      <li py:for="comment in link.comments">
+      <li py:for="idx, comment in enumerate(link.comments)" id="comment$idx">
         <strong>${comment.username}</strong>
         at ${comment.time.strftime('%x %X')}
         <blockquote>${comment.content}</blockquote>
Copyright (C) 2012-2017 Edgewall Software