|
1 | 1 | .post |
2 | | - %h1= @post.title |
3 | | - - markdown = RDiscount.new(@post.body, :smart, :filter_html) |
4 | | - %div!= markdown.to_html |
5 | | - %hr |
6 | | - - @post.comments.each do |comment| |
7 | | - .comment{:style => "clear:both"} |
8 | | - %div{:class => "left"} |
9 | | - %a{:href => "/hackers/#{comment.author}"} |
10 | | - %img{:src => gravatar_url_for(comment.author_email), :alt => "#{comment.author.downcase}_gravatar", :class => "comment_gravatar"} |
11 | | - %div{:style => "width:500px"} |
12 | | - %p |
13 | | - <a href="/hackers/#{comment.author}">#{comment.author}</a> says: |
14 | | - %p |
15 | | - = comment.body |
16 | | - - if logged_in? |
17 | | - %hr |
18 | | - %form{:action => "/comments", :method => "POST"} |
19 | | - %input{:type => "hidden", :id => "post_id", :name => "post_id", :value => @post.id} |
20 | | - %label{:for => "comment_body"} Submit your opinion: |
21 | | - %br |
22 | | - %textarea{:id => "comment_body", :name => "comment[body]", :cols => 70, :rows => 5} |
23 | | - %br |
24 | | - %input{:type => "submit", :value => "Submit"} |
25 | | - - else |
26 | | - %p <a href="/login">Log in</a> to add your own commentary. |
27 | | - %hr |
28 | | - %a{:href => "/blog"}Back to blog |
| 2 | + %h1= @post.title |
| 3 | + - markdown = RDiscount.new(@post.body, :smart, :filter_html) |
| 4 | + %div!= markdown.to_html |
| 5 | + %hr |
| 6 | + %br |
| 7 | + - @post.comments.each do |comment| |
| 8 | + .comment{:style => "clear:both"} |
| 9 | + %div{:class => "left"} |
| 10 | + %a{:href => "/hackers/#{comment.author}"} |
| 11 | + %img{:src => gravatar_url_for(comment.author_email), :alt => "#{comment.author.downcase}_gravatar", :class => "comment_gravatar"} |
| 12 | + %div{:style => "width:500px"} |
| 13 | + %p |
| 14 | + <a href="/hackers/#{comment.author}">#{comment.author}</a> says: |
| 15 | + %p |
| 16 | + = comment.body |
| 17 | + %br |
| 18 | + - if logged_in? |
| 19 | + %hr |
| 20 | + %form{:action => "/comments", :method => "POST"} |
| 21 | + %input{:type => "hidden", :id => "post_id", :name => "post_id", :value => @post.id} |
| 22 | + %label{:for => "comment_body"} Submit your opinion: |
| 23 | + %br |
| 24 | + %textarea{:id => "comment_body", :name => "comment[body]", :cols => 70, :rows => 5} |
| 25 | + %br |
| 26 | + %input{:type => "submit", :value => "Submit"} |
| 27 | + - else |
| 28 | + %p <a href="/login">Log in</a> to add your own commentary. |
| 29 | + %hr |
| 30 | + %a{:href => "/blog"}Back to blog |
29 | 31 |
|
0 commit comments