PageRenderTime 46ms CodeModel.GetById 35ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/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        
 23        <h3>${_('Who uses Pylons?')}</h3>
 24        <p>A few of the many companies and websites that use Pylons:</p>
 25        
 26        <div class="scrollable" id="company_scroller">
 27            <div class="items">
 28                <div>
 29                    <a href="http://www.adroll.com/"><img src="/images/logos/adroll.jpg" /></a>
 30                    <a href="http://www.bittorrent.com/"><img src="/images/logos/bittorrent.jpg" /></a>
 31                    <a href="http://digg.com/"><img src="/images/logos/digg.jpg" /></a>
 32                </div>
 33                <div>
 34                    <a href="https://www.dropbox.com/"><img src="/images/logos/dropbox.jpg" /></a>
 35                    <a href="http://www.freshbooks.com/"><img src="/images/logos/freshbooks.jpg" /></a>
 36                    <a href="http://www.imagemoversdigital.com/"><img src="/images/logos/imagemoversdigital.jpg" /></a>
 37                </div>
 38                <div>
 39                    <a href="http://www.lolapps.com/"><img src="/images/logos/lolapps.jpg" /></a>
 40                    <a href="http://www.mochimedia.com/"><img src="/images/logos/mochimedia.jpg" /></a>
 41                    <a href="http://www.opera.com/"><img src="/images/logos/opera.jpg" /></a>
 42                </div>
 43                <div>
 44                    <a href="http://oreilly.com/"><img src="/images/logos/oreilly.jpg" /></a>
 45                    <a href="http://saucelabs.com/"><img src="/images/logos/saucelabs.jpg" /></a>
 46                    <a href="http://www.reddit.com/"><img src="/images/logos/reddit.jpg" /></a>
 47                </div>
 48                <div>
 49                    <a href="http://sourceforge.net/"><img src="/images/logos/sourceforge.jpg" /></a>
 50                    <a href="http://www.tineye.com/"><img src="/images/logos/tineye.jpg" /></a>
 51                    <a href="http://www.wetafx.co.nz/"><img src="/images/logos/wetadigital.jpg" /></a>
 52                </div>
 53            </div>
 54        </div>
 55        
 56        <p style="font-size: 0.8em"><strong>Disclaimer:</strong> These companies do not necessarily run their
 57            public websites with Pylons, nor officially endorse Pylons. All logos Trademark
 58            of the respective company.</p>
 59        
 60        <p>${h.link_to('See more companies/sites using Pylons', url='http://wiki.pylonshq.com/display/pylonscommunity/Sites+Using+Pylons')}</p>
 61        
 62        <h3>${_('Plays Well With Others')}</h3>
 63        <p>Pylons is built on <a href="#">Paste</a> and allows and encourages use of your favorite Python components and libraries: </p>
 64        <ol>
 65          <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>
 66          <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>
 67          <li>Helpers: WebHelpers for small HTML snippets, ${h.link_to('FormAlchemy', url=url('formalchemy'))} generates entire forms</li>
 68          <li>Request Dispatching: Routes by default, or plug in your favorite</li>
 69        </ol>
 70        <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>
 71        <h3>Latest Tutorials </h3>
 72        <ul>
 73          <li><a href="http://www.pylonscasts.com/">Pylons screencasts </a></li>
 74          <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>
 75        </ul>
 76      </div>
 77      <div class="yui-u" id="sidebar">
 78        <div id="search">
 79          <form action="/search" method="GET">
 80            <input type="text" name="search" id="search-input" />
 81            <button id="search_button" type="submit">${_('Search')}</button>
 82          </form>
 83        </div>
 84        <div id="news" class="side-section">
 85          <h3>${_('Latest News')}</h3>
 86          <ul>
 87              % for article in c.articles:
 88                <li><strong>${h.link_to(article.title, url=url('article_archives', article=article))}</strong><br />
 89                    ${format.date(article.published)}</li>
 90              % endfor
 91              <li><strong>${h.link_to('More', url=url('articles'))}</strong></li>
 92          </ul>
 93        </div>
 94        <div id="usefull" class="side-section">
 95          <h3>${_('Useful Resources')}</h3>
 96          <p>The Pylons book is now available:</p>
 97          <div style="text-align: center; margin: 0; padding: 0;">
 98              <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;" />
 99          </div>
100          <p>You might be interested to see the production 
101              <a href="http://wiki.pylonshq.com/display/pylonscommunity/Sites+Using+Pylons">sites already using Pylons</a>.
102          </p>
103        </div>
104      </div>
105    </div>
106  </div>
107  <div class="clearfix">&nbsp;</div>
108  <div class="yui-b" id="bottom-content">
109    <div class="yui-gc">
110      <div class="yui-g first">
111        <div class="yui-u first">
112          <h4>${_('Recent Snippets')}</h4>
113          <ul>
114            % for snippet in c.snippets:
115            <li>${h.link_to(snippet.title, url=url('snippet', id=snippet.slug))}<br />
116                ${h.truncate(snippet.description, length=90, whole_word=True)}</li>
117            % endfor
118          </ul>
119        </div>
120        <div class="yui-u">
121          <h4>${_('Recent Pastes')}</h4>
122          <ul>
123              % for paste in c.pastes:
124              <li>${h.link_to(paste.title, url=url('paste', id=paste.old_id or paste.id))}<br />
125                  ${widgets.format_timestamp(paste.created)}<br />
126                  % if len(paste.tags) > 0:
127                  <span class="tagheader">Tags: </span>\
128                      % for tag in paste.tags:
129                          % if tag:
130                          ${h.link_to(tag, url=url('pasties_tag', tag=tag))} 
131                          % endif
132                      % endfor
133                  % endif
134              </li>
135              % endfor
136          </ul>
137        </div>
138      </div>
139      <div class="yui-u" id="bottom-content-sidebar">
140        <div id="join" class="side-section">
141          <h3><a href="http://groups.google.com/group/pylons-discuss">${_('Join the discussion')}</a></h3>
142          <form action="">
143            <p>
144              <label for="join-nam">Name:</label>
145              <input type="text" name="name" id="join-name" class="input" />
146              
147            </p>
148            <p>
149              <label for="join-email">Email:</label>
150              <input type="text" name="eamil" id="join-email" class="input" />
151              
152            </p>
153            <button type="submit">${_('Join Mailing List')}</button>
154          </form>
155        </div>
156      </div>
157    </div>
158  </div>
159</div>
160<%def name="javascript()">
161${parent.javascript()}
162<script>
163$(document).ready(function() {
164    $('#search_button').click(function() {
165        var search = document.getElementById('search-input').value;
166        document.location = '/search#' + escape(search);
167        return false;
168    });
169    $('#company_scroller').scrollable({circular: true}).autoscroll({interval: 5000});
170});
171</script>
172<script type="text/javascript" src="http://www.assoc-amazon.com/s/link-enhancer?tag=groovie-20&o=1">
173</script>
174<noscript>
175    <img src="http://www.assoc-amazon.com/s/noscript?tag=groovie-20" alt="" />
176</noscript>
177</%def>
178<%def name="title()">${parent.title()} - ${_('Home')}</%def>
179<%def name="yui_class()"> class="home"</%def>
180<%inherit file="/layout.mako" />
181<%namespace name="widgets" file="/widgets.mako"/>
182<%def name="styles()">
183${h.auto_discovery_link(url('formatted_articles', format='atom', qualified=True), feed_type='atom', title='PylonsHQ News Feed')}
184${h.auto_discovery_link(url('formatted_snippets', format='atom', qualified=True), feed_type='atom', title='PylonsHQ Snippet Feed')}
185${h.auto_discovery_link(url('formatted_pasties', format='atom', qualified=True), feed_type='atom', title='PylonsHQ Pasties Feed')}
186${parent.styles()}
187</%def>