mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:19:52 +01:00
finish up Discover page
This commit is contained in:
parent
86b5e9933e
commit
023fe26e81
5 changed files with 19 additions and 8 deletions
|
@ -189,3 +189,7 @@ body {
|
|||
.heading-showcase {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.discover {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.tab-pane.fade{role: "tabpanel", id: "questions"}
|
||||
- questions.each do |q|
|
||||
= render 'shared/question', q: q
|
||||
= render 'shared/question', q: q, type: "discover"
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
.panel-body
|
||||
.media
|
||||
.pull-left
|
||||
%img.answerbox--img{src: u.profile_picture.url(:medium)}
|
||||
%a{href: show_user_profile_path(u.screen_name)}
|
||||
%img.answerbox--img{src: u.profile_picture.url(:medium)}
|
||||
.media-body
|
||||
%h6.media-heading
|
||||
- if u.display_name.blank?
|
||||
%span= u.screen_name
|
||||
%a{href: show_user_profile_path(u.screen_name)}
|
||||
%span= "@#{u.screen_name}"
|
||||
- else
|
||||
%span= u.display_name
|
||||
%span.text-muted= u.screen_name
|
||||
%a{href: show_user_profile_path(u.screen_name)}
|
||||
%span= u.display_name
|
||||
%span.text-muted= "@#{u.screen_name}"
|
||||
%p.answerbox--question-text
|
||||
- if type == "new"
|
||||
registered
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
%li{role: "presentation"}
|
||||
%a{href: "#questions", role: "tab", aria: {controls: "questions"}, data: {toggle: "tab"}}
|
||||
Questions
|
||||
.tab-content
|
||||
.tab-content.discover
|
||||
= render 'discover/tab_answers', answers: @popular_answers
|
||||
= render 'discover/tab_questions', questions: @popular_questions
|
||||
.col-md-4.col-sm-6
|
||||
|
@ -34,7 +34,7 @@
|
|||
%li{role: "presentation"}
|
||||
%a{href: "#asked", role: "tab", aria: {controls: "asked"}, data: {toggle: "tab"}}
|
||||
Most Asked Questions
|
||||
.tab-content
|
||||
.tab-content.discover
|
||||
= render 'discover/tab_new', new: @new_users
|
||||
= render 'discover/tab_asked', asked: @users_with_most_questions
|
||||
.tab-content
|
||||
= render 'shared/links'
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
.panel.panel-default.questionbox{data: { id: q.id }}
|
||||
.panel-body
|
||||
.media
|
||||
- if type == "discover"
|
||||
.pull-left
|
||||
%a{href: show_user_profile_path(q.user.screen_name)}
|
||||
%img.answerbox--img{src: q.user.profile_picture.url(:medium)}
|
||||
.media-body
|
||||
- if user_signed_in?
|
||||
.pull-right
|
||||
|
|
Loading…
Reference in a new issue