diff options
Diffstat (limited to 'quoins/templates')
| -rw-r--r-- | quoins/templates/__init__.py | 0 | ||||
| -rw-r--r-- | quoins/templates/blog-master.html | 83 | ||||
| -rw-r--r-- | quoins/templates/delete_comment.html | 60 | ||||
| -rw-r--r-- | quoins/templates/delete_post.html | 89 | ||||
| -rw-r--r-- | quoins/templates/index.html | 71 | ||||
| -rw-r--r-- | quoins/templates/master.html | 24 | ||||
| -rw-r--r-- | quoins/templates/new_comment.html | 44 | ||||
| -rw-r--r-- | quoins/templates/new_post.html | 46 | ||||
| -rw-r--r-- | quoins/templates/post.html | 85 | ||||
| -rw-r--r-- | quoins/templates/save_post.html | 79 | ||||
| -rw-r--r-- | quoins/templates/sitetemplate.html | 18 | ||||
| -rw-r--r-- | quoins/templates/unapproved_comments.html | 78 |
12 files changed, 677 insertions, 0 deletions
diff --git a/quoins/templates/__init__.py b/quoins/templates/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/quoins/templates/__init__.py | |||
diff --git a/quoins/templates/blog-master.html b/quoins/templates/blog-master.html new file mode 100644 index 0000000..a8ad0cc --- /dev/null +++ b/quoins/templates/blog-master.html | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/" | ||
| 6 | py:strip=""> | ||
| 7 | |||
| 8 | <div py:match="div[@id='blog-content']" py:attrs="select('@*')"> | ||
| 9 | |||
| 10 | |||
| 11 | <div id="blog-entries-column"> | ||
| 12 | <div id="blog-entries"> | ||
| 13 | <div py:replace="select('*|text()')" /> | ||
| 14 | </div> | ||
| 15 | </div> | ||
| 16 | |||
| 17 | <div id="blog-navigation-column"> | ||
| 18 | <div id="blog-navigation"> | ||
| 19 | <span py:if="request.identity"> | ||
| 20 | <h3>${tg.identity.user.display_name}</h3> | ||
| 21 | <ul> | ||
| 22 | <li><a href="${tg.url('/logout_handler')}">Logout</a></li> | ||
| 23 | <span py:if="'blog-post' in [x.permission_name for x in tg.identity.user.permissions]"> | ||
| 24 | <li><a href="${quoins.url('/new_post')}">Write post</a></li> | ||
| 25 | <li><a href="${quoins.url('/unapproved_comments')}">Approve comments</a></li> | ||
| 26 | <li py:if="blog and blog.unpublished_posts"> | ||
| 27 | <a href="${quoins.url('/unpublished_posts')}">Draft posts</a> | ||
| 28 | </li> | ||
| 29 | <li py:if="post"> | ||
| 30 | <a href="${quoins.url('/edit_post/%s'%post.id)}">Edit post</a> | ||
| 31 | </li> | ||
| 32 | <li py:if="post"> | ||
| 33 | <a href="${quoins.url('/delete_post/%s'%post.id)}">Delete post</a> | ||
| 34 | </li> | ||
| 35 | </span> | ||
| 36 | </ul> | ||
| 37 | </span> | ||
| 38 | |||
| 39 | <div id="blog-navigation-tags"> | ||
| 40 | <h3>Tags</h3> | ||
| 41 | <ul> | ||
| 42 | <li py:for="tag in blog.tags"> | ||
| 43 | <a href="${quoins.url('/tag/%s'%tag.name)}">${tag.name}</a> | ||
| 44 | </li> | ||
| 45 | </ul> | ||
| 46 | </div> | ||
| 47 | |||
| 48 | <div id="blog-navigation-archive"> | ||
| 49 | <h3>Archive</h3> | ||
| 50 | <ul> | ||
| 51 | <li py:for="year in blog.getYears()"> | ||
| 52 | <a href="${quoins.url('/archive/%s'%year[0])}"> | ||
| 53 | ${year[0]}</a> (${year[1]}) | ||
| 54 | </li> | ||
| 55 | </ul> | ||
| 56 | </div> | ||
| 57 | |||
| 58 | <div id="blog-navigation-authors"> | ||
| 59 | <h3>Authors</h3> | ||
| 60 | <ul> | ||
| 61 | <li py:for="author in blog.authors"> | ||
| 62 | <a href="${quoins.url('/author/%s'%author.user_name)}"> | ||
| 63 | ${author.display_name}</a> | ||
| 64 | </li> | ||
| 65 | </ul> | ||
| 66 | </div> | ||
| 67 | |||
| 68 | <div id="blog-subscribe"> | ||
| 69 | <a href="${quoins.url('/feed/rss2_0')}"> | ||
| 70 | <img id="blog-feed-icon" | ||
| 71 | src="${tg.url('/static/images/feed-icon-20x20.png')}" /> | ||
| 72 | Subscribe to ${blog.title} | ||
| 73 | </a> | ||
| 74 | </div> | ||
| 75 | |||
| 76 | </div> <!-- blog-navigation --> | ||
| 77 | </div> <!-- blog-navigation-column --> | ||
| 78 | |||
| 79 | <div id="blog-footer"></div> | ||
| 80 | |||
| 81 | </div> <!-- blog-content --> | ||
| 82 | |||
| 83 | </html> | ||
diff --git a/quoins/templates/delete_comment.html b/quoins/templates/delete_comment.html new file mode 100644 index 0000000..c2dd171 --- /dev/null +++ b/quoins/templates/delete_comment.html | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <title>${blog.title}</title> | ||
| 12 | </head> | ||
| 13 | |||
| 14 | |||
| 15 | <body> | ||
| 16 | <div id="main"> | ||
| 17 | <div id="blog-content"> | ||
| 18 | |||
| 19 | <div class="blog-post"> | ||
| 20 | |||
| 21 | <div class="blog-comments" id="comments"> | ||
| 22 | |||
| 23 | <form action="${quoins.url('/delete_comment')}" method="post"> | ||
| 24 | <input type="hidden" name="id" value="${comment.id}" /> | ||
| 25 | <input type="hidden" name="confirm" value="1" /> | ||
| 26 | |||
| 27 | <p> Post: | ||
| 28 | <a href="${quoins.url('/post/%s'%comment.post.id)}">${comment.post.title}</a> | ||
| 29 | </p> | ||
| 30 | <p class="blog-comment-header"> | ||
| 31 | <span class="blog-comment-number"> | ||
| 32 | <a href="#comment-${comment.id}"> | ||
| 33 | [ X ] | ||
| 34 | </a> | ||
| 35 | </span> | ||
| 36 | | ||
| 37 | <span class="blog-comment-user" py:if="comment.url"> | ||
| 38 | <a href="${comment.url}">${comment.name}</a> | ||
| 39 | </span> | ||
| 40 | <span class="blog-comment-user" py:if="not comment.url"> | ||
| 41 | ${comment.name} | ||
| 42 | </span> | ||
| 43 | <br /> | ||
| 44 | <span class="blog-comment-date"> | ||
| 45 | ${comment.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 46 | </span> | ||
| 47 | </p> | ||
| 48 | |||
| 49 | <div class="blog-comment" py:content="comment.body" /> | ||
| 50 | |||
| 51 | <input type="submit" value="Delete comment"/> | ||
| 52 | </form> | ||
| 53 | </div> <!-- blog-comments --> | ||
| 54 | </div> <!-- blog-post --> | ||
| 55 | |||
| 56 | </div> <!-- blog-content --> | ||
| 57 | </div> <!-- main --> | ||
| 58 | |||
| 59 | </body> | ||
| 60 | </html> | ||
diff --git a/quoins/templates/delete_post.html b/quoins/templates/delete_post.html new file mode 100644 index 0000000..e237dad --- /dev/null +++ b/quoins/templates/delete_post.html | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <title>${blog.title}</title> | ||
| 12 | |||
| 13 | <link rel="pingback" href="${quoins.absolute_url('/pingback/')}" /> | ||
| 14 | </head> | ||
| 15 | |||
| 16 | |||
| 17 | <body> | ||
| 18 | <div id="main"> | ||
| 19 | <div id="blog-content"> | ||
| 20 | |||
| 21 | <div class="blog-post"> | ||
| 22 | |||
| 23 | <b> Delete this post? </b> | ||
| 24 | <form action="${quoins.url('/delete_post')}" method="post"> | ||
| 25 | <input type="hidden" name="id" value="${post.id}" /> | ||
| 26 | <input type="hidden" name="confirm" value="1" /> | ||
| 27 | |||
| 28 | <input type="submit" value="Delete post"/> | ||
| 29 | </form> | ||
| 30 | |||
| 31 | <div class="blog-post-head"> | ||
| 32 | <h2><a title="Permanent link to ${post.title}" | ||
| 33 | href="${quoins.url('/post/%s'%post.id)}" | ||
| 34 | rel="bookmark">${post.title}</a> | ||
| 35 | </h2> | ||
| 36 | <div class="blog-post-dateline"> | ||
| 37 | Posted by ${post.author.display_name} | ||
| 38 | on ${post.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 39 | </div> | ||
| 40 | </div> <!-- blog-post-head --> | ||
| 41 | |||
| 42 | <div class="blog-post-content"> | ||
| 43 | <div py:content="quoins.get_html(post.long_body)" /> | ||
| 44 | |||
| 45 | </div> <!-- blog-post_content --> | ||
| 46 | |||
| 47 | <div class="blog-comments"> | ||
| 48 | |||
| 49 | <h3>${len(post.comments_and_links)} Comments</h3> | ||
| 50 | |||
| 51 | <ol> | ||
| 52 | <li py:for="i, comment in enumerate(post.comments_and_links)" id="comment-${comment.id}"> | ||
| 53 | <p class="blog-comment-header"> | ||
| 54 | <span class="blog-comment-number"> | ||
| 55 | <a href="#comment-${comment.id}"> | ||
| 56 | [${i + 1}] | ||
| 57 | </a> | ||
| 58 | </span> | ||
| 59 | | ||
| 60 | <span class="blog-comment-user" py:if="comment.author_url"> | ||
| 61 | <a href="${comment.author_url}" rel="nofollow">${comment.author_name}</a> | ||
| 62 | </span> | ||
| 63 | <span class="blog-comment-user" py:if="not comment.author_url"> | ||
| 64 | ${comment.author_name} | ||
| 65 | </span> | ||
| 66 | <br /> | ||
| 67 | <span class="blog-comment-date"> | ||
| 68 | ${comment.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 69 | </span> | ||
| 70 | |||
| 71 | <span py:if="'blog-post' in [x.permission_name for x in tg.identity.user.permissions]"> | ||
| 72 | | ||
| 73 | <a href="${quoins.url('/delete_comment/%s'%comment.id)}"> | ||
| 74 | Delete comment | ||
| 75 | </a> | ||
| 76 | </span> | ||
| 77 | </p> | ||
| 78 | |||
| 79 | <div class="blog-comment" py:content="comment.body" /> | ||
| 80 | </li> | ||
| 81 | </ol> | ||
| 82 | </div> <!-- blog-comments --> | ||
| 83 | </div> <!-- blog-post --> | ||
| 84 | |||
| 85 | </div> <!-- blog-content --> | ||
| 86 | </div> <!-- main --> | ||
| 87 | |||
| 88 | </body> | ||
| 89 | </html> | ||
diff --git a/quoins/templates/index.html b/quoins/templates/index.html new file mode 100644 index 0000000..0935c20 --- /dev/null +++ b/quoins/templates/index.html | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <link rel="alternate" type="application/rss+xml" title="${blog.title}" href="${quoins.url('/feed/rss2_0')}" /> | ||
| 12 | <title>${blog.title}</title> | ||
| 13 | </head> | ||
| 14 | |||
| 15 | |||
| 16 | <body> | ||
| 17 | |||
| 18 | <div id="main" > | ||
| 19 | <div id="blog-content"> | ||
| 20 | |||
| 21 | <div class="blog-post" py:for="post in posts"> | ||
| 22 | <div class="blog-post-head"> | ||
| 23 | <h3><a title="Permanent link to ${post.title}" | ||
| 24 | href="${quoins.url('/post/%s'%post.id)}"> | ||
| 25 | ${post.title}</a> | ||
| 26 | </h3> | ||
| 27 | <p class="dateline"> | ||
| 28 | Posted by | ||
| 29 | <a href="${quoins.url('/author/%s'%post.author.user_name)}"> | ||
| 30 | ${post.author.display_name} | ||
| 31 | </a> | ||
| 32 | on ${post.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 33 | </p> | ||
| 34 | </div> <!-- blog-post-head --> | ||
| 35 | |||
| 36 | <div class="blog-post-content" | ||
| 37 | py:content="quoins.get_html(post.short_body)" /> | ||
| 38 | |||
| 39 | <div class="blog-post-comments"> | ||
| 40 | <a href="${quoins.url('/post/%s#comments'%post.id)}"> | ||
| 41 | ${len(post.approved_comments)} | ||
| 42 | <span py:if="len(post.approved_comments)==1">comment</span> | ||
| 43 | <span py:if="len(post.approved_comments)!=1">comments</span> | ||
| 44 | </a> | ||
| 45 | |||
| 46 | </div> <!-- blog-post-comments --> | ||
| 47 | |||
| 48 | <div class="blog-post-foot"> | ||
| 49 | <div class="tags" py:if="post.tags"> | ||
| 50 | <span id="tags-label">Tags:</span> | ||
| 51 | <span id="tag" py:for="tag in post.tags"> | ||
| 52 | <a title="Search for posts tagged ${tag.name}" | ||
| 53 | href="${quoins.url('/tag/%s'%tag.name)}">${tag.name}</a> </span> | ||
| 54 | </div> | ||
| 55 | </div> | ||
| 56 | |||
| 57 | </div> <!-- blog-post --> | ||
| 58 | |||
| 59 | <div class="blog-paginate"> | ||
| 60 | <span py:if="prev is not None"> | ||
| 61 | <a href="?start=${prev}">Previous five posts</a> | ||
| 62 | </span> | ||
| 63 | <span py:if="next is not None"> | ||
| 64 | <a href="?start=${next}">Next five posts</a> | ||
| 65 | </span> | ||
| 66 | </div> <!-- blog-paginate --> | ||
| 67 | </div> <!-- blog-content --> | ||
| 68 | </div> <!-- main --> | ||
| 69 | |||
| 70 | </body> | ||
| 71 | </html> | ||
diff --git a/quoins/templates/master.html b/quoins/templates/master.html new file mode 100644 index 0000000..cf82a1f --- /dev/null +++ b/quoins/templates/master.html | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:py="http://genshi.edgewall.org/" | ||
| 5 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 6 | py:strip=""> | ||
| 7 | <head py:match="head" py:attrs="select('@*')"> | ||
| 8 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 9 | <title py:replace="''">Your title goes here</title> | ||
| 10 | <meta py:replace="select('*')"/> | ||
| 11 | <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/style.css')}" /> | ||
| 12 | </head> | ||
| 13 | |||
| 14 | <body py:match="body" py:attrs="select('@*')"> | ||
| 15 | <div id="content"> | ||
| 16 | <py:with vars="flash=tg.flash_obj.render('flash', use_js=False)"> | ||
| 17 | <div py:if="flash" py:content="XML(flash)" /> | ||
| 18 | </py:with> | ||
| 19 | <div py:replace="select('*|text()')"/> | ||
| 20 | <!-- End of content --> | ||
| 21 | </div> | ||
| 22 | </body> | ||
| 23 | </html> | ||
| 24 | |||
diff --git a/quoins/templates/new_comment.html b/quoins/templates/new_comment.html new file mode 100644 index 0000000..1c1ae9d --- /dev/null +++ b/quoins/templates/new_comment.html | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <title>${blog.title}</title> | ||
| 12 | </head> | ||
| 13 | |||
| 14 | |||
| 15 | <body> | ||
| 16 | <div id="main"> | ||
| 17 | <div id="blog-content"> | ||
| 18 | |||
| 19 | <div class="blog-post"> | ||
| 20 | <div class="blog-post-head"> | ||
| 21 | <h2><a title="Permanent link to ${post.title}" | ||
| 22 | href="${quoins.url('/post/%s'%post.id)}" | ||
| 23 | rel="bookmark">${post.title}</a> | ||
| 24 | </h2> | ||
| 25 | <p class="dateline"> | ||
| 26 | Posted by ${post.author.display_name} | ||
| 27 | on ${post.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 28 | </p> | ||
| 29 | </div> <!-- blog-post-head --> | ||
| 30 | |||
| 31 | <div class="blog-post-content"> | ||
| 32 | <div py:content="quoins.get_html(post.long_body)" /> | ||
| 33 | |||
| 34 | </div> <!-- blog-post_content --> | ||
| 35 | |||
| 36 | </div> <!-- blog-post --> | ||
| 37 | |||
| 38 | ${form(defaults, action=action)} | ||
| 39 | |||
| 40 | </div> <!-- blog-content --> | ||
| 41 | </div> <!-- main --> | ||
| 42 | |||
| 43 | </body> | ||
| 44 | </html> | ||
diff --git a/quoins/templates/new_post.html b/quoins/templates/new_post.html new file mode 100644 index 0000000..0f38fd8 --- /dev/null +++ b/quoins/templates/new_post.html | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <title>${blog.title}</title> | ||
| 12 | </head> | ||
| 13 | |||
| 14 | |||
| 15 | <body> | ||
| 16 | <div id="main"> | ||
| 17 | <div id="blog-content"> | ||
| 18 | <div py:if="post"> | ||
| 19 | <p py:if="post.published">This post is published.</p> | ||
| 20 | <p py:if="not post.published">This post is a draft and is not yet published.</p> | ||
| 21 | </div> | ||
| 22 | |||
| 23 | ${form(defaults, action=quoins.url('/save_post'))} | ||
| 24 | |||
| 25 | <div id="blog-post-images" py:if="post and post.media"> | ||
| 26 | <h3> Images </h3> | ||
| 27 | <ul> | ||
| 28 | <form action="${quoins.url('/delete_media')}" method="POST"> | ||
| 29 | <input type="hidden" name="post_id" value="${post.id}" /> | ||
| 30 | <li py:for="m in post.media"> | ||
| 31 | <input type="checkbox" name="ids" value="${m.id}" /> <a href="${quoins.url(m)}">${m.name}</a><br /> | ||
| 32 | <img src="${quoins.url(m)}" /> | ||
| 33 | </li> | ||
| 34 | <div class="clear"> | ||
| 35 | <input type="submit" value="Delete marked images" /> | ||
| 36 | </div> | ||
| 37 | </form> | ||
| 38 | </ul> | ||
| 39 | </div> | ||
| 40 | |||
| 41 | </div> | ||
| 42 | |||
| 43 | </div> <!-- main --> | ||
| 44 | |||
| 45 | </body> | ||
| 46 | </html> | ||
diff --git a/quoins/templates/post.html b/quoins/templates/post.html new file mode 100644 index 0000000..72ee748 --- /dev/null +++ b/quoins/templates/post.html | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <title>${blog.title}</title> | ||
| 12 | |||
| 13 | <link rel="pingback" href="${quoins.absolute_url('/pingback/')}" /> | ||
| 14 | </head> | ||
| 15 | |||
| 16 | |||
| 17 | <body> | ||
| 18 | <div id="main"> | ||
| 19 | <div id="blog-content"> | ||
| 20 | |||
| 21 | <div class="blog-post"> | ||
| 22 | <div class="blog-post-head"> | ||
| 23 | <h2><a title="Permanent link to ${post.title}" | ||
| 24 | href="${quoins.url('/post/%s'%post.id)}" | ||
| 25 | rel="bookmark">${post.title}</a> | ||
| 26 | </h2> | ||
| 27 | <div class="blog-post-dateline"> | ||
| 28 | Posted by | ||
| 29 | <a href="${quoins.url('/author/%s'%post.author.user_name)}"> | ||
| 30 | ${post.author.display_name} | ||
| 31 | </a> | ||
| 32 | on ${post.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 33 | </div> | ||
| 34 | </div> <!-- blog-post-head --> | ||
| 35 | |||
| 36 | <div class="blog-post-content"> | ||
| 37 | <div py:content="quoins.get_html(post.long_body)" /> | ||
| 38 | |||
| 39 | </div> <!-- blog-post_content --> | ||
| 40 | |||
| 41 | <div class="blog-comments"> | ||
| 42 | |||
| 43 | <h3>${len(post.comments_and_links)} Comments</h3> | ||
| 44 | |||
| 45 | <ol> | ||
| 46 | <li py:for="i, comment in enumerate(post.comments_and_links)" id="comment-${comment.id}"> | ||
| 47 | <p class="blog-comment-header"> | ||
| 48 | <span class="blog-comment-number"> | ||
| 49 | <a href="#comment-${comment.id}"> | ||
| 50 | [${i + 1}] | ||
| 51 | </a> | ||
| 52 | </span> | ||
| 53 | | ||
| 54 | <span class="blog-comment-user" py:if="comment.author_url"> | ||
| 55 | <a href="${comment.author_url}" rel="nofollow">${comment.author_name}</a> | ||
| 56 | </span> | ||
| 57 | <span class="blog-comment-user" py:if="not comment.author_url"> | ||
| 58 | ${comment.author_name} | ||
| 59 | </span> | ||
| 60 | <br /> | ||
| 61 | <span class="blog-comment-date"> | ||
| 62 | ${comment.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 63 | </span> | ||
| 64 | |||
| 65 | <span py:if="tg.identity and 'blog-post' in [x.permission_name for x in tg.identity.user.permissions]"> | ||
| 66 | | ||
| 67 | <a href="${quoins.url('/delete_comment/%s'%comment.id)}"> | ||
| 68 | Delete comment | ||
| 69 | </a> | ||
| 70 | </span> | ||
| 71 | </p> | ||
| 72 | |||
| 73 | <div class="blog-comment" py:content="comment.body" /> | ||
| 74 | </li> | ||
| 75 | </ol> | ||
| 76 | </div> <!-- blog-comments --> | ||
| 77 | </div> <!-- blog-post --> | ||
| 78 | |||
| 79 | <a py:if="post.allow_comments" href="${quoins.url('/new_comment/%s'%post.id)}">Comment on this post</a> | ||
| 80 | |||
| 81 | </div> <!-- blog-content --> | ||
| 82 | </div> <!-- main --> | ||
| 83 | |||
| 84 | </body> | ||
| 85 | </html> | ||
diff --git a/quoins/templates/save_post.html b/quoins/templates/save_post.html new file mode 100644 index 0000000..d28c16b --- /dev/null +++ b/quoins/templates/save_post.html | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <title>${blog.title}</title> | ||
| 12 | </head> | ||
| 13 | |||
| 14 | |||
| 15 | <body> | ||
| 16 | <div id="main"> | ||
| 17 | <div id="blog-content"> | ||
| 18 | |||
| 19 | <p py:if="uris"> | ||
| 20 | The following links were found in your post. If you would like to send | ||
| 21 | TrackBacks or PingBacks to any of these links, make the appropriate | ||
| 22 | selections below. If any TrackBack URLs you wish to use are not listed, | ||
| 23 | enter one per line in the box below. | ||
| 24 | </p> | ||
| 25 | <p py:if="not uris"> | ||
| 26 | No links were found in your post. If you would like to send | ||
| 27 | TrackBacks for this post, enter one per line in the box below. | ||
| 28 | </p> | ||
| 29 | |||
| 30 | <form action="${quoins.url('/send_linkbacks/%s'%post.id)}" | ||
| 31 | method="post" | ||
| 32 | class="blog-linkback-form"> | ||
| 33 | |||
| 34 | <div py:for="(uri, b64uri, title, lbs, best) in uris"> | ||
| 35 | <a href="${uri}">${title}</a> | ||
| 36 | <ul> | ||
| 37 | <li py:for="lb in lbs"> | ||
| 38 | <label class="fieldlabel"> | ||
| 39 | <input py:if="best==lb" type="radio" name="${b64uri}" | ||
| 40 | value="${lb.type}:${lb.uri}" checked="1" /> | ||
| 41 | <input py:if="best!=lb" type="radio" name="${b64uri}" | ||
| 42 | value="${lb.type}:${lb.uri}" /> | ||
| 43 | ${lb.type}: ${lb.uri} | ||
| 44 | </label> | ||
| 45 | </li> | ||
| 46 | <li py:if="lbs"> | ||
| 47 | <label class="fieldlabel"> | ||
| 48 | <input py:if="not best" type="radio" name="${b64uri}" | ||
| 49 | value="None:" checked="1" /> | ||
| 50 | <input py:if="best" type="radio" name="${b64uri}" | ||
| 51 | value="None:" /> | ||
| 52 | Don't send a TrackBack or PingBack for this URL | ||
| 53 | </label> | ||
| 54 | </li> | ||
| 55 | <li py:if="not lbs"> | ||
| 56 | No TrackBack or PingBack addresses found for this URL | ||
| 57 | </li> | ||
| 58 | </ul> | ||
| 59 | </div> | ||
| 60 | |||
| 61 | <div> | ||
| 62 | <label class="fieldlabel"> | ||
| 63 | Additional TrackBack URLs: | ||
| 64 | <textarea name="trackbacks" rows="4" cols="60"> | ||
| 65 | </textarea> | ||
| 66 | </label> | ||
| 67 | </div> | ||
| 68 | |||
| 69 | <div> | ||
| 70 | <input type="submit" name="submit" value="Submit" /> | ||
| 71 | </div> | ||
| 72 | |||
| 73 | </form> | ||
| 74 | |||
| 75 | </div> | ||
| 76 | </div> <!-- main --> | ||
| 77 | |||
| 78 | </body> | ||
| 79 | </html> | ||
diff --git a/quoins/templates/sitetemplate.html b/quoins/templates/sitetemplate.html new file mode 100644 index 0000000..39f4053 --- /dev/null +++ b/quoins/templates/sitetemplate.html | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 3 | xmlns:py="http://genshi.edgewall.org/" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | py:strip=""> | ||
| 6 | <head py:match="head" py:attrs="select('@*')"> | ||
| 7 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 8 | <title py:replace="''">Your title goes here</title> | ||
| 9 | <link py:for="css in tg_css" py:replace="ET(css.display())" /> | ||
| 10 | <link py:for="js in tg_js_head" py:replace="ET(js.display())" /> | ||
| 11 | <meta py:replace="select('*')" /> | ||
| 12 | </head> | ||
| 13 | <body py:match="body" py:attrs="select('@*')"> | ||
| 14 | <div py:for="js in tg_js_bodytop" py:replace="ET(js.display())" /> | ||
| 15 | <div py:replace="select('*|text()')" /> | ||
| 16 | <div py:for="js in tg_js_bodybottom" py:replace="ET(js.display())" /> | ||
| 17 | </body> | ||
| 18 | </html> | ||
diff --git a/quoins/templates/unapproved_comments.html b/quoins/templates/unapproved_comments.html new file mode 100644 index 0000000..3a17c0e --- /dev/null +++ b/quoins/templates/unapproved_comments.html | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 4 | xmlns:xi="http://www.w3.org/2001/XInclude" | ||
| 5 | xmlns:py="http://genshi.edgewall.org/"> | ||
| 6 | <xi:include href="master.html" /> | ||
| 7 | <xi:include href="blog-master.html" /> | ||
| 8 | |||
| 9 | <head> | ||
| 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> | ||
| 11 | <title>${blog.title}</title> | ||
| 12 | </head> | ||
| 13 | |||
| 14 | |||
| 15 | <body> | ||
| 16 | <div id="main"> | ||
| 17 | <div id="blog-content"> | ||
| 18 | |||
| 19 | <div class="blog-post"> | ||
| 20 | |||
| 21 | <div class="blog-comments" id="comments"> | ||
| 22 | <form action="${quoins.url('/approve_comments')}" method="post"> | ||
| 23 | |||
| 24 | <h3>${len(comments)} unapproved | ||
| 25 | <span py:if="len(comments)==1">comment</span> | ||
| 26 | <span py:if="len(comments)!=1">comments</span> | ||
| 27 | </h3> | ||
| 28 | |||
| 29 | <ol> | ||
| 30 | <li py:for="i, comment in enumerate(comments)" id="comment-${comment.id}"> | ||
| 31 | <p> Post: | ||
| 32 | <a href="${quoins.url('/post/%s'%comment.post.id)}">${comment.post.title}</a> | ||
| 33 | <br/> | ||
| 34 | <label> | ||
| 35 | <input type="radio" name="comment_${comment.id}" value="approve"/> | ||
| 36 | Approve | ||
| 37 | </label> | ||
| 38 | <label> | ||
| 39 | <input type="radio" name="comment_${comment.id}" value="delete"/> | ||
| 40 | Delete | ||
| 41 | </label> | ||
| 42 | <label> | ||
| 43 | <input type="radio" name="comment_${comment.id}" value="ignore"/> | ||
| 44 | Ignore | ||
| 45 | </label> | ||
| 46 | </p> | ||
| 47 | <p class="blog-comment-header"> | ||
| 48 | <span class="blog-comment-number"> | ||
| 49 | <a href="#comment-${comment.id}"> | ||
| 50 | [${i + 1}] | ||
| 51 | </a> | ||
| 52 | </span> | ||
| 53 | | ||
| 54 | <span class="blog-comment-user" py:if="comment.url"> | ||
| 55 | <a href="${comment.url}">${comment.name}</a> | ||
| 56 | </span> | ||
| 57 | <span class="blog-comment-user" py:if="not comment.url"> | ||
| 58 | ${comment.name} | ||
| 59 | </span> | ||
| 60 | <br /> | ||
| 61 | <span class="blog-comment-date"> | ||
| 62 | ${comment.created.strftime('%B %d, %Y at %I:%M %p')} | ||
| 63 | </span> | ||
| 64 | </p> | ||
| 65 | |||
| 66 | <div class="blog-comment" py:content="comment.body" /> | ||
| 67 | </li> | ||
| 68 | </ol> | ||
| 69 | <input type="submit" value="Submit changes"/> | ||
| 70 | </form> | ||
| 71 | </div> <!-- blog-comments --> | ||
| 72 | </div> <!-- blog-post --> | ||
| 73 | |||
| 74 | </div> <!-- blog-content --> | ||
| 75 | </div> <!-- main --> | ||
| 76 | |||
| 77 | </body> | ||
| 78 | </html> | ||
