Exemplo n.º 1
0
def footer():
    __lineoffset__ = -5
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<div class="row">\n'])
    extend_([u'                <div class="span10 offset2" style="text-align:center">\n'])
    extend_([u'                                <hr/>\n'])
    extend_([u'                                <p>Copyright &copy; Sett Wai. Some Rights Reserved.</p>\n'])
    extend_([u'                                <p>     View this site on <a href="http://github.com/sw00/rigmarolesoup">GitHub</a></p></div>\n'])
    extend_([u'                                                                            </div>\n'])

    return self
Exemplo n.º 2
0
def login_fail (form):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<h1>Admin Login</h1>\n'])
    extend_([u'<form action="" method="post">\n'])
    extend_([escape_(form.render(), False), u'\n'])
    extend_([u'</form>\n'])
    extend_([u'<hr>\n'])
    extend_([u'<div id="failedlogin"><h2><font color="red">Invalid Username or Password</font></div>\n'])

    return self
Exemplo n.º 3
0
def index():
    __lineoffset__ = -5
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    posts = getAllReports()
    extend_([u'\n'])
    for post in loop.setup(posts):
        extend_([escape_(post.date, True), u'\n'])
        extend_([escape_(post.temperature, True), u'\n'])
        extend_([escape_(post.humidity, True), u'\n'])
        extend_([u'<hr>\n'])

    return self
Exemplo n.º 4
0
def solver(answers, clue, err_msg):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    if err_msg:
        extend_([u'    ', escape_(err_msg, False), u'\n'])
    else:
        if answers is not None:
            extend_(['    ', u'    <div id="answer_nav">\n'])
            extend_(['    ', u'    <div id="similarities">\n'])
            extend_(['    ', u'    <b>Score</b><br>\n'])
            for (sim, ans) in loop.setup(answers.sorted_answers()):
                extend_([
                    '        ', u'    ',
                    escape_("{:.0%}".format(sim), True), u' <br>\n'
                ])
            extend_(['    ', u'    </div>\n'])
            extend_(['    ', u'    <div id="answers">\n'])
            extend_(['    ', u'    <b>Answer</b><br>\n'])
            for (sim, ans) in loop.setup(answers.sorted_answers()):
                extend_([
                    '        ', u'    <a href="#ans_header_',
                    escape_(ans, True), u'">',
                    escape_(ans, True), u'</a> <br>\n'
                ])
            extend_(['    ', u'    </div>\n'])
            extend_(['    ', u'    </div>\n'])
            extend_(['    ', u'    <div id="derivations">\n'])
            for (sim, ans) in loop.setup(answers.sorted_answers()[:200]):
                extend_([
                    '                ', u'    <div id="ans_header_',
                    escape_(ans, True), u'"><h2>',
                    escape_(ans, True), u': ',
                    escape_("{:.0%}".format(sim), True), u' </h2>\n'
                ])
                for ann in loop.setup(answers.answer_derivations[ans][:5]):
                    extend_([
                        '                    ', u'    ',
                        escape_(ann.derivation(), True), u' <br>\n'
                    ])
                    extend_([
                        '                    ', u'    ',
                        escape_(ann.long_derivation(), True), u' <br><br>\n'
                    ])
                extend_(['                ', u'    </div>\n'])
            extend_(['    ', u'    </div>\n'])

    return self
Exemplo n.º 5
0
def login (user, form):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<p>You are not logged in.</p>\n'])
    extend_([u'        <p>\n'])
    extend_([u'        <form name="login" method="POST"> \n'])
    extend_([u'        ', escape_(form.render(), False), u'\n'])
    extend_([u'        <input type="submit" name="button" value="Login" />\n'])
    extend_([u'        </form>\n'])
    extend_([u'    </p>\n'])
    extend_([u'    <p> user: '******'</p>\n'])
    extend_([u'\n'])

    return self
Exemplo n.º 6
0
def view (post):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-12">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([u'        <h1>', escape_(post.title, True), u'</h1>\n'])
    extend_([u'        <h3>', escape_(datestr(post.date), True), u'</h3>\n'])
    extend_([u'        <hr>\n'])
    extend_([u'        ', escape_(post.content, False), u'\n'])
    extend_([u'        <br/>\n'])
    extend_([u'        <div id="links" class="links">\n'])
    extend_([u'            <ul class="list-inline">\n'])
    extend_([u'                <li><a href="/view/', escape_(post.url, True), u'">Link</a></li>\n'])
    extend_([u'                <li>\n'])
    extend_([u'                    Tags: &nbsp;\n'])
    for tag in loop.setup(post.tag):
        extend_(['                    ', u'<a href="/tag/', escape_(tag, True), u'">', escape_(tag, True), u'</a>\n'])
    extend_([u'                </li>\n'])
    extend_([u'            </ul>\n'])
    extend_([u'        </div>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])
    extend_([u'<br/>\n'])
    extend_([u'<div id="commentSection">\n'])
    extend_([u'    <div class="container">\n'])
    extend_([u'    <div id="disqus_thread"></div>\n'])
    extend_([u'    <script type="text/javascript">\n'])
    extend_([u'        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */\n'])
    extend_([u"        var disqus_shortname = 'matthewiannucci'; // required: replace example with your forum shortname\n"])
    extend_([u'\n'])
    extend_([u"        /* * * DON'T EDIT BELOW THIS LINE * * */\n"])
    extend_([u'        (function() {\n'])
    extend_([u"            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;\n"])
    extend_([u"            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';\n"])
    extend_([u"            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);\n"])
    extend_([u'        })();\n'])
    extend_([u'    </script>\n'])
    extend_([u'    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>\n'])
    extend_([u'    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>\n'])
    extend_([u'</div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 7
0
def new (form):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-12">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([u'            <h1>New Blog Post</h1>\n'])
    extend_([u'            <form action="" method="post">\n'])
    extend_([u'                ', escape_(form.render_css(), False), u'\n'])
    extend_([u'            </form>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 8
0
def blog(posts):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'<div class="row">\n'])
    extend_([u'        <div class="span8 offset2">\n'])
    extend_([u'                <h2>Blog Posts</h2>\n'])
    extend_([u'                <div class="pull-right">\n'])
    extend_([
        u'                        <button class="btn btn-action" >create</button>\n'
    ])
    extend_([u'                </div>\n'])
    extend_([u'                <table class="table table-striped">\n'])
    extend_([u'                        <tr>\n'])
    extend_([u'                                <th>date</th>\n'])
    extend_([u'                                <th>title</th>\n'])
    extend_([u'                                <th>edit</td>\n'])
    extend_([u'                                <th>delete</td>\n'])
    extend_([u'                        </tr>\n'])
    for p in loop.setup(posts):
        extend_(['                        ', u'    <tr>\n'])
        extend_([
            '                        ', u'            <td>',
            escape_(p.created, True), u'</td>\n'
        ])
        extend_([
            '                        ', u'            <td>',
            escape_(p.title, True), u'</td>\n'
        ])
        extend_([
            '                        ',
            u'            <td><a href="#edit">edit</ad></td>\n'
        ])
        extend_([
            '                        ',
            u'            <td><a href="#delete">[x]</a></td>\n'
        ])
        extend_(['                        ', u'    </tr>\n'])
    extend_([u'                </table>\n'])
    extend_([u'        </div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 9
0
def edit (post, form):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-12">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([u'            <h1>Edit Post: ', escape_(form.d.title, True), u'</h1>\n'])
    extend_([u'            <form action="" method="post">\n'])
    extend_([u'                ', escape_(form.render_css(), False), u'\n'])
    extend_([u'            </form>\n'])
    extend_([u'            <form action="/delete/', escape_(post.url, True), u'" method="post">\n'])
    extend_([u'                <input type="submit" value="Delete post" class="btn btn-danger" style="margin-top:10px;" />\n'])
    extend_([u'            </form>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 10
0
def index():
    __lineoffset__ = -5
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-12 jumbotron jumbotron-index">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([u'            <h1 class="welcomeMessage">Hello, I\'m Matt</h1>\n'])
    extend_([u'\n'])
    extend_([u"            <p>I am an Engineer from Rhode Island with a Bachelor's of Science in Ocean Engineering from the University of Rhode Island. Growing up in Rhode Island, I was drawn to the ocean. While my heart still lives with the sea, my interests shifted in college, driving me towards electronics and software development. I have forged my own path by layering software development talent on top of traditional engineering principles.</p>\n"])
    extend_([u'\n'])
    extend_([u'            <p>I have worked on a variety of projects including autonomous robotic boats, embedded wireless bridge health monitoring systems, mobile apps, and Naval Ship design software.</p>\n'])
    extend_([u'\n'])
    extend_([u'            <a href="/resume" class="btn btn-primary bio-buttons">Resume</a>\n'])
    extend_([u'            <a href="https://github.com/mpiannucci" class="btn btn-primary bio-buttons">Github</a>\n'])
    extend_([u'            <a href="mailto:[email protected]" class="btn btn-primary bio-buttons">Email</a>\n'])
    extend_([u'            <a href="http://www.linkedin.com/pub/matthew-iannucci/7a/884/64a/" class="btn btn-primary bio-buttons">LinkedIn</a>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 11
0
def tagged (tag, posts):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-12">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([u'            <h1>Posts tagged <em>"', escape_(tag, True), u'"</em></h1>\n'])
    extend_([u'            <hr> \n'])
    for post in loop.setup(posts):
        extend_(['                ', u'<ul class="list-inline">\n'])
        extend_(['                ', u'    <li>\n'])
        extend_(['                ', u'        <h3 class="links"><a href="/view/', escape_(post.url, True), u'">', escape_(post.title, True), u'</a></h3>\n'])
        extend_(['                ', u'    </li>\n'])
        extend_(['                ', u'    <li>\n'])
        extend_(['                ', u'        <h3 id="archiveTime">&nbsp; ', escape_(datestr(post.date), True), u'</h3>\n'])
        extend_(['                ', u'    </li>\n'])
        extend_(['                ', u'</ul>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 12
0
def preview(d):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'<div row>\n'])
    extend_([u'        <div class="span10">\n'])
    extend_([u'                <article>\n'])
    extend_([u'                <h3>', escape_(d.title, True), u'</h3>\n'])
    extend_(
        [u'                <small>',
         escape_(d.category, True), u'</small>\n'])
    extend_([u'                <section class="content">\n'])
    extend_([u'                ', escape_(d.content, False), u'\n'])
    extend_([u'                </section>\n'])
    extend_([u'                <footer>\n'])
    extend_([u'                        <p>', escape_(d.tags, True), u'</p>\n'])
    extend_([u'                </footer>\n'])
    extend_([u'                </article>\n'])
    extend_([u'        </div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 13
0
def register(form):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'<!DOCTYPE html>\n'])
    extend_([u'<title>HN Birthday Countdown</title>\n'])
    extend_([u'<center>\n'])
    extend_([
        u'<div style="background-color:#ff6600;min-height:25px;width:85%;">\n'
    ])
    extend_([u'</div>\n'])
    extend_(
        [u'<h1 style="font-family:Verdana;">HN Birthday Countdown!</h1>\n'])
    extend_(
        [u'<body style="font-family:Verdana;background-color:#f6f6ef;">\n'])
    extend_([
        u'Your HN Birthday is the day you created an account on HN!<br>To find out how long\n'
    ])
    extend_([u'until your next HN Birthday, enter your username below!\n'])
    extend_([u'<form method="POST">\n'])
    extend_([u'    ', escape_(form.render(), False), u'\n'])
    extend_([u'</form>\n'])
    extend_([u'</body>\n'])
    extend_([u'</center>\n'])
    extend_([u'<center>\n'])
    extend_([
        u'<footer style="width:100%;height:28px;border-top:1px solid #000000;left:0px;text-align:center;position:absolute;bottom:0;font-size:8pt;">\n'
    ])
    extend_([
        u'Made by dev1n on HN using the very cool <a href="https://www.hnsearch.com/api">HNSearch</a> API\n'
    ])
    extend_([u'</footer>\n'])
    extend_([u'</center>\n'])

    return self
Exemplo n.º 14
0
def index(form, text):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'<html>\n'])
    extend_([u'\n'])
    extend_([u'<head>\n'])
    extend_([u'    <title>Hello</title>\n'])
    extend_([
        u'    <link rel="stylesheet" type="text/css" href="/static/site.css" />\n'
    ])
    extend_([
        u'    <link rel="stylesheet" type="text/css" href="/static/iplot.css" />\n'
    ])
    extend_([u'\n'])
    extend_([
        u'    <script type="text/javascript" src="/static/jquery-1.8.3.min.js"></script>\n'
    ])
    extend_([
        u'    <script type="text/javascript" src="/static/jquery.autosize-min.js"></script>\n'
    ])
    extend_([u'\n'])
    extend_([u'    <script type="text/javascript">\n'])
    extend_([u'        (function(doc, win){\n'])
    extend_([u'            var canvas = null;\n'])
    extend_([u'\n'])
    extend_([u'            ', u'$', u'(doc).ready(function() {\n'])
    extend_([u'                ', u'$', u"('#textfield').autosize();\n"])
    extend_([u'                ', u'$', u"('#example').change(function(){\n"])
    extend_([u'                    var list = ["//test1\\n'])
    extend_([
        u'                        --------------- \u51fd\u6570f(t)=t\u7684\u56fe\u5f62\\n'
    ])
    extend_([
        u'                        -- origin is (200, 300);                                                -- \u8bbe\u7f6e\u539f\u70b9\u7684\u504f\u79fb\u91cf\\n'
    ])
    extend_([
        u'                    -- rot is pi/6;                                                             -- \u8bbe\u7f6e\u65cb\u8f6c\u89d2\u5ea6\\n'
    ])
    extend_([
        u'                    -- scale is (2, 1);                                                 -- \u8bbe\u7f6e\u6a2a\u5750\u6807\u548c\u7eb5\u5750\u6807\u7684\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 200 step 1 draw (t, 0);             -- \u6a2a\u5750\u6807\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                    for T from 0 to 180 step 1 draw (0, t);     -- \u7eb5\u5750\u6807\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                    for T from 0 to 150 step 1 draw (t, t);     -- \u51fd\u6570f(t)=t\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'                    ",\n'])
    extend_([u'                    "//test2\\n'])
    extend_([u'                    --------------- \u56fe\u5f621\uff1a\\n'])
    extend_([
        u' origin is (20, 200);                                                                   -- \u8bbe\u7f6e\u539f\u70b9\u7684\u504f\u79fb\u91cf\\n'
    ])
    extend_([
        u'                    rot is 0;                                                                                           -- \u4e0d\u65cb\u8f6c\\n'
    ])
    extend_([
        u'                    scale is (40, 40);                                                                          -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 2*pi step pi/50 draw (t, -sin(t));          -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                    origin is (20, 240);                                                                        -- \u4e0b\u79fb40\u5355\u4f4d\\n'
    ])
    extend_([
        u'                    for T from 0 to 2*pi step pi/50 draw (t, -sin(t));          -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                    origin is (20, 280);                                                                        -- \u518d\u4e0b\u79fb40\u5355\u4f4d\\n'
    ])
    extend_([
        u'                    for T from 0 to 2*pi step pi/50 draw (t, -sin(t));          -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'\\n'])
    extend_([u'                    --------------- \u56fe\u5f622\uff1a\\n'])
    extend_([
        u' origin is (380, 240);                                                                  -- \u53f3\u79fb\\n'
    ])
    extend_([
        u'                    scale is (80, 80/3);                                                                        -- y\u65b9\u5411\u538b\u7f29\u4e3a\u4e09\u5206\u4e4b\u4e00\\n'
    ])
    extend_([
        u'                    rot is pi/2+0*pi/3 ;                                                                        -- \u65cb\u8f6c\u521d\u503c\u8bbe\u7f6e\\n'
    ])
    extend_([
        u'                    for T from -pi to pi step pi/50 draw (cos(t), sin(t));      -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                    rot is pi/2+2*pi/3;                                                                         -- \u65cb\u8f6c2/3*pi\\n'
    ])
    extend_([
        u'                    for T from -pi to pi step pi/50 draw (cos(t), sin(t));      -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                    rot is pi/2-2*pi/3;                                                                         -- \u518d\u65cb\u8f6c2/3*pi\\n'
    ])
    extend_([
        u'                    for T from -pi to pi step pi/50 draw (cos(t), sin(t));      -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'\\n'])
    extend_([u'                    --------------- \u56fe\u5f623\uff1a\\n'])
    extend_([
        u' origin is(580, 240);                                                                   -- \u518d\u53f3\u79fb\\n'
    ])
    extend_([
        u'                    scale is (80, 80);                                                                          -- \u6062\u590d\u539f\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    rot is 0;                                                                                           -- \u4e0d\u65cb\u8f6c\\n'
    ])
    extend_([
        u'                    for t from 0 to 2*pi step pi/50 draw(cos(t),sin(t));        -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                    for t from 0 to Pi*20 step Pi/50 draw                                       -- \u753bT\u7684\u8f68\u8ff9\\n'
    ])
    extend_([
        u'                            ((1-1/(10/7))*Cos(T)+1/(10/7)*Cos(-T*((10/7)-1)),\\n'
    ])
    extend_([
        u'                                    (1-1/(10/7))*Sin(T)+1/(10/7)*Sin(-T*((10/7)-1)));\\n'
    ])
    extend_([u'                    ",\n'])
    extend_([u'                    "//test3\\n'])
    extend_([
        u'                    --------------- \u51fd\u6570\u590d\u6742\u5ea6\u56fe\u5f62\uff1a\\n'
    ])
    extend_([
        u' rot is 0;                                                                              -- \u4e0d\u65cb\u8f6c\\n'
    ])
    extend_([
        u'                    origin is (50, 400);                                                        -- \u8bbe\u7f6e\u65b0\u539f\u70b9\uff08\u8ddd\u7cfb\u7edf\u9ed8\u8ba4\u539f\u70b9\u7684\u504f\u79fb\u91cf\uff09\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u' scale is (2, 1);                                                               -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 300 step 1 draw (t, 0);                     -- \u6a2a\u5750\u6807\\n'
    ])
    extend_([
        u'                    for T from 0 to 300 step 1 draw (0, -t);            -- \u7eb5\u5750\u6807\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    scale is (2, 1);                                                            -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 300 step 1 draw (t, -t);            -- \u51fd\u6570f(t)=t\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    scale is (2, 0.1);                                                          -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 55 step 1 draw (t, -(t*t));         -- \u51fd\u6570f(t)=t*t\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    scale is (10, 5);                                                           -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 60 step 1 draw (t, -sqrt(t));       -- \u51fd\u6570f(t)=sqrt(t)\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    scale is (20, 0.1);                                                         -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 8 step 0.1 draw (t, -exp(t));       -- \u51fd\u6570f(t)=exp(t)\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    scale is (2, 20);                                                           -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    //for T from 0 to 300 step 1 draw (t, -ln(t));      -- \u51fd\u6570f(t)=ln(t)\u7684\u8f68\u8ff9          //ln \u51fd\u6570\u6682\u65f6\u6ca1\u5b9e\u73b0\u3002\\n'
    ])
    extend_([u'                    ",\n'])
    extend_([u'                    "//test4\\n'])
    extend_([
        u'                    origin is (350, 220);                                       -- \u539f\u70b9\u4f4d\u7f6e\\n'
    ])
    extend_([
        u'                    rot is 0;                                           -- \u65cb\u8f6c\u89d2\u5ea6\u4e3a\u96f6\\n'
    ])
    extend_([
        u'                    scale is (100, 100);                                        -- \u6a2a\u3001\u7eb5\u5750\u6807\u6bd4\u4f8b\u56e0\u5b50\\n'
    ])
    extend_([
        u'                    for t from 0 to 2*pi step pi/100 draw(cos(t), sin(t));      -- \u753b\u56ed\\n'
    ])
    extend_([
        u'                    scale is (150, 150);                                        -- \u6a2a\u3001\u7eb5\u5750\u6807\u6bd4\u4f8b\u56e0\u5b50\\n'
    ])
    extend_([
        u'                    for t from 0 to 2*pi step pi/150 draw(cos(t), sin(t));      -- \u753b\u56ed\\n'
    ])
    extend_([
        u'                    scale is (200, 200);                                        -- \u6a2a\u3001\u7eb5\u5750\u6807\u6bd4\u4f8b\u56e0\u5b50\\n'
    ])
    extend_([
        u'                    for t from 0 to 2*pi step pi/200 draw(cos(t), sin(t));      -- \u753b\u56ed\\n'
    ])
    extend_([u'                    ",\n'])
    extend_([u'                    "//test5\\n'])
    extend_([
        u'                    --------------- \u6d4b\u8bd5f(t)=t*t\u4e0ef(t)=t**2\u7684\u56fe\u5f62\uff1a\\n'
    ])
    extend_([
        u' rot is 0;                                                                              -- \u4e0d\u65cb\u8f6c\\n'
    ])
    extend_([
        u'                    origin is (50, 400);                                                        -- \u8bbe\u7f6e\u65b0\u539f\u70b9\uff08\u8ddd\u7cfb\u7edf\u9ed8\u8ba4\u539f\u70b9\u7684\u504f\u79fb\u91cf\uff09\\n'
    ])
    extend_([
        u' scale is (1, 1);                                                               -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    for T from 0 to 300 step 1 draw (t, 0);                     -- \u6a2a\u5750\u6807\\n'
    ])
    extend_([
        u'                    for T from 0 to 300 step 1 draw (0, -t);            -- \u7eb5\u5750\u6807\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    scale is (2, 0.1);                                                          -- \u8bbe\u7f6e\u6bd4\u4f8b\\n'
    ])
    extend_([
        u'                    for T from 0 to 55 step 1 draw (t, -(t*t));         -- \u51fd\u6570f(t)=t*t\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'\\n'])
    extend_([
        u'                    origin is (150, 400);                                                       -- \u8bbe\u7f6e\u65b0\u539f\u70b9\uff08\u6a2a\u5750\u6807\u53f3\u79fb100\uff09\\n'
    ])
    extend_([
        u' for T from 0 to 55 step 1 draw (t, -(t**2));   -- \u51fd\u6570f(t)=t**2\u7684\u8f68\u8ff9\\n'
    ])
    extend_([u'                    "];\n'])
    extend_([
        u'                    ', u'$', u'("#textfield").get(0).value = list[',
        u'$', u'("#example").val()-1];\n'
    ])
    extend_([u'                    work();\n'])
    extend_([u'                });\n'])
    extend_([
        u'                ', u'$',
        u"('#debug').live('click', function () //\u56e0\u4e3a\u901a\u8fc7ajax\u52a0\u8f7d\u540e\u7684dom,\u8fd9\u8fb9\u7528live\n"
    ])
    extend_([u'                {\n'])
    extend_([u'                    var div2 = ', u'$', u"('#foo');\n"])
    extend_([
        u"                    if (div2.is(':visible')) //\u5982\u679cid\u4e3adiv2\u7684\u533a\u57df\u663e\u793a\n"
    ])
    extend_([u'                    {\n'])
    extend_([u'                        div2.hide(); //\u9690\u85cf\n'])
    extend_([u'                    }\n'])
    extend_([u'                    else\n'])
    extend_([u'                    {\n'])
    extend_([u'                        div2.show();\n'])
    extend_([u'                    }\n'])
    extend_([u'                });\n'])
    extend_([u'                ', u'$', u'("#clear").click(function(){\n'])
    extend_([
        u"                    canvas.getContext('2d').clearRect(0,0,canvas.width,canvas.height);\n"
    ])
    extend_([u'                    ', u'$', u"('#foo').html('');\n"])
    extend_([u'                });\n'])
    extend_([u'\n'])
    extend_([u'                ', u'$', u'("#textfield").keyup(work);\n'])
    extend_([
        u'                //', u'$',
        u'("#textfield").onpaste(work);   //no onpaste?\n'
    ])
    extend_([u'                //', u'$', u'(".button").click(work);\n'])
    extend_([u'\n'])
    extend_(
        [u'                canvas = ', u'$', u'("canvas#canvas").get(0);\n'])
    extend_([u'\n'])
    extend_([u'            });//end ready\n'])
    extend_([u'\n'])
    extend_([u'            var work = function() {\n'])
    extend_([
        u'                var input_string = ', u'$',
        u'("#textfield").val();\n'
    ])
    extend_([u'                ', u'$', u'.ajax({\n'])
    extend_([u'                    url: "/service",\n'])
    extend_([u'                    type: "POST",\n'])
    extend_([u'                    data: {textfield : input_string},\n'])
    extend_([u'                    success: function(data) {\n'])
    extend_([
        u'                        ', u'$',
        u"('#foo').html(data).hide().fadeIn(1500);\n"
    ])
    extend_([u"                        var obj = eval('('+data+')');\n"])
    extend_([
        u"                        var draw = new Draw(canvas, obj['draw']);\n"
    ])
    extend_([u'                    }\n'])
    extend_([u'                });\n'])
    extend_([u'                return false;\n'])
    extend_([u'            };\n'])
    extend_([u'\n'])
    extend_([u'            function Draw(canvas, arr) {\n'])
    extend_([u'                this.canvas = canvas;\n'])
    extend_([u'                this.init(arr);\n'])
    extend_([u'            }\n'])
    extend_([u'\n'])
    extend_([u'            Draw.prototype = {\n'])
    extend_([u'                init: function(arr) {\n'])
    extend_([
        u"                    this.context = this.canvas.getContext('2d');\n"
    ])
    extend_([u'                    this.arr = arr;\n'])
    extend_([u'                    this.run();\n'])
    extend_([u'                },\n'])
    extend_([u'                run: function(){\n'])
    extend_([u'                    for(var i=0; i<this.arr.length; i++){\n'])
    extend_([
        u'                        this.drawing(this.arr[i][0], this.arr[i][1]);\n'
    ])
    extend_([u'                    }\n'])
    extend_([u'                },\n'])
    extend_([u'                drawing: function(x,y) {\n'])
    extend_([u"                    //console.log('drawing('+x+','+y+')');\n"])
    extend_([u'                    this.context.beginPath();\n'])
    extend_([u'                    this.context.moveTo(x,y);\n'])
    extend_([u'                    this.context.lineTo(x+1,y+1);\n'])
    extend_([u'                    this.context.stroke();\n'])
    extend_([u'                }\n'])
    extend_([u'            };\n'])
    extend_([u'        })(document, window)\n'])
    extend_([u'    </script>\n'])
    extend_([u'</head>\n'])
    extend_([u'\n'])
    extend_([u'<body>\n'])
    extend_([u'<div id="container">\n'])
    extend_([
        u'    <h1><span itemprop="name">iplot</span> <small itemprop="description">A simple plotting language.</small></h1>\n'
    ])
    extend_([u'    <h3>Soucre Code</h3>\n'])
    extend_([u'    <form class="form" method="post">\n'])
    extend_([u'        ', escape_(form.render(), False), u'\n'])
    extend_([
        u'        <!--<input class="button" type="submit" value="send"/>-->\n'
    ])
    extend_([u'    </form>\n'])
    extend_([u'    <p id="note"><strong>Example</strong>:\n'])
    extend_([u'        <select id="example">\n'])
    extend_([u'            <option value=1>Test - 1</option>\n'])
    extend_([u'            <option value=2>Test - 2</option>\n'])
    extend_([u'            <option value=3>Test - 3</option>\n'])
    extend_([u'            <option value=4>Test - 4</option>\n'])
    extend_([u'            <option value=5>Test - 5</option>\n'])
    extend_([u'        </select>\n'])
    extend_([u'    </p>\n'])
    extend_([u'    <h3>Graph / <a id="clear" href="#">clear</a></h3>\n'])
    extend_([u'    <canvas id="canvas" width="1000" height="500"></canvas>\n'])
    extend_([u'    <h3 id="debug">Json.data</h3>\n'])
    extend_(
        [u'    <p id="foo" style="display: none;">Json data goes here.</p>\n'])
    extend_([
        u'    <p id="madeby" itemprop="author" itemscope="" itemtype="http://schema.org/Person">Made by \xa9 <a itemprop="url" href="http://tclh123.com/"><strong itemprop="name">tclh123</strong></a>, 2012-2013. / <a href="mailto:[email protected]?subject=iplot" id="email"><strong>Email Me</strong></a>. / <a href="https://github.com/tclh123/iplot"><strong>Github</strong></a>.</p>\n'
    ])
    extend_([u'    <div id="clicki_widget_4960" ></div>\n'])
    extend_([u'</div>\n'])
    extend_([u"<script type='text/javascript'>\n"])
    extend_([u'    (function() {\n'])
    extend_([u"        var c = document.createElement('script');\n"])
    extend_([u"        c.type = 'text/javascript';\n"])
    extend_([u'        c.async = true;\n'])
    extend_([
        u"        c.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'www.clicki.cn/boot/47861';\n"
    ])
    extend_([u"        var h = document.getElementsByTagName('script')[0];\n"])
    extend_([u'        h.parentNode.insertBefore(c, h);\n'])
    extend_([u'    })();\n'])
    extend_([u'</script>\n'])
    extend_([u'</body>\n'])
    extend_([u'</html>\n'])

    return self
Exemplo n.º 15
0
def layout(content):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<!DOCTYPE html>\n'])
    extend_([u'<html lang="en">\n'])
    extend_([u'  <head>\n'])
    extend_([u'    <meta charset="utf-8">\n'])
    extend_([u'    <title>rigmarole soup</title>\n'])
    extend_([
        u'    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n'
    ])
    extend_([u'    <meta name="description" content="">\n'])
    extend_([u'    <meta name="author" content="">\n'])
    extend_([u'\n'])
    extend_([u'    <!-- Le styles -->\n'])
    extend_([
        u'    <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">\n'
    ])
    extend_([u'    <style>\n'])
    extend_([u'      body {\n'])
    extend_([
        u'        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */\n'
    ])
    extend_([u'      }\n'])
    extend_([u'    </style>\n'])
    extend_([
        u'    <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">\n'
    ])
    extend_([u'\n'])
    extend_(
        [u'    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->\n'])
    extend_([u'    <!--[if lt IE 9]>\n'])
    extend_([
        u'      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>\n'
    ])
    extend_([u'    <![endif]-->\n'])
    extend_([u'\n'])
    extend_([u'    <!-- Le fav and touch icons -->\n'])
    extend_([u'    <link rel="shortcut icon" href="favicon.ico">\n'])
    extend_([
        u'    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/bootstrap/ico/apple-touch-icon-144-precomposed.png">\n'
    ])
    extend_([
        u'    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/bootstrap/ico/apple-touch-icon-114-precomposed.png">\n'
    ])
    extend_([
        u'    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/bootstrap/ico/apple-touch-icon-72-precomposed.png">\n'
    ])
    extend_([
        u'    <link rel="apple-touch-icon-precomposed" href="/static/bootstrap/ico/apple-touch-icon-57-precomposed.png">\n'
    ])
    extend_([u'  </head>\n'])
    extend_([u'\n'])
    extend_([u'  <body>\n'])
    extend_([u'\n'])
    extend_([u'    <div class="navbar navbar-inverse navbar-fixed-top">\n'])
    extend_([u'      <div class="navbar-inner">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([
        u'          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">\n'
    ])
    extend_([u'            <span class="icon-bar"></span>\n'])
    extend_([u'            <span class="icon-bar"></span>\n'])
    extend_([u'            <span class="icon-bar"></span>\n'])
    extend_([u'          </a>\n'])
    extend_([u'          <a class="brand" href="#">rigmarole soup</a>\n'])
    extend_([u'          <div class="nav-collapse collapse">\n'])
    extend_([u'            <ul class="nav">\n'])
    extend_([u'              <li class="active"><a href="#">Home</a></li>\n'])
    extend_([u'              <li><a href="#about">About</a></li>\n'])
    extend_([u'              <li><a href="#contact">Contact</a></li>\n'])
    extend_([u'            </ul>\n'])
    extend_([u'          </div><!--/.nav-collapse -->\n'])
    extend_([u'        </div>\n'])
    extend_([u'      </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'\n'])
    extend_([u'    <div class="container">\n'])
    extend_([u'\n'])
    extend_([u'      ', escape_(content, False), u'\n'])
    extend_([u'\n'])
    extend_([u'    </div> <!-- /container -->\n'])
    extend_([u'\n'])
    extend_([u'    <!-- Le javascript\n'])
    extend_([u'    ================================================== -->\n'])
    extend_([
        u'    <!-- Placed at the end of the document so the pages load faster -->\n'
    ])
    extend_([u'    <script src="static/js/jquery-1.8.2.min.js"></script>\n'])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-transition.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-alert.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-modal.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-tab.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-tooltip.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-popover.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-button.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-collapse.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-carousel.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/bootstrap/js/bootstrap-typeahead.js"></script>\n'
    ])
    extend_([u'\n'])
    extend_([u'  </body>\n'])
    extend_([u'</html>\n'])
    extend_([u'\n'])

    return self
Exemplo n.º 16
0
def index():
    __lineoffset__ = -5
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'<%inherit file="layout.html"/>\n'])
    extend_([u'\n'])
    extend_([u'<section id="content">\n'])
    extend_([u'<div class="row">\n'])
    extend_([u'                        <div class="span10">\n'])
    extend_([u'                <h1>rigmarole soup</h1>\n'])
    extend_([u'        </div>\n'])
    extend_([u'</div>\n'])
    extend_([u'        \n'])
    extend_([u'<div class="row">\n'])
    extend_([u'        <div class="span4">\n'])
    extend_([u'                <img src="" class="img-roundeed" />\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <div class="span10 pull-left">\n'])
    extend_([u'                <ul class="thumbnails">\n'])
    extend_([u'                        <li class="span4">\n'])
    extend_([u'                        <div class="thumbnail">\n'])
    extend_([
        u'                                <h3><a href="/blog">blog</a></h3>\n'
    ])
    extend_([
        u'                                <p>Lots of malarkey and opinions.</p>\n'
    ])
    extend_([u'                        </div>\n'])
    extend_([u'                        </li>\n'])
    extend_([u'                        <li class="span4">\n'])
    extend_([u'                                <div class="thumbnail">\n'])
    extend_([
        u'                                        <h3><a href="http://www.github.com/sw00">code</a></h3>\n'
    ])
    extend_([
        u'                                        <p>My Github repositories.</p>\n'
    ])
    extend_([u'                                </div>\n'])
    extend_([u'                                </li>\n'])
    extend_([u'                                <li class="span4">\n'])
    extend_([u'                                <div class="thumbnail">\n'])
    extend_([
        u'                                        <h3><a href="http://flickr.com/settface">photos</a></h3>\n'
    ])
    extend_([u'                                        <p>My flickr</p>\n'])
    extend_([u'                                </div>\n'])
    extend_([u'                                </li>\n'])
    extend_([u'                                <li class="span4">\n'])
    extend_([u'                                <div class="thumbnail">\n'])
    extend_([
        u'                                        <h3><a href="/social">social</a></h3>\n'
    ])
    extend_([
        u'                                        <p>Twitter, Facebook, Google+, Last.fm.</p>\n'
    ])
    extend_([u'                                </div>\n'])
    extend_([u'                                </li>\n'])
    extend_([u'                </ul>                   \n'])
    extend_([u'        </div>\n'])
    extend_([u'</div>\n'])
    extend_([u'</section>\n'])
    extend_([u'\n'])
    extend_([u'<%include file="footer.html"/>\n'])

    return self
Exemplo n.º 17
0
def base(page):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<html>\n'])
    extend_([u'<head>\n'])
    extend_([
        u'    <meta name="viewport" content="width=device-width, initial-scale=1">\n'
    ])
    extend_([u'    <title>PiMonitor</title>\n'])
    extend_([
        u'    <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />\n'
    ])
    extend_([
        u'    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">\n'
    ])
    extend_([
        u'    <link rel="stylesheet" type="text/css" href="/static/pimonitor.css" />\n'
    ])
    extend_([
        u'    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>\n'
    ])
    extend_([
        u'    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n'
    ])
    extend_([
        u'    <script src="/static/Scripts/pimonitor.js" type="text/javascript"></script>\n'
    ])
    extend_([u'</head>\n'])
    extend_([u'\n'])
    extend_([u'<body>\n'])
    extend_([u'    <!-- Navigation Bar -->\n'])
    extend_([
        u'    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">\n'
    ])
    extend_([u'        <div class="container">\n'])
    extend_([
        u'            <!-- Brand and toggle get grouped for better mobile display -->\n'
    ])
    extend_([u'            <div class="navbar-header">\n'])
    extend_([
        u'                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">\n'
    ])
    extend_([
        u'                    <span class="sr-only">Toggle navigation</span>\n'
    ])
    extend_([u'                    <span class="icon-bar"></span>\n'])
    extend_([u'                    <span class="icon-bar"></span>\n'])
    extend_([u'                    <span class="icon-bar"></span>\n'])
    extend_([u'                </button>\n'])
    extend_([
        u'                <a class="navbar-brand" href="http://blog.mpiannucci.com/">Matthew Iannucci</a>\n'
    ])
    extend_([u'            </div>\n'])
    extend_([
        u'            <!-- Collect the nav links, forms, and other content for toggling -->\n'
    ])
    extend_([
        u'            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">\n'
    ])
    extend_([u'                <ul class="nav navbar-nav">\n'])
    extend_([u'                    <li>\n'])
    extend_([
        u'                        <a href="http://blog.mpiannucci.com/blog">Blog</a>\n'
    ])
    extend_([u'                    </li>\n'])
    extend_([u'                    <li>\n'])
    extend_([
        u'                        <a href="http://blog.mpiannucci.com/apps">Projects</a>\n'
    ])
    extend_([u'                    </li>\n'])
    extend_([u'                    <li>\n'])
    extend_([
        u'                        <a href="http://blog.mpiannucci.com/bio">About</a>\n'
    ])
    extend_([u'                    </li>\n'])
    extend_([u'                </ul>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <!-- /.navbar-collapse -->\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <!-- /.container -->\n'])
    extend_([u'    </nav>\n'])
    extend_([
        u'<!--     <header class="jumbotron map_jumbotron" id="mainheader">\n'
    ])
    extend_([u'        <div  class="container">\n'])
    extend_([u'            <h1>MapGetter</h1>\n'])
    extend_([
        u'            <p>Get static images of a central area with coordinates in meters</p>\n'
    ])
    extend_([u'            <em>Images courtesy of Google Maps</em>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </header> -->\n'])
    extend_([u'    <div  class="container">\n'])
    extend_([u'        <div class="row">\n'])
    extend_(
        [u'            <div class="col-sm-12 text-center" id="mapImage">\n'])
    extend_([u'                ', escape_(page, False), u'\n'])
    extend_([u'            </div>\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <div class="row">\n'])
    extend_(
        [u'            <div class="col-sm-12 text-center" id="mainfooter">\n'])
    extend_([u'                <p>Copyright 2015, Matthew Iannucci</p>\n'])
    extend_([u'            </div>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</body>\n'])
    extend_([u'</html>\n'])

    return self
Exemplo n.º 18
0
def index(self, posts):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'\n'])
    extend_([
        escape_(
            template.header('blog.rigmarolesoup',
                            ['dev', 'pol', 'mus', 'art', 'sci', 'fil']),
            False), u'\n'
    ])
    extend_([u'<section id="content">\n'])
    extend_([u'<div class="row row-fluid" id="content">\n'])
    extend_([u'        <div class="span8" id="content-blogs">\n'])
    for p in loop.setup(posts):
        extend_(['        ', u'    <article>\n'])
        extend_(['        ', u'    <header style="text-align:center">\n'])
        extend_([
            '        ', u'    <h3><a href="p/',
            escape_(p.title, True), u'" title="',
            escape_(p.title, False), u'">',
            escape_((p.title), True), u'</a></h3>\n'
        ])
        extend_([
            '        ', u'    <small class="pull-right">',
            escape_((p.created), True), u'</small>\n'
        ])
        extend_(['        ', u'    <div class="btn-group">\n'])
        extend_([
            '        ',
            u'            <a href="#edit" class="btn btn-mini">edit</a>\n'
        ])
        extend_([
            '        ',
            u'            <a href="#delete" class="btn btn-mini">delete</a>\n'
        ])
        extend_(['        ', u'    </div>\n'])
        extend_(['        ', u'    </header>\n'])
        extend_(['        ', u'    <div class="body">\n'])
        extend_([
            '        ', u'                    ',
            escape_(p.body, False), u'\n'
        ])
        extend_(['        ', u'            </div>\n'])
        extend_(['        ', u'            <footer>\n'])
        extend_(['        ', u'            <hr/>\n'])
        extend_(['        ', u'            </footer>\n'])
    extend_([u'        </article>\n'])
    extend_([u'</div>\n'])
    extend_([u'<div class="span2 pull-left" id="aside">\n'])
    extend_([u'        <form id="search" action="search" method="POST">\n'])
    extend_([
        u'                <input type="search" placeholder="search..."></input>\n'
    ])
    extend_([u'        </form>\n'])
    extend_([u'        <hr/>\n'])
    extend_([u'        <h4>Categories</h4>\n'])
    extend_([u'        <ul>\n'])
    extend_([u'                <li>stuff</li>\n'])
    extend_([u'        </ul>\n'])
    extend_([u'</div>\n'])
    extend_([u'</div>\n'])
    extend_([u'</section>\n'])
    extend_([u'<script type="text/javascript" language="javascript">\n'])
    extend_([u'        \n'])
    extend_([u'</script>\n'])

    return self
Exemplo n.º 19
0
def layout():
    __lineoffset__ = -5
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<!DOCTYPE html>\n'])
    extend_([u'<html lang="en">\n'])
    extend_([u'  <head>\n'])
    extend_([u'    <meta charset="utf-8">\n'])
    extend_([u'        <title>', escape_((title), True), u'</title>\n'])
    extend_([u'        <meta name="robots" content="noindex, nofollow">\n'])
    extend_([u'    <meta name="viewport" content="width=device-width, initial-scale=1.0">\n'])
    extend_([u'    <meta name="description" content="">\n'])
    extend_([u'    <meta name="author" content="">\n'])
    extend_([u'\n'])
    extend_([u'    <!-- Le styles -->\n'])
    extend_([u'    <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">\n'])
    extend_([u'                <link href="/static/css/site.css" rel="stylesheet">\n'])
    extend_([u'\n'])
    extend_([u'    <style>\n'])
    extend_([u'      body {\n'])
    extend_([u'        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */\n'])
    extend_([u'      }\n'])
    extend_([u'    </style>\n'])
    extend_([u'    <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">\n'])
    extend_([u'\n'])
    extend_([u'    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->\n'])
    extend_([u'    <!--[if lt IE 9]>\n'])
    extend_([u'      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>\n'])
    extend_([u'    <![endif]-->\n'])
    extend_([u'\n'])
    extend_([u'    <!-- Le fav and touch icons -->\n'])
    extend_([u'<!--    <link rel="shortcut icon" href="favicon.ico">\n'])
    extend_([u'    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/bootstrap/ico/apple-touch-icon-144-precomposed.png">\n'])
    extend_([u'    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/bootstrap/ico/apple-touch-icon-114-precomposed.png">\n'])
    extend_([u'    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/bootstrap/ico/apple-touch-icon-72-precomposed.png">\n'])
    extend_([u'        <link rel="apple-touch-icon-precomposed" href="/static/bootstrap/ico/apple-touch-icon-57-precomposed.png">-->\n'])
    extend_([u'  </head>\n'])
    extend_([u'\n'])
    extend_([u'  <body>\n'])
    extend_([u'\n'])
    extend_([u'        ', escape_((self.body()), True), u'\n'])
    extend_([u'\n'])
    extend_([u'    <!-- Le javascript\n'])
    extend_([u'    ================================================== -->\n'])
    extend_([u'    <!-- Placed at the end of the document so the pages load faster -->\n'])
    extend_([u'    <script src="static/js/jquery-1.8.2.min.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-transition.js"></script>\n'])
    extend_([u'<!--    <script src="/static/bootstrap/js/bootstrap-alert.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-modal.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-tab.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-tooltip.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-popover.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-button.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-collapse.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-carousel.js"></script>\n'])
    extend_([u'    <script src="/static/bootstrap/js/bootstrap-typeahead.js"></script>\n'])
    extend_([u'        -->\n'])
    extend_([u'  </body>\n'])
    extend_([u'</html>\n'])
    extend_([u'\n'])

    return self
Exemplo n.º 20
0
def index(server):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult()
    extend_ = self.extend
    extend_([u'<html>\n'])
    extend_([u'  <head>\n'])
    extend_([
        u"    <link href='/static/css/crypticweb.css' rel='stylesheet' type='text/css'>\n"
    ])
    extend_([
        u'    <script type="text/javascript" src="/static/jquery/js/jquery-1.9.1.js"></script>\n'
    ])
    extend_([
        u'    <script type="text/javascript" src="/static/jquery/js/jquery-ui-1.10.1.custom.min.js"></script>\n'
    ])
    extend_([
        u'    <script type="text/javascript">var SERVER="',
        escape_(server, True), u'"</script>\n'
    ])
    extend_([
        u'    <script type="text/javascript" src="/static/js/client.js"></script>\n'
    ])
    extend_([u'  </head>\n'])
    extend_([u'  <body>\n'])
    extend_([u'    <div class="page">\n'])
    extend_([u'      <div class="header">\n'])
    extend_([u'        <div class="title">\n'])
    extend_([u'          <h1>Cryptic Crossword Clue Solver</h1>\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <div class="info">\n'])
    extend_([
        u'          <a href="https://github.com/rdeits/cryptics">Source code</a> | <a href="http://blog.robindeits.com/2013/02/11/a-cryptic-crossword-clue-solver/">More information</a><br>\n'
    ])
    extend_([u'        </div>\n'])
    extend_([u'      </div>\n'])
    extend_([u'\n'])
    extend_([u'      <div class="preamble">\n'])
    extend_([u'        <div class="solver_desc">\n'])
    extend_([
        u'          This is a general tool for solving cryptic (or "British-style") crossword clues.  Run it by entering a cryptic clue along with the answer length (or lengths) in parenthesis. If you know some of the letters in the answer, you can type them in after the lengths, using a single \'.\' for each unknown letter. Here are some examples of clues it can solve correctly:\n'
    ])
    extend_([u'        </div>\n'])
    extend_([u'        <br>\n'])
    extend_([u'\n'])
    extend_([u'        <div id="sample_clues">\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <br>\n'])
    extend_([u'\n'])
    extend_([u'        <div class="solver_desc">\n'])
    extend_([
        u'          Longer clues take longer to solve. You can help the solver by connecting words which act together with an underscore (\'_\') to from a phrase, as with "rises_and_falls" in the last example.\n'
    ])
    extend_([u'        </div>\n'])
    extend_([u'      </div>\n'])
    extend_([u'\n'])
    extend_([u'      <div id="clue_entry">\n'])
    extend_([u'        <form name="main" method="post" id="clue_form">\n'])
    extend_([u'          <label for="Clue"></label>\n'])
    extend_([
        u'          <input name="Clue" type="text" id="clue_text" placeholder="Spin broken shingle (7) ..g...."/>\n'
    ])
    extend_([u'          <input type="submit" value="Solve"/>\n'])
    extend_([u'        </form>\n'])
    extend_([u'      </div>\n'])
    extend_([u'\n'])
    extend_([u'      <div id="solution">\n'])
    extend_([u'      </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'  </body>\n'])
    extend_([u'</html>\n'])

    return self
Exemplo n.º 21
0
def base (page):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'\n'])
    extend_([u'<!DOCTYPE html>\n'])
    extend_([u'<html>\n'])
    extend_([u'\n'])
    extend_([u'<head>\n'])
    extend_([u'    <meta name="google-site-verification" content="-azLgyDbTQ6EY0zdkcRBc8Q5f0jSV4cd552gcq44N98" />\n'])
    extend_([u'    <meta name="viewport" content="width=device-width, initial-scale=1">\n'])
    extend_([u'    <title>Matthew Iannucci</title>\n'])
    extend_([u'    <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />\n'])
    extend_([u'    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">\n'])
    extend_([u'    <link rel="stylesheet" href="/static/Styles/mpi.css">\n'])
    extend_([u'    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>\n'])
    extend_([u'    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>\n'])
    extend_([u'</head>\n'])
    extend_([u'\n'])
    extend_([u'<body>\n'])
    extend_([u'    <!-- Navigation Bar -->\n'])
    extend_([u'    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([u'            <!-- Brand and toggle get grouped for better mobile display -->\n'])
    extend_([u'            <div class="navbar-header">\n'])
    extend_([u'                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">\n'])
    extend_([u'                    <span class="sr-only">Toggle navigation</span>\n'])
    extend_([u'                    <span class="icon-bar"></span>\n'])
    extend_([u'                    <span class="icon-bar"></span>\n'])
    extend_([u'                    <span class="icon-bar"></span>\n'])
    extend_([u'                </button>\n'])
    extend_([u'                <a class="navbar-brand" href="/">Matthew Iannucci</a>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <!-- Collect the nav links, forms, and other content for toggling -->\n'])
    extend_([u'            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">\n'])
    extend_([u'                <ul class="nav navbar-nav">\n'])
    extend_([u'                    <li>\n'])
    extend_([u'                        <a href="/blog">Blog</a>\n'])
    extend_([u'                    </li>\n'])
    extend_([u'                    <li>\n'])
    extend_([u'                        <a href="/apps">Projects</a>\n'])
    extend_([u'                    </li>\n'])
    extend_([u'                </ul>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <!-- /.navbar-collapse -->\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <!-- /.container -->\n'])
    extend_([u'    </nav>\n'])
    extend_([u'    <div id="contentContainer" class="container-fluid">\n'])
    extend_([u'        <!-- Create the Main Content layout.-->\n'])
    extend_([u'        <!-- Get the Main Content from the server -->\n'])
    extend_([u'        ', escape_(page, False), u'\n'])
    extend_([u'        <!-- Ends Main Content Layout -->\n'])
    extend_([u'        <!-- Begin the Footer Layout -->\n'])
    extend_([u'        <div id="footerRow" class="row">\n'])
    extend_([u'            <div class="col-lg-12 text-center">\n'])
    extend_([u'                <ul class="list-unstyled">\n'])
    extend_([u'                    <li>Copyright 2013, Matthew Iannucci</li>\n'])
    extend_([u'                    <li>Site created with web.py, version 0.3</li>\n'])
    extend_([u'                    <li>Updated January 2015</li>\n'])
    extend_([u'                </ul>\n'])
    extend_([u'            </div>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'    <!-- End the Footer layout -->\n'])
    extend_([u'    <script type="text/javascript">\n'])
    extend_([u'/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */\n'])
    extend_([u"var disqus_shortname = 'matthewiannucci'; // required: replace example with your forum shortname\n"])
    extend_([u'\n'])
    extend_([u"/* * * DON'T EDIT BELOW THIS LINE * * */\n"])
    extend_([u'(function () {\n'])
    extend_([u"var s = document.createElement('script'); s.async = true;\n"])
    extend_([u"s.type = 'text/javascript';\n"])
    extend_([u"s.src = '//' + disqus_shortname + '.disqus.com/count.js';\n"])
    extend_([u"(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);\n"])
    extend_([u'}());\n'])
    extend_([u'</script>\n'])
    extend_([u'\n'])
    extend_([u'</body>\n'])
    extend_([u'\n'])
    extend_([u'</html>\n'])

    return self
Exemplo n.º 22
0
def blog (pageNum):
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    postCount = 0
    next = pageNum + 1
    prev = pageNum - 1
    posts = get_posts((pageNum-1)*6)
    extend_([u'\n'])
    extend_([u'<!-- Loop thourgh all posts in the database and display them as declared below -->\n'])
    for post in loop.setup(posts):
        postCount+=1
        extend_([u'    <div class="row">\n'])
        extend_([u'        <div class="col-lg-12">\n'])
        extend_([u'            <div class="container">\n'])
        extend_([u'            <h2 class="links"><a href="/view/', escape_(post.url, True), u'">', escape_(post.title, True), u'</a></h2>\n'])
        extend_([u'            <h3>', escape_(datestr(post.date), True), u'</h3>\n'])
        if len(post.content) > 500:
            extend_(['            ', escape_(post.content[:500], False), u'\n'])
            extend_(['            ', u'... <a href="/view/', escape_(post.url, True), u'">View Whole Post</a>\n'])
        else:
            extend_(['            ', escape_(post.content, False), u'\n'])
        extend_([u'            <br/>\n'])
        extend_([u'            <div id="links" class="links">\n'])
        extend_([u'                <ul class="list-inline">\n'])
        url = post.url + "#disqus_thread"
        extend_([u'                    <li><a href="/view/', escape_(url, True), u'">Comment</a></li>\n'])
        extend_([u'                    <li>\n'])
        extend_([u'                        Tags: &nbsp; \n'])
        for tag in loop.setup(post.tag):
            extend_(['                        ', u'<a href="/tag/', escape_(tag, True), u'">', escape_(tag, True), u'</a>\n'])
        extend_([u'                    </li>\n'])
        extend_([u'                </ul>\n'])
        extend_([u'            </div>\n'])
        extend_([u'            </div>\n'])
        extend_([u'        </div>\n'])
        extend_([u'    </div>\n'])
        extend_([u'    <hr>\n'])
    extend_([u'<div id="blogLinks" class="row">\n'])
    extend_([u'    <div class="col-lg-12">\n'])
    extend_([u'        <div class="container">\n'])
    if pageNum == 1:
        if postCount < 6:
            extend_(['        ', u'<ul class="list-inline">\n'])
            extend_(['        ', u'    <li>Page ', escape_(pageNum, True), u'</li>\n'])
            extend_(['        ', u'    <li><a href="/archive">Archive</a></li>\n'])
            extend_(['        ', u'</ul>\n'])
        else:
            extend_(['        ', u'<ul class="list-inline">\n'])
            extend_(['        ', u'    <li>Page ', escape_(pageNum, True), u'</li>\n'])
            extend_(['        ', u'    <li><a href="/blog/', escape_(next, True), u'">Next</a></li>\n'])
            extend_(['        ', u'    <li><a href="/archive">Archive</a></li>\n'])
            extend_(['        ', u'</ul>\n'])
    else:
        if postCount < 6:
            extend_(['        ', u'<ul class="list-inline">\n'])
            extend_(['        ', u'    <li><a href="/blog/', escape_(prev, True), u'">Previous</a></li>\n'])
            extend_(['        ', u'    <li>Page ', escape_(pageNum, True), u'</li>\n'])
            extend_(['        ', u'    <li><a href="/archive">Archive</a></li>\n'])
            extend_(['        ', u'</ul>\n'])
        else:
            extend_(['        ', u'<ul class="list-inline">\n'])
            extend_(['        ', u'    <li><a href="/blog/', escape_(prev, True), u'">Previous</a></li>\n'])
            extend_(['        ', u'    <li>Page ', escape_(pageNum, True), u'</li>\n'])
            extend_(['        ', u'    <li><a href="/blog/', escape_(next, True), u'">Next</a></li>\n'])
            extend_(['        ', u'    <li><a href="/archive">Archive</a></li>\n'])
            extend_(['        ', u'</ul>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])

    return self
Exemplo n.º 23
0
def hackwinds():
    __lineoffset__ = -5
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<!-- Jumbotron Header -->\n'])
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-12 jumbotron hackwinds-jumbotron hackwinds-landing">\n'])
    extend_([u'        <div class="col-lg-6">\n'])
    extend_([u'            <img class="hackwinds_landing_screenshots" src="/static/Images/hackwinds-landing.png" />\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <div class="col-lg-6">\n'])
    extend_([u'            <h1>HackWinds</h1>\n'])
    extend_([u'            <p>The easiest way to check the waves in Rhode Island</p>\n'])
    extend_([u'            <a href="https://geo.itunes.apple.com/us/app/hackwinds/id945847570?mt=8" style="display:inline-block;overflow:hidden;background:url(http://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg) no-repeat;width:165px;height:40px;"></a>\n'])
    extend_([u'            <br/>\n'])
    extend_([u'            <a href="https://play.google.com/store/apps/details?id=com.nucc.hackwinds&hl=en&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1"><img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png" style="width:135px;"/></a>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-3 hackwinds-feature-col">\n'])
    extend_([u'        <span class="glyphicon glyphicon-picture"></span>\n'])
    extend_([u'        <h3>Live HD Images</h2>\n'])
    extend_([u'        <p>View the HD camera images straight from Narragansett Beach wherever you are, curtesy of <a href="http://www.warmwinds.com/">Warm Winds Surf Shop</a></p>\n'])
    extend_([u'    </div>\n'])
    extend_([u'    <div class="col-lg-3 hackwinds-feature-col">\n'])
    extend_([u'        <span class="glyphicon glyphicon-tasks"></span>\n'])
    extend_([u'        <h3>5 Day Forecast</h3>\n'])
    extend_([u'        <p>Get the latest forecast information for the upcoming 7 days straight from <a href="http://forecast.mpiannucci.com">RhodyCast</a>, the only surf forecast made exclusively for Rhode Island</p>\n'])
    extend_([u'    </div>\n'])
    extend_([u'    <div class="col-lg-3 hackwinds-feature-col">\n'])
    extend_([u'        <span class="glyphicon glyphicon-stats"></span>\n'])
    extend_([u'        <h3>Live Buoy Data</h3>\n'])
    extend_([u'        <p>Get the latest NOAA buoy reports, showing the current swell in the water. Convienently view the current wave spectra breakdown from Block Island, Montauk, and Nantucket.</p>\n'])
    extend_([u'    </div>\n'])
    extend_([u'    <div class="col-lg-3 hackwinds-feature-col">\n'])
    extend_([u'        <span class="glyphicon glyphicon-calendar"></span>\n'])
    extend_([u'        <h3>Tide Information</h3>\n'])
    extend_([u'        <p>View the upcoming tides, as well as the sunrise and sunset for the day so you can plan whether to dawn patrol or leave work early.</p>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])
    extend_([u'\n'])
    extend_([u'<!-- Page Features -->\n'])
    extend_([u'<!-- <div class="row text-center ">\n'])
    extend_([u'    <div class="col-lg-12 hero-feature">\n'])
    extend_([u'        <h1>Features</h1>\n'])
    extend_([u'        <ul class="nav nav-pills center-pills">\n'])
    extend_([u'            <li class="active"><a data-toggle="tab" href="#iosScreenshots">iOS</a></li>\n'])
    extend_([u'            <li><a data-toggle="tab" href="#androidScreenshots">Android</a></li>\n'])
    extend_([u'        </ul>\n'])
    extend_([u'    </div>\n'])
    extend_([u'    <div class="tab-content">\n'])
    extend_([u'        <div class="tab-pane active" id="iosScreenshots">\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-ios-live.png" alt="Live Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Live Beach View</h3>\n'])
    extend_([u'                        <p>View the HD camera images straight from Narragansett Beach wherever you are.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-ios-forecast.png" alt="Forecast Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>5 Day Forecast</h3>\n'])
    extend_([u'                        <p>Get the latest forecast information for the upcoming 7 days straight from <a href="http://forecast.mpiannucci.com">RhodyCast</a>.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-ios-chart.png" alt="Detail Forecast Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Animated Forecast Charts</h3>\n'])
    extend_([u'                        <p>View animated wave, wind, and period forecast charts for each day of the upcoming week.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-offset-2 col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-ios-buoy.png" alt="Buoy Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Live Buoy Data</h3>\n'])
    extend_([u'                        <p>Get the latest NOAA buoy reports, showing the current swell in the water. Convienently view the current wave spectra breakdown from Block Island, Montauk, and Nantucket.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-ios-tide.png" alt="Tide Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Tide Information</h3>\n'])
    extend_([u'                        <p>View the upcoming tides, as well as the sunrise and sunset for the upcoming 4 days so you can plan whether to dawn patrol or leave work early.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'        </div>\n'])
    extend_([u'        <div class="tab-pane" id="androidScreenshots">\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-android-live.png" alt="Live Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Live Beach View</h3>\n'])
    extend_([u'                        <p>View the HD camera images straight from Narragansett Beach wherever you are.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-android-forecast.png" alt="Forecast Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>7 Day Forecast</h3>\n'])
    extend_([u'                        <p>Get the latest forecast information for the upcoming 7 days straight from <a href="http://forecast.mpiannucci.com">RhodyCast</a>.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-android-chart.png" alt="Charts Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Animated Forecast Charts</h3>\n'])
    extend_([u'                        <p>View animated wave, wind, and period forecast charts for each day of the upcoming week.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-offset-2 col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-android-buoy.png" alt="Buoy Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Live Buoy Data</h3>\n'])
    extend_([u'                        <p>Get the latest NOAA buoy reports, showing the current swell in the water. Convienently view the current wave spectra breakdown from Block Island, Montauk, and Nantucket.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'            <div class="col-md-4 col-sm-6 hero-feature">\n'])
    extend_([u'                <div class="thumbnail">\n'])
    extend_([u'                    <img class="hackwinds_landing_screenshots" src="/static/Images/Screenshots/hackwinds-android-tide.png" alt="Tide Screenshot">\n'])
    extend_([u'                    <div class="caption">\n'])
    extend_([u'                        <h3>Tide Information</h3>\n'])
    extend_([u'                        <p>View the upcoming tides, as well as the sunrise and sunset for the day so you can plan whether to dawn patrol or leave work early.</p>\n'])
    extend_([u'                    </div>\n'])
    extend_([u'                </div>\n'])
    extend_([u'            </div>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div> -->\n'])
    extend_([u'<!-- /.row -->\n'])
    extend_([u'<!-- Github -->\n'])
    extend_([u'<div class="row">\n'])
    extend_([u'    <div class="col-lg-12 text-center jumbotron">\n'])
    extend_([u'        <div class="container">\n'])
    extend_([u'            <h1 id="githubHeader">Open Source</h1>\n'])
    extend_([u"            <p>Both the Android and iOS versions of the app are totally open sourced! Hack away and add any features you want to see in the app, and I'll be happy to add them in. Or simply help development by reporting bugs or possible new features.</p>\n"])
    extend_([u'            <a href="https://github.com/mpiannucci/HackWinds-iOS" class="btn btn-info hackwinds-github-button">View the iOS Source</a>\n'])
    extend_([u'            <a href="https://github.com/mpiannucci/HackWinds-Android" class="btn btn-info hackwinds-github-button">View the Android Source</a>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</div>\n'])
    extend_([u'<!-- /.row -->\n'])

    return self