/kai/templates/home/index.mako

https://bitbucket.org/bbangert/kai/ · Mako · 187 lines · 180 code · 7 blank · 0 comment · 12 complexity · f63e472dde9551759c1d5dc489448d19 MD5 · raw file

  1. <div id="yui-main">
  2. <div id="intro">
  3. <h2>${_("""Pylons is a lightweight web framework <br />
  4. emphasizing flexibility and rapid development.""") | n}</h2>
  5. <div id="download"> <a href="${url('doc_view', url='gettingstarted/', anchor='installing')}">${_('Download Latest')} </a> ${_('Version: %s' % app_globals.current_version)}</div>
  6. </div>
  7. </div>
  8. <div class="yui-b">
  9. <div class="yui-gc">
  10. <div class="yui-u first">
  11. <h3>Pylons merges with repoze.bfg</h3>
  12. <p>The Pylons framework developers have merged efforts with the <a href="http://bfg.repoze.org/">repoze.bfg</a> framework under the <a href="https://github.com/Pylons">Pylons Project</a> banner. <a href="http://docs.pylonsproject.org/">Read about the Pylons Project</a> and the joint effort, the <a href="http://docs.pylonsproject.org/projects/pyramid/dev/">Pyramid web framework</a>, and <a href="http://be.groovie.org/post/1558848023/notes-on-the-pylons-repoze-bfg-merger">notes on the merger</a>. This site will continue to serve the Pylons framework community, and provide documentation and upgrade path information for the existing Pylons framework users.
  13. </p>
  14. <h3>${_('Why use Pylons?')}</h3>
  15. <p>Pylons combines the very best ideas from the worlds of Ruby, Python and Perl, providing a structured but
  16. extremely flexible Python web framework. It's also one of the first projects to leverage the emerging
  17. WSGI standard, which allows extensive re-use and flexibility â&#x20AC;&#x201D; but only if you need it. Out of the box,
  18. Pylons aims to make web development fast, flexible and easy.
  19. ${h.link_to('Find out more', url=url('doc_home'))},
  20. ${h.link_to('install the latest version', url=url('doc_view', url='gettingstarted/', anchor='installing'))},
  21. or <b>${h.link_to('read the new Pylons book', url=url('pylons_book'))}</b>. </p>
  22. <h3>${_('Who uses Pylons?')}</h3>
  23. <p>A few of the many companies and websites that use Pylons:</p>
  24. <div class="scrollable" id="company_scroller">
  25. <div class="items">
  26. <div>
  27. <a href="http://www.adroll.com/"><img src="/images/logos/adroll.jpg" /></a>
  28. <a href="http://www.bittorrent.com/"><img src="/images/logos/bittorrent.jpg" /></a>
  29. <a href="http://digg.com/"><img src="/images/logos/digg.jpg" /></a>
  30. </div>
  31. <div>
  32. <a href="https://www.dropbox.com/"><img src="/images/logos/dropbox.jpg" /></a>
  33. <a href="http://www.freshbooks.com/"><img src="/images/logos/freshbooks.jpg" /></a>
  34. <a href="http://www.imagemoversdigital.com/"><img src="/images/logos/imagemoversdigital.jpg" /></a>
  35. </div>
  36. <div>
  37. <a href="http://www.lolapps.com/"><img src="/images/logos/lolapps.jpg" /></a>
  38. <a href="http://www.mochimedia.com/"><img src="/images/logos/mochimedia.jpg" /></a>
  39. <a href="http://www.opera.com/"><img src="/images/logos/opera.jpg" /></a>
  40. </div>
  41. <div>
  42. <a href="http://oreilly.com/"><img src="/images/logos/oreilly.jpg" /></a>
  43. <a href="http://saucelabs.com/"><img src="/images/logos/saucelabs.jpg" /></a>
  44. <a href="http://www.reddit.com/"><img src="/images/logos/reddit.jpg" /></a>
  45. </div>
  46. <div>
  47. <a href="http://sourceforge.net/"><img src="/images/logos/sourceforge.jpg" /></a>
  48. <a href="http://www.tineye.com/"><img src="/images/logos/tineye.jpg" /></a>
  49. <a href="http://www.wetafx.co.nz/"><img src="/images/logos/wetadigital.jpg" /></a>
  50. </div>
  51. </div>
  52. </div>
  53. <p style="font-size: 0.8em"><strong>Disclaimer:</strong> These companies do not necessarily run their
  54. public websites with Pylons, nor officially endorse Pylons. All logos Trademark
  55. of the respective company.</p>
  56. <p>${h.link_to('See more companies/sites using Pylons', url='http://wiki.pylonshq.com/display/pylonscommunity/Sites+Using+Pylons')}</p>
  57. <h3>${_('Plays Well With Others')}</h3>
  58. <p>Pylons is built on <a href="#">Paste</a> and allows and encourages use of your favorite Python components and libraries: </p>
  59. <ol>
  60. <li>Models: ${h.link_to('SQLAlchemy', url=url('sqlalchemy'))}, ${h.link_to('SQLObject', url=url('sqlobject'))}, ${h.link_to('CouchDB', url=url('python-couchdb'))}, or none at all</li>
  61. <li>Templating: ${h.link_to('Mako', url=url('mako'))}, ${h.link_to('Genshi', url=url('genshi'))}, ${h.link_to('Jinja2', url=url('jinja2'))}, or whatever you like</li>
  62. <li>Helpers: WebHelpers for small HTML snippets, ${h.link_to('FormAlchemy', url=url('formalchemy'))} generates entire forms</li>
  63. <li>Request Dispatching: Routes by default, or plug in your favorite</li>
  64. </ol>
  65. <p><strong>Not sure which one to choose?</strong> No problem! The Pylons documentation recommends a powerful templating engine (Mako) and database ORM (SQLAlchemy) to help you get started.</p>
  66. <h3>Latest Tutorials </h3>
  67. <ul>
  68. <li><a href="http://www.pylonscasts.com/">Pylons screencasts </a></li>
  69. <li><a href="http://wiki.pylonshq.com/display/pylonscookbook/Production+Deployment+Using+Apache,+FastCGI+and+mod_rewrite">Production deployment using Apache, FastCGI and mod_rewrite </a></li>
  70. </ul>
  71. </div>
  72. <div class="yui-u" id="sidebar">
  73. <div id="search">
  74. <form action="/search" method="GET">
  75. <input type="text" name="search" id="search-input" />
  76. <button id="search_button" type="submit">${_('Search')}</button>
  77. </form>
  78. </div>
  79. <div id="news" class="side-section">
  80. <h3>${_('Latest News')}</h3>
  81. <ul>
  82. % for article in c.articles:
  83. <li><strong>${h.link_to(article.title, url=url('article_archives', article=article))}</strong><br />
  84. ${format.date(article.published)}</li>
  85. % endfor
  86. <li><strong>${h.link_to('More', url=url('articles'))}</strong></li>
  87. </ul>
  88. </div>
  89. <div id="usefull" class="side-section">
  90. <h3>${_('Useful Resources')}</h3>
  91. <p>The Pylons book is now available:</p>
  92. <div style="text-align: center; margin: 0; padding: 0;">
  93. <a href="http://www.amazon.com/gp/product/1590599349?ie=UTF8&tag=groovie-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1590599349"><img border="0" src="/images/51Wo6168PaL.jpg"></a><img src="http://www.assoc-amazon.com/e/ir?t=groovie-20&l=as2&o=1&a=1590599349" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
  94. </div>
  95. <p>You might be interested to see the production
  96. <a href="http://wiki.pylonshq.com/display/pylonscommunity/Sites+Using+Pylons">sites already using Pylons</a>.
  97. </p>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="clearfix">&nbsp;</div>
  103. <div class="yui-b" id="bottom-content">
  104. <div class="yui-gc">
  105. <div class="yui-g first">
  106. <div class="yui-u first">
  107. <h4>${_('Recent Snippets')}</h4>
  108. <ul>
  109. % for snippet in c.snippets:
  110. <li>${h.link_to(snippet.title, url=url('snippet', id=snippet.slug))}<br />
  111. ${h.truncate(snippet.description, length=90, whole_word=True)}</li>
  112. % endfor
  113. </ul>
  114. </div>
  115. <div class="yui-u">
  116. <h4>${_('Recent Pastes')}</h4>
  117. <ul>
  118. % for paste in c.pastes:
  119. <li>${h.link_to(paste.title, url=url('paste', id=paste.old_id or paste.id))}<br />
  120. ${widgets.format_timestamp(paste.created)}<br />
  121. % if len(paste.tags) > 0:
  122. <span class="tagheader">Tags: </span>\
  123. % for tag in paste.tags:
  124. % if tag:
  125. ${h.link_to(tag, url=url('pasties_tag', tag=tag))}
  126. % endif
  127. % endfor
  128. % endif
  129. </li>
  130. % endfor
  131. </ul>
  132. </div>
  133. </div>
  134. <div class="yui-u" id="bottom-content-sidebar">
  135. <div id="join" class="side-section">
  136. <h3><a href="http://groups.google.com/group/pylons-discuss">${_('Join the discussion')}</a></h3>
  137. <form action="">
  138. <p>
  139. <label for="join-nam">Name:</label>
  140. <input type="text" name="name" id="join-name" class="input" />
  141. </p>
  142. <p>
  143. <label for="join-email">Email:</label>
  144. <input type="text" name="eamil" id="join-email" class="input" />
  145. </p>
  146. <button type="submit">${_('Join Mailing List')}</button>
  147. </form>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. <%def name="javascript()">
  154. ${parent.javascript()}
  155. <script>
  156. $(document).ready(function() {
  157. $('#search_button').click(function() {
  158. var search = document.getElementById('search-input').value;
  159. document.location = '/search#' + escape(search);
  160. return false;
  161. });
  162. $('#company_scroller').scrollable({circular: true}).autoscroll({interval: 5000});
  163. });
  164. </script>
  165. <script type="text/javascript" src="http://www.assoc-amazon.com/s/link-enhancer?tag=groovie-20&o=1">
  166. </script>
  167. <noscript>
  168. <img src="http://www.assoc-amazon.com/s/noscript?tag=groovie-20" alt="" />
  169. </noscript>
  170. </%def>
  171. <%def name="title()">${parent.title()} - ${_('Home')}</%def>
  172. <%def name="yui_class()"> class="home"</%def>
  173. <%inherit file="/layout.mako" />
  174. <%namespace name="widgets" file="/widgets.mako"/>
  175. <%def name="styles()">
  176. ${h.auto_discovery_link(url('formatted_articles', format='atom', qualified=True), feed_type='atom', title='PylonsHQ News Feed')}
  177. ${h.auto_discovery_link(url('formatted_snippets', format='atom', qualified=True), feed_type='atom', title='PylonsHQ Snippet Feed')}
  178. ${h.auto_discovery_link(url('formatted_pasties', format='atom', qualified=True), feed_type='atom', title='PylonsHQ Pasties Feed')}
  179. ${parent.styles()}
  180. </%def>