diff --git a/app/assets/stylesheets/blogs.css.scss b/app/assets/stylesheets/blogs.css.scss index e0e078d..4c28624 100644 --- a/app/assets/stylesheets/blogs.css.scss +++ b/app/assets/stylesheets/blogs.css.scss @@ -9,10 +9,16 @@ div.blogs { div.blog { background: url('bg_fn_blog_corner.png') no-repeat; - padding: 2em 19px; + padding: 2em 19px 1em; width: 641px; border-radius: 5px; border: 1px solid #E6E6E6; + .cc { + color: #CCC; + a { + color: #CCC; + } + } h2 { font-size: 40px; margin-bottom: 19px; @@ -36,3 +42,9 @@ div.bottom { height: 40px; width: 679px; } + +div#disqus_thread { + margin: 20px 20px 0 0; + border-top: 1px solid #CCC; + padding-top: 20px; +} diff --git a/app/helpers/blogs_helper.rb b/app/helpers/blogs_helper.rb index cc0dbd2..2dff537 100644 --- a/app/helpers/blogs_helper.rb +++ b/app/helpers/blogs_helper.rb @@ -1,2 +1,5 @@ module BlogsHelper + def format_time(time) + time.strftime("%Y-%m-%d %H:%M") + end end diff --git a/app/models/post.rb b/app/models/post.rb index 9889dd6..81afaa7 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -21,4 +21,10 @@ class Post md = Redcarpet::Markdown.new(rd, :autolink=>true) md.render(self.content) end + + def visited + self.visited_count += 1 + self.save + self.visited_count + end end diff --git a/app/views/blogs/_post.html.erb b/app/views/blogs/_post.html.erb index 1230b9a..60bbf93 100644 --- a/app/views/blogs/_post.html.erb +++ b/app/views/blogs/_post.html.erb @@ -1,5 +1,11 @@