[Bast-commits] r8080 - in ironman/IronMan-Web: lib/IronMan/Web/Controller root root/inc

fade at dev.catalyst.perl.org fade at dev.catalyst.perl.org
Sat Dec 12 17:53:21 GMT 2009


Author: fade
Date: 2009-12-12 17:53:20 +0000 (Sat, 12 Dec 2009)
New Revision: 8080

Added:
   ironman/IronMan-Web/root/inc/post_teaser.tt
   ironman/IronMan-Web/root/index.tt
Modified:
   ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm
Log:
add home page

Modified: ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm
===================================================================
--- ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm	2009-12-12 17:20:20 UTC (rev 8079)
+++ ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm	2009-12-12 17:53:20 UTC (rev 8080)
@@ -36,6 +36,22 @@
     $c->response->body( $c->welcome_message );
 }
 
+=head2 index
+
+=cut
+
+sub index :Path :Args(0) {
+    my ( $self, $c ) = @_;
+
+    my $posts = $c->model('FeedDB::Post')->search({},{'order_by' => \'posted_on DESC', 'rows' => 21 });
+    $c->stash( 'posts' => $posts );
+
+}
+
+=head2 new_feed
+
+=cut
+
 sub new_feed : Local {
     my ($self, $c) = @_;
     

Added: ironman/IronMan-Web/root/inc/post_teaser.tt
===================================================================
--- ironman/IronMan-Web/root/inc/post_teaser.tt	                        (rev 0)
+++ ironman/IronMan-Web/root/inc/post_teaser.tt	2009-12-12 17:53:20 UTC (rev 8080)
@@ -0,0 +1,24 @@
+    
+      <div class="entry">
+        <div class="entry-header">
+          <div class="entry-title">
+            
+              <a class="entry-source-link" href="http://lastofthecarelessmen.blogspot.com/">SF</a>:
+            
+            <a class="entry-link" href="http://lastofthecarelessmen.blogspot.com/2009/12/intro-to-abc.html">Intro to ABC</a>
+          </div>
+          
+            <span class="entry-by-line">
+              by <span class="entry-author">SF</span>
+
+            </span>
+          
+          
+            <span class="entry-tags">
+              on
+              <span class="entry-tag">
+                ABC</span>, <span class="entry-tag">Perl 6
+              </span>
+            </span>
+          
+        </div>

Added: ironman/IronMan-Web/root/index.tt
===================================================================
--- ironman/IronMan-Web/root/index.tt	                        (rev 0)
+++ ironman/IronMan-Web/root/index.tt	2009-12-12 17:53:20 UTC (rev 8080)
@@ -0,0 +1,8 @@
+
+[% FOREACH post IN posts %]
+
+[% INCLUDE 'inc/post_teaser.tt'
+    post = post
+%]
+    
+[% END %]
\ No newline at end of file




More information about the Bast-commits mailing list