<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/tasks/soapbox/test_post.textile</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -15,7 +15,7 @@ class Admin::PostsController &lt; Admin::AdminController
         if @post.save
           format.html {
             # if we want to preview here use the id to avoid permlink clashes
-            params[:preview] ? redirect_to(preview_admin_post_url(@post.id, {:status =&gt; 'preview'})) : redirect_to(edit_admin_post_url(@post.permalink))
+            params[:preview] ? redirect_to(preview_admin_post_url(@post, {:status =&gt; 'preview'})) : redirect_to(edit_admin_post_url(@post.permalink))
            }
         else
           format.html { render :action =&gt; &quot;new&quot; }
@@ -53,7 +53,6 @@ class Admin::PostsController &lt; Admin::AdminController
   def preview
     #mark the post as a preview
     @post_preview = true
-    puts params.inspect
      
     if params[:status] == 'preview'
       @post = Post.get(params[:id])</diff>
      <filename>app/controllers/admin/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,6 +40,7 @@ class PostsController &lt; ApplicationController
   
   def by_month
     @posts = Post.find_by_year_and_month(params[:year], params[:month])
+    @month_name = @posts.first.created_at.strftime(&quot;%B&quot;)
     
     respond_to do |format|
       format.html # by_year.html.erb</diff>
      <filename>app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,8 @@
 module PostsHelper
-  def link_to_post(post)
+  def link_to_post(post, title=nil)
+    post_title = title ||post.title 
     year, month = post.year_and_month
-    link_to h(post.title), &quot;#{year}/#{month}/#{post.permalink}&quot;
+    link_to h(post_title), &quot;#{year}/#{month}/#{post.permalink}&quot;
   end
   
   def post_date(post)
@@ -19,6 +20,12 @@ module PostsHelper
     list.join(&quot;\n  &quot;)
   end
   
+  def content_for_post(post)
+    # search through replace the &lt;!-- more --&gt; with a link and not display the rest
+    content = post.body.gsub(/&lt;!-- more --&gt;.*$/m, link_to_post(post, 'Read more ...'))
+    RedCloth.new(content).to_html
+  end
+  
   def recent_posts
     content_tag(:ul,
       @recent_posts.collect { |post| content_tag(:li, link_to_post(post)) }.join(&quot;\n&quot;),</diff>
      <filename>app/helpers/posts_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,16 +24,20 @@
         &lt;h2&gt;&lt;%= blog_title %&gt;&lt;/h2&gt;
         &lt;%= content_tag(:p, blog_strapline) if blog_strapline %&gt;
     &lt;/div&gt;&lt;!-- #header --&gt;
-    &lt;div class=&quot;p-content&quot;&gt;
-      &lt;%#= render :partial =&gt; 'layouts/flashes' -%&gt;
-      &lt;%= yield %&gt;
 
-    &lt;/div&gt;&lt;!-- .p-content --&gt;
-    &lt;div id=&quot;s-content&quot;&gt;
-      &lt;%= render :partial =&gt; 'shared/s_content' unless post_preview? -%&gt;
+    &lt;div id=&quot;content&quot;  class=&quot;clearfix&quot;&gt;
+      &lt;div id=&quot;p-content&quot;&gt;
+        &lt;%#= render :partial =&gt; 'layouts/flashes' -%&gt;
+        &lt;%= yield %&gt;
+
+      &lt;/div&gt;&lt;!-- .p-content --&gt;
+      &lt;div id=&quot;s-content&quot;&gt;
+        &lt;%= render :partial =&gt; 'shared/s_content' unless post_preview? -%&gt;
+      &lt;/div&gt;
     &lt;/div&gt;
+    
     &lt;div id=&quot;footer&quot;&gt;
-      &lt;p&gt;Some footer text and a copywrite&lt;/p&gt;
+      &lt;p&gt;Some footer text and a copy write&lt;/p&gt;
     &lt;/div&gt;
   &lt;/div&gt;&lt;!-- #wrapper --&gt;
 &lt;/body&gt;</diff>
      <filename>app/views/layouts/application.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,6 @@
   &lt;h2&gt;&lt;%= link_to_post(post) %&gt;&lt;/h2&gt;
   &lt;p class=&quot;date&quot;&gt;&lt;%=  post_date(post) %&gt;&lt;/p&gt; 
   &lt;div class=&quot;body&quot;&gt;
-    &lt;%= RedCloth.new(post.body).to_html %&gt;
+    &lt;%= content_for_post(post) %&gt;
   &lt;/div&gt;
 &lt;/div&gt;
\ No newline at end of file</diff>
      <filename>app/views/posts/_post.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,9 @@
 %&gt;
 &lt;h1&gt;Archives&lt;/h1&gt;
 &lt;p&gt;Browse the archives and find what you want&lt;/p&gt;
-&lt;h2&gt;By Month&lt;/h2&gt;
-&lt;ul&gt;
-  &lt;%= by_month_list(@post_sum_by_month) %&gt;
-&lt;/ul&gt;
+&lt;div id=&quot;by_month&quot;&gt;
+  &lt;h2&gt;By Month&lt;/h2&gt;
+  &lt;ul&gt;
+    &lt;%= by_month_list(@post_sum_by_month) %&gt;
+  &lt;/ul&gt;
+&lt;/div&gt;</diff>
      <filename>app/views/posts/archives.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,7 @@
+&lt;%
+  @page = {:title =&gt; &quot;Posts in #{@month_name}&quot; }
+%&gt;
+&lt;h1&gt;Posts in &lt;strong&gt;&lt;%= @month_name %&gt;&lt;/strong&gt;&lt;/h1&gt;
 &lt;% unless @posts.empty? %&gt;
   &lt;div id=&quot;posts&quot;&gt; 
     &lt;%= render :partial =&gt; &quot;post&quot;, :collection =&gt; @posts %&gt;</diff>
      <filename>app/views/posts/by_month.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,9 @@
+&lt;%
+  @page = {:title =&gt; &quot;Posts in #{params[:year]}&quot; }
+%&gt;
+&lt;h1&gt;Posts in &lt;strong&gt;&lt;%= params[:year] %&gt;&lt;/strong&gt;&lt;/h1&gt;
 &lt;% unless @posts.empty? %&gt;
-  &lt;%= render :partial =&gt; &quot;post&quot;, :collection =&gt; @posts %&gt;
+  &lt;div id=&quot;posts&quot;&gt; 
+    &lt;%= render :partial =&gt; &quot;post&quot;, :collection =&gt; @posts %&gt;
+  &lt;/div&gt;
 &lt;% end %&gt;
\ No newline at end of file</diff>
      <filename>app/views/posts/by_year.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,5 @@
+&lt;h3&gt;about&lt;/h3&gt;
+&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.&lt;/p&gt;
+
 &lt;h3&gt;Recent Posts&lt;/h3&gt;
 &lt;%= recent_posts %&gt;
\ No newline at end of file</diff>
      <filename>app/views/shared/_s_content.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,19 @@
+require 'faker'
 namespace :soapbox do
   
-  task :create_test_blog_post =&gt; :environment do
-    id = 'testing123'
-    @post = Post.get(id)
-    
-    #clear it out and start again
-    @post.destroy if @post
+  task :create_test_posts =&gt; :environment do
+
+
     
     #grab the textile from the templates folder
-    body = File.read(File.dirname(__FILE__) + &quot;/soapbox/#{id}.textile&quot;)
-    
-    @post = Post.new(:title =&gt; id, :body =&gt; body)
-    @post.save
+    body = File.read(File.dirname(__FILE__) + &quot;/soapbox/test_post.textile&quot;)
+    now = Time.now
+
+    5.times do |i|
+      title = Faker::Lorem.sentence
+      @post = Post.new(:title =&gt; title, :body =&gt; body, :created_at =&gt; Time.gm(now.year, now.month, i+1, now.hour, now.min, now.sec), :status =&gt; 'published')
+      @post.save!
+    end
   end
 
 end
\ No newline at end of file</diff>
      <filename>lib/tasks/soapbox.rake</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,17 @@ No
 	border-top:1px solid #CCCCCC;
 }
 
+#p-content {
+	width: 70%;
+	float:left;
+	margin-right: 5%;
+}
+
+#s-content {
+	width: 25%;
+	float:left;
+}
+
 /* navigation 
 -------------------------------------------------------------------*/
 #navigation {
@@ -46,4 +57,27 @@ No
 			padding: 0.5em 1em 0.5em 1em;
 			margin-left: 1em;
 			display:block;
-		}
\ No newline at end of file
+		}
+		
+/* secondary content
+-------------------------------------------------------------------*/
+#s-content {
+	
+}
+
+	#s-content h3 {
+	  	font-size: 200%;
+		margin-bottom: 10px;
+	}
+	
+	#s-content p, #s-content li {
+		color:#222;
+		font-family:corbel,'lucida grande',helvetica,sans-serif;
+		font-size:120%;
+		line-height:1.5;
+		margin-bottom: 10px;
+	}
+	
+	#s-content ul {
+		margin-left: 15px;
+	}
\ No newline at end of file</diff>
      <filename>public/stylesheets/blog.layout.css</filename>
    </modified>
    <modified>
      <diff>@@ -34,6 +34,27 @@ body {
 	font-weight: normal;
 }
 
+#p-content h2 {
+	font-family:Cambria,Georgia,serif;
+	font-size: 300%;
+	color: #464646;
+	font-weight: normal;
+}
+	
+#p-content ul {
+	margin-left: 18px;
+} 
+
+#p-content p, #p-content li {
+	color:#222;
+	font-family:corbel,'lucida grande',helvetica,sans-serif;
+	font-size:150%;
+	line-height:1.5;
+	margin-top: 20px;
+	margin-bottom: 40px;
+	margin-bottom: 1.5em;
+} 
+
 /* index page
 -------------------------------------------------------------------*/
 #posts h2 {
@@ -68,7 +89,7 @@ body {
 	word-spacing: 0.20em;
 }
 
-.post h1 {
+#p-content h1 {
 	font-size: 400%;
 	margin-bottom: 20px;
 	text-align: center;
@@ -81,16 +102,8 @@ body {
 	text-align:center;
 }
 
-.post .body {
-	color:#222;
-	font-family:corbel,'lucida grande',helvetica,sans-serif;
-	font-size:150%;
-	line-height:1.5;
-	margin-top: 20px;
-	margin-bottom: 40px;
- }
-
-	.post .body p {
-		margin-bottom: 1.5em;
-	}
+/* archives page
+-------------------------------------------------------------------*/
 
+#by_month {
+}
\ No newline at end of file</diff>
      <filename>public/stylesheets/master.css</filename>
    </modified>
    <modified>
      <diff>@@ -89,7 +89,7 @@ describe Admin::PostsController do
       it &quot;should redirect to preview page&quot; do
         Post.should_receive(:new).with({'these' =&gt; 'params'}).and_return(@foo = mock_post(:save =&gt; true, :status= =&gt; true, :preview? =&gt; true))
         post :create, :post =&gt; {:these =&gt; 'params'}, :preview =&gt; 'Preview'
-        response.should redirect_to(preview_admin_post_url(mock_post.permalink))
+        response.should redirect_to(preview_admin_post_url(mock_post, {:status =&gt; 'preview'}))
       end
     end
     </diff>
      <filename>spec/controllers/admin/posts_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -76,16 +76,22 @@ describe PostsController do
   
   describe &quot;GET 'by_month'&quot; do
     it &quot;should be successful&quot; do
-      Post.stub!(:find_by_year_and_month).and_return([mock_post])
+      Post.stub!(:find_by_year_and_month).and_return([mock_post(:created_at =&gt; Time.gm(2009, 9))])
       get :by_month, :year =&gt; &quot;2009&quot;, :month =&gt; &quot;09&quot;
       response.should be_success
     end
     
     it &quot;should assign post as @post&quot; do
-      Post.stub!(:find_by_year_and_month).and_return([mock_post])
+      Post.stub!(:find_by_year_and_month).and_return([mock_post(:created_at =&gt; Time.gm(2009, 9))])
       get :by_month, :year =&gt; &quot;2009&quot;, :month =&gt; &quot;09&quot;
       assigns[:posts].should == [mock_post]
     end
+    
+    it &quot;should assign month name as @month_name&quot; do
+      Post.stub!(:find_by_year_and_month).and_return([mock_post(:created_at =&gt; Time.gm(2009, 12))])
+      get :by_month, :year =&gt; &quot;2009&quot;, :month =&gt; &quot;12&quot;
+      assigns[:month_name].should == 'December'
+    end
   end
   
   describe &quot;GET 'archives'&quot; do</diff>
      <filename>spec/controllers/posts_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,11 @@ describe PostsHelper do
     link_to_post(@post).should == '&lt;a href=&quot;2009/06/a-title&quot;&gt;a title&lt;/a&gt;'
   end
   
+  it &quot;link_to_post should return a full permalink for a post with a custom title&quot; do
+    @post = mock_post(:permalink =&gt; &quot;a-title&quot;, :year_and_month =&gt; [&quot;2009&quot;, &quot;06&quot;], :title =&gt; &quot;a title&quot;)
+    link_to_post(@post, 'foo bar').should == '&lt;a href=&quot;2009/06/a-title&quot;&gt;foo bar&lt;/a&gt;'
+  end
+  
   describe &quot;display the posts date&quot; do
     it &quot;should display nicely formatted date&quot; do
       @post = mock_post(:created_at =&gt; &quot;2008/06/24 14:10:27 +0000&quot;, :new_record? =&gt; false)</diff>
      <filename>spec/helpers/posts_helper_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>62c8fe6b112eff5576d127f9d5476b8f00be2df5</id>
    </parent>
  </parents>
  <author>
    <name>Ben Aldred</name>
    <email>benaldred@gmail.com</email>
  </author>
  <url>http://github.com/benaldred/soapbox/commit/95fa6e1cdb65f3e7532c519a3947275065430917</url>
  <id>95fa6e1cdb65f3e7532c519a3947275065430917</id>
  <committed-date>2009-10-13T01:08:33-07:00</committed-date>
  <authored-date>2009-10-13T01:08:33-07:00</authored-date>
  <message>more basic stying, fake blog post rake task and read more link</message>
  <tree>f44f9a03a5d3f8b0ad85db9a8040c3859358a3c3</tree>
  <committer>
    <name>Ben Aldred</name>
    <email>benaldred@gmail.com</email>
  </committer>
</commit>
