|
1 | 1 | - content_for :title do |
2 | | - = "#{resource.username}'s Profile" |
| 2 | + = "#{resource.username}'s page" |
3 | 3 |
|
4 | 4 | -content_for :sidebar do |
5 | 5 | %section.about-user |
|
14 | 14 | = f.hidden_field :followee, :value => resource.id |
15 | 15 | = f.button :submit, :value => "Follow", :class => "primary btn" |
16 | 16 |
|
17 | | - - unless resource.about.blank? |
18 | | - %p= resource.about |
| 17 | + %h2= "About #{resource.username}" |
| 18 | + %h4= resource.about |
| 19 | + %hr |
19 | 20 | %p |
20 | 21 | = link_to pluralize(resource.programs.count, "Program"), user_programs_path(resource) |
21 | 22 | %p |
|
30 | 31 |
|
31 | 32 |
|
32 | 33 | - unless @user.questions.empty? |
33 | | - %section.user-questions |
34 | | - .heading |
35 | | - %h3= pluralize(@user.questions.count, "Question") |
36 | | - %ul |
37 | | - - @user.questions.each do |question| |
38 | | - %li |
39 | | - .title |
40 | | - = link_to question.title, question_path(question) |
41 | | - .meta |
42 | | - asked #{question.created_at.strftime("%b %e, %l:%M %p")} |
| 34 | + %section.questions |
| 35 | + %header |
| 36 | + %h2 Questions |
| 37 | + - @user.questions.each do |question| |
| 38 | + %article.question |
| 39 | + %h4= link_to question.title, question_path(question) |
43 | 40 |
|
44 | 41 | - unless @user.answers.empty? |
45 | | - %section.user-answers |
46 | | - .heading |
47 | | - %h3= pluralize(@user.answers.count, "Answer") |
48 | | - %ul |
49 | | - - @user.answers.each do |answer| |
50 | | - %li |
51 | | - .description |
52 | | - = answer.description.truncate(100) |
53 | | - .meta |
54 | | - = link_to("View Answer", answer.question) |
| 42 | + %section.answers |
| 43 | + %header |
| 44 | + %h2 Answers |
| 45 | + - @user.answers.each do |answer| |
| 46 | + %article.answer |
| 47 | + %h4 |
| 48 | + = "#{@user.username} answered" |
| 49 | + = link_to(answer.question.title, answer.question) |
| 50 | + with: |
| 51 | + %p= answer.description |
0 commit comments