finish up Discover page
This commit is contained in:
parent
86b5e9933e
commit
023fe26e81
|
@ -189,3 +189,7 @@ body {
|
||||||
.heading-showcase {
|
.heading-showcase {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.discover {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
.tab-pane.fade{role: "tabpanel", id: "questions"}
|
.tab-pane.fade{role: "tabpanel", id: "questions"}
|
||||||
- questions.each do |q|
|
- questions.each do |q|
|
||||||
= render 'shared/question', q: q
|
= render 'shared/question', q: q, type: "discover"
|
||||||
|
|
|
@ -2,14 +2,17 @@
|
||||||
.panel-body
|
.panel-body
|
||||||
.media
|
.media
|
||||||
.pull-left
|
.pull-left
|
||||||
|
%a{href: show_user_profile_path(u.screen_name)}
|
||||||
%img.answerbox--img{src: u.profile_picture.url(:medium)}
|
%img.answerbox--img{src: u.profile_picture.url(:medium)}
|
||||||
.media-body
|
.media-body
|
||||||
%h6.media-heading
|
%h6.media-heading
|
||||||
- if u.display_name.blank?
|
- if u.display_name.blank?
|
||||||
%span= u.screen_name
|
%a{href: show_user_profile_path(u.screen_name)}
|
||||||
|
%span= "@#{u.screen_name}"
|
||||||
- else
|
- else
|
||||||
|
%a{href: show_user_profile_path(u.screen_name)}
|
||||||
%span= u.display_name
|
%span= u.display_name
|
||||||
%span.text-muted= u.screen_name
|
%span.text-muted= "@#{u.screen_name}"
|
||||||
%p.answerbox--question-text
|
%p.answerbox--question-text
|
||||||
- if type == "new"
|
- if type == "new"
|
||||||
registered
|
registered
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
%li{role: "presentation"}
|
%li{role: "presentation"}
|
||||||
%a{href: "#questions", role: "tab", aria: {controls: "questions"}, data: {toggle: "tab"}}
|
%a{href: "#questions", role: "tab", aria: {controls: "questions"}, data: {toggle: "tab"}}
|
||||||
Questions
|
Questions
|
||||||
.tab-content
|
.tab-content.discover
|
||||||
= render 'discover/tab_answers', answers: @popular_answers
|
= render 'discover/tab_answers', answers: @popular_answers
|
||||||
= render 'discover/tab_questions', questions: @popular_questions
|
= render 'discover/tab_questions', questions: @popular_questions
|
||||||
.col-md-4.col-sm-6
|
.col-md-4.col-sm-6
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
%li{role: "presentation"}
|
%li{role: "presentation"}
|
||||||
%a{href: "#asked", role: "tab", aria: {controls: "asked"}, data: {toggle: "tab"}}
|
%a{href: "#asked", role: "tab", aria: {controls: "asked"}, data: {toggle: "tab"}}
|
||||||
Most Asked Questions
|
Most Asked Questions
|
||||||
.tab-content
|
.tab-content.discover
|
||||||
= render 'discover/tab_new', new: @new_users
|
= render 'discover/tab_new', new: @new_users
|
||||||
= render 'discover/tab_asked', asked: @users_with_most_questions
|
= 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.panel-default.questionbox{data: { id: q.id }}
|
||||||
.panel-body
|
.panel-body
|
||||||
.media
|
.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
|
.media-body
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
.pull-right
|
.pull-right
|
||||||
|
|
Loading…
Reference in New Issue