Fix lints in app/views/discover
This commit is contained in:
parent
f95bc9e40e
commit
2622ded0a0
|
@ -0,0 +1,3 @@
|
||||||
|
.tab-pane.active.fade.show{ role: 'tabpanel', id: 'answers' }
|
||||||
|
- answers.each do |a|
|
||||||
|
= render 'answerbox', a: a
|
|
@ -1,3 +0,0 @@
|
||||||
.tab-pane.active.fade.show{role: "tabpanel", id: "answers"}
|
|
||||||
- answers.each do |a|
|
|
||||||
= render 'answerbox', a: a
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
.tab-pane.fade{ role: 'tabpanel', id: 'asked' }
|
||||||
|
- asked.each do |user|
|
||||||
|
= render 'discover/userbox', u: user.user, type: 'asked', q: user.question_count
|
|
@ -1,3 +0,0 @@
|
||||||
.tab-pane.fade{role: "tabpanel", id: "asked"}
|
|
||||||
- asked.each do |user|
|
|
||||||
= render 'discover/userbox', u: user.user, type: "asked", q: user.question_count
|
|
|
@ -1,3 +1,3 @@
|
||||||
.tab-pane.fade{role: "tabpanel", id: "comments"}
|
.tab-pane.fade{ role: 'tabpanel', id: 'comments' }
|
||||||
- comments.each do |a|
|
- comments.each do |a|
|
||||||
= render 'answerbox', a: a
|
= render 'answerbox', a: a
|
|
@ -0,0 +1,3 @@
|
||||||
|
.tab-pane.fade{ role: 'tabpanel', id: 'answered' }
|
||||||
|
- answered.each do |user|
|
||||||
|
= render 'discover/userbox', u: user.user, type: 'most', a: user.answer_count
|
|
@ -1,3 +0,0 @@
|
||||||
.tab-pane.fade{role: "tabpanel", id: "answered"}
|
|
||||||
- answered.each do |user|
|
|
||||||
= render 'discover/userbox', u: user.user, type: "most", a: user.answer_count
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
.tab-pane.active.fade.show{ role: 'tabpanel', id: 'new' }
|
||||||
|
- new.each do |user|
|
||||||
|
= render 'discover/userbox', u: user, type: 'new'
|
|
@ -1,3 +0,0 @@
|
||||||
.tab-pane.active.fade.show{role: "tabpanel", id: "new"}
|
|
||||||
- new.each do |user|
|
|
||||||
= render 'discover/userbox', u: user, type: "new"
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
.tab-pane.fade{ role: 'tabpanel', id: 'questions' }
|
||||||
|
- questions.each do |q|
|
||||||
|
= render 'shared/question', q: q, type: 'discover'
|
|
@ -1,3 +0,0 @@
|
||||||
.tab-pane.fade{role: "tabpanel", id: "questions"}
|
|
||||||
- questions.each do |q|
|
|
||||||
= render 'shared/question', q: q, type: "discover"
|
|
|
@ -1,22 +1,22 @@
|
||||||
.card{data: { id: u.id }}
|
.card{ data: { id: u.id } }
|
||||||
.card-body
|
.card-body
|
||||||
.media
|
.media
|
||||||
.pull-left
|
.pull-left
|
||||||
%a{href: show_user_profile_path(u.screen_name)}
|
%a{ href: show_user_profile_path(u.screen_name) }
|
||||||
%img.avatar-md.mr-2{src: u.profile_picture.url(:medium)}
|
%img.avatar-md.mr-2{ src: u.profile_picture.url(:medium) }
|
||||||
.media-body
|
.media-body
|
||||||
%h6.media-heading.answerbox__question-user
|
%h6.media-heading.answerbox__question-user
|
||||||
- if u.display_name.blank?
|
- if u.display_name.blank?
|
||||||
%a{href: show_user_profile_path(u.screen_name)}
|
%a{ href: show_user_profile_path(u.screen_name) }
|
||||||
%span= "@#{u.screen_name}"
|
= u.screen_name
|
||||||
- else
|
- else
|
||||||
%a{href: show_user_profile_path(u.screen_name)}
|
%a{ href: show_user_profile_path(u.screen_name) }
|
||||||
%span= u.display_name
|
= 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'
|
||||||
= t('views.discover.userbox.new', time: time_ago_in_words(u.created_at))
|
= t('views.discover.userbox.new', time: time_ago_in_words(u.created_at))
|
||||||
- elsif type == "most"
|
- elsif type == 'most'
|
||||||
= t('views.discover.userbox.answers', questions: pluralize(a, t('views.general.question')))
|
= t('views.discover.userbox.answers', questions: pluralize(a, t('views.general.question')))
|
||||||
- else
|
- else
|
||||||
= t('views.discover.userbox.questions', questions: pluralize(q, t('views.general.question')))
|
= t('views.discover.userbox.questions', questions: pluralize(q, t('views.general.question')))
|
|
@ -0,0 +1,40 @@
|
||||||
|
- provide(:title, generate_title('Discover'))
|
||||||
|
|
||||||
|
.jumbotron.jumbotron--particles
|
||||||
|
.jumbotron__particles#particles
|
||||||
|
.jumbotron__content
|
||||||
|
%h1= t 'views.discover.title'
|
||||||
|
%p= t('views.discover.subtitle', app_title: APP_CONFIG['site_name'])
|
||||||
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-7.col-sm-6
|
||||||
|
%h2= t 'views.discover.content.title'
|
||||||
|
%p= t 'views.discover.content.desc'
|
||||||
|
%div{ role: 'tabpanel' }
|
||||||
|
%ul.nav.nav-tabs{ role: 'tablist' }
|
||||||
|
%li.nav-item{ role: 'presentation' }
|
||||||
|
%a.nav-link.active{ href: '#answers', role: 'tab', aria: { controls: 'answers' }, data: { toggle: 'tab' } }= t 'views.discover.content.tab.answers'
|
||||||
|
%li.nav-item{ role: 'presentation' }
|
||||||
|
%a.nav-link{ href: '#questions', role: 'tab', aria: { controls: 'questions' }, data: { toggle: 'tab' } }= t 'views.discover.content.tab.questions'
|
||||||
|
%li.nav-item{ role: 'presentation' }
|
||||||
|
%a.nav-link{ href: '#comments', role: 'tab', aria: { controls: 'comments' }, data: { toggle: 'tab' } }= t 'views.discover.content.tab.comments'
|
||||||
|
.tab-content.mt-3
|
||||||
|
= render 'discover/tab_answers', answers: @popular_answers
|
||||||
|
= render 'discover/tab_questions', questions: @popular_questions
|
||||||
|
= render 'discover/tab_discussed', comments: @most_discussed
|
||||||
|
.col-md-5.col-sm-6
|
||||||
|
%h2= t 'views.discover.people.title'
|
||||||
|
%p= t 'views.discover.people.desc'
|
||||||
|
%div{ role: 'tabpanel' }
|
||||||
|
%ul.nav.nav-tabs{ role: 'tablist' }
|
||||||
|
%li.nav-item{ role: 'presentation' }
|
||||||
|
%a.nav-link.active{ href: '#new', role: 'tab', aria: { controls: 'new' }, data: { toggle: 'tab' } }= t 'views.discover.people.tab.new'
|
||||||
|
%li.nav-item{ role: 'presentation' }
|
||||||
|
%a.nav-link{ href: '#asked', role: 'tab', aria: { controls: 'asked' }, data: { toggle: 'tab' } }= t 'views.discover.people.tab.questions'
|
||||||
|
%li.nav-item{ role: 'presentation' }
|
||||||
|
%a.nav-link{ href: '#answered', role: 'tab', aria: { controls: 'answered' }, data: { toggle: 'tab' } }= t 'views.discover.people.tab.answers'
|
||||||
|
.tab-content.mt-3
|
||||||
|
= render 'discover/tab_new', new: @new_users
|
||||||
|
= render 'discover/tab_asked', asked: @users_with_most_questions
|
||||||
|
= render 'discover/tab_most', answered: @users_with_most_answers
|
||||||
|
= render 'shared/links'
|
|
@ -1,39 +0,0 @@
|
||||||
- provide(:title, generate_title("Discover"))
|
|
||||||
.jumbotron.jumbotron--particles
|
|
||||||
#particles.jumbotron__particles
|
|
||||||
.jumbotron__content
|
|
||||||
%h1= t 'views.discover.title'
|
|
||||||
%p= t('views.discover.subtitle', app_title: APP_CONFIG['site_name'])
|
|
||||||
.container
|
|
||||||
.row
|
|
||||||
.col-md-7.col-sm-6
|
|
||||||
%h2= t 'views.discover.content.title'
|
|
||||||
%p= t 'views.discover.content.desc'
|
|
||||||
%div{role: "tabpanel"}
|
|
||||||
%ul.nav.nav-tabs{role: "tablist"}
|
|
||||||
%li.nav-item{role: "presentation"}
|
|
||||||
%a.nav-link.active{href: "#answers", role: "tab", aria: {controls: "answers"}, data: {toggle: "tab"}}= t 'views.discover.content.tab.answers'
|
|
||||||
%li.nav-item{role: "presentation"}
|
|
||||||
%a.nav-link{href: "#questions", role: "tab", aria: {controls: "questions"}, data: {toggle: "tab"}}= t 'views.discover.content.tab.questions'
|
|
||||||
%li.nav-item{role: "presentation"}
|
|
||||||
%a.nav-link{href: "#comments", role: "tab", aria: {controls: "comments"}, data: {toggle: "tab"}}= t 'views.discover.content.tab.comments'
|
|
||||||
.tab-content.mt-3
|
|
||||||
= render 'discover/tab_answers', answers: @popular_answers
|
|
||||||
= render 'discover/tab_questions', questions: @popular_questions
|
|
||||||
= render 'discover/tab_discussed', comments: @most_discussed
|
|
||||||
.col-md-5.col-sm-6
|
|
||||||
%h2= t 'views.discover.people.title'
|
|
||||||
%p= t 'views.discover.people.desc'
|
|
||||||
%div{role: "tabpanel"}
|
|
||||||
%ul.nav.nav-tabs{role: "tablist"}
|
|
||||||
%li.nav-item{role: "presentation"}
|
|
||||||
%a.nav-link.active{href: "#new", role: "tab", aria: {controls: "new"}, data: {toggle: "tab"}}= t 'views.discover.people.tab.new'
|
|
||||||
%li.nav-item{role: "presentation"}
|
|
||||||
%a.nav-link{href: "#asked", role: "tab", aria: {controls: "asked"}, data: {toggle: "tab"}}= t 'views.discover.people.tab.questions'
|
|
||||||
%li.nav-item{role: "presentation"}
|
|
||||||
%a.nav-link{href: "#answered", role: "tab", aria: {controls: "answered"}, data: {toggle: "tab"}}= t 'views.discover.people.tab.answers'
|
|
||||||
.tab-content.mt-3
|
|
||||||
= render 'discover/tab_new', new: @new_users
|
|
||||||
= render 'discover/tab_asked', asked: @users_with_most_questions
|
|
||||||
= render 'discover/tab_most', answered: @users_with_most_answers
|
|
||||||
= render 'shared/links'
|
|
Loading…
Reference in New Issue