Permalink
Browse files

avançando o layout pra home

  • Loading branch information...
1 parent c26ffb6 commit da08894fb055df24506bdb2d39d98816ba0c8abd @barraponto barraponto committed Nov 23, 2010
@@ -17,6 +17,7 @@
border: 1px solid black
padding: 0
margin: 0
+ font-size: 1.2em
.item-box-item
padding: 0.25em
@@ -29,3 +30,6 @@
background: #eee
color: blue
+ .desc
+ font-size: 0.8em
+ color: #777
@@ -0,0 +1,20 @@
+#news_items
+ +no-bullets
+ padding: 0
+ margin: 0
+
+ .entry
+ margin: 1em 0
+ overflow: auto
+
+ .summary
+ +column(12)
+ +prepend(1)
+
+ h3.title
+ font-size: 1.5em
+ line-height: 1.5em
+ margin-bottom: 0.5em
+
+ a
+ +hover-link
@@ -3,3 +3,4 @@
@import layout
@import search
+@import welcome
@@ -7,17 +7,20 @@
- question = entry_type == 'question' ? entry : entry.question
%li.entry.item
- / News_item Summary
+ -# News_item Summary
- cache("news_item_on_index_#{news_item.id}") do
.summary
- %h3= link_to title, question_path(question), :title => truncate(strip_tags(entry.body), :length => 200)
+ %h3.title= link_to title, question_path(question), :title => truncate(strip_tags(entry.body), :length => 200)
.origin
- %span= t(".#{entry_type}.#{origin_type}.#{action}", :origin => link_to(origin.name, url_for(news_item.origin)))
- / News_item Stats
+ - if entry_type == "answer"
+ %span= t(".#{entry_type}.#{origin_type}.#{action}", :origin => link_to(origin.name, url_for(news_item.origin)))
+ .answer= markdown(entry.body)
+ - else
+ %span= t(".#{entry_type}.#{origin_type}.#{action}", :origin => link_to(origin.name, url_for(news_item.origin)))
+ -# News_item Stats
.info
.metadata
= t("time.ago", :time => time_ago_in_words(news_item.created_at))
\|
= format_number(question.answers_count)
= t(:answer_count, :scope => "activerecord.models", :count => question.answers_count)
- .clear

0 comments on commit da08894

Please sign in to comment.