Browse files

adding index page (and route)

  • Loading branch information...
1 parent 95f9134 commit bd85ed29aba21c70edbcd4961a036e14de13212a @garu committed Jun 13, 2010
Showing with 55 additions and 0 deletions.
  1. +55 −0
@@ -30,6 +30,10 @@ package main;
use Mojolicious::Lite;
+# this controls the main index page
+get '/' => 'index';
# let's rock and roll!
@@ -38,4 +42,55 @@ package main;
# finally, the templates #
+@@ index.html.ep
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
+<html xmlns="">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Tweetylicious</title>
+ </head>
+ <body>
+ <div id="header"><a href="/"><div id="logo">Tweetylicious!</div></a>
+ </div>
+ <div id="content">
+ <h1>What is Tweetylicious?</h1>
+ <p>Tweetylicious is a <a href="">microblogging</a> web application in a single file! It was built from scratch using state of the art technology, and is meant to demonstrate how easy and fun it is to create your own Web applications in modern Perl 5!</p>
+ <h1>What are its features?</h1>
+ <ul>
+ <li>Multi-user, with homepages, search and list of followers/following</li>
+ <li>Nice, clean, pretty interface (at least I think so :P)</li>
+ <li>User avatar images provided by <a href="">gravatar</a></li>
+ <li>Unicode support</li>
+ <li>Well structured, commented code, easy to expand and customize</li>
+ <li>Encrypted online sessions</li>
+ <li>Uses an actual database (SQLite) and stores encrypted user password</li>
+ <li>Free and Open Source Software, released under the same terms as Perl itself.</li>
+ </ul>
+ <h1>How can you fit all that in a 'single file'?! It's gotta be huge and clobbered then!</h1>
+ <p>Not at all! Tweetylicious is built on top of Mojolicious::Lite and ORLite, two very simple modules that have absolutely no dependency other than Perl 5 itself. Mojolicious::Lite allows you to create powerful web applications in a very simple and clean fashion, while also letting you integrate your templates on the bottom of the file. ORLite is an extremely lightweight ORM for <a href="">SQLite</a> databases that lets you specify your schema on the fly.</p>
+ <p>Removing just blank lines and comments, the Model has ~80 lines, the Controller ~110 lines, templates ~170 lines, plus ~90 lines of static css and ~60 of static javascript. And that's the <strong>whole</strong> app.</p>
+ <p>But don't take my word for it, just browse through it :)</p>
+ <h1>What do I need to make it work on my own system?</h1>
+ <ul>
+ <li>Perl 5 <span class="fineprint">(if you're running Linux or Mac, you already have it! Windows users can get it <a href="">here</a>)<span></li>
+ <li>SQLite 3</li>
+ <li>Mojolicious</li>
+ <li>ORLite</li>
+ </ul>
+ <p>Tweetylicious also relies on the powerful jQuery JavaScript library, but that's downloaded and processed by the clients browser, so don't worry about it. Each user's avatar image is also provided externally, via gravatar.</p>
+ <p>Have fun!</p>
+ </div>
+ <div id="footer">Tweetylicious is Powered by <a href="">Perl 5</a>, <a href="">Mojolicious</a>, <a href="">ORLite</a> and <a href="">jQuery</a>! Released under <a href="">the same terms as Perl itself</a>. </div>
+ </body>

0 comments on commit bd85ed2

Please sign in to comment.