Adjustments and smaller fixes

- Fixed initially selected Discover tabs being empty
- Removed spacing classes from inbox templates
- Fixed feed layout and sidebar display
- Adjust some profile layout nits
This commit is contained in:
Andreas Nedbal 2020-04-26 16:25:54 +02:00
parent 1f678b80c1
commit 0afff3f84d
9 changed files with 32 additions and 34 deletions

View file

@ -1,3 +1,3 @@
.tab-pane.active.fade.in{role: "tabpanel", id: "answers"}
.tab-pane.active.fade.show{role: "tabpanel", id: "answers"}
- answers.each do |a|
= render 'shared/answerbox', a: a

View file

@ -1,3 +1,3 @@
.tab-pane.active.fade.in{role: "tabpanel", id: "new"}
.tab-pane.active.fade.show{role: "tabpanel", id: "new"}
- new.each do |user|
= render 'discover/userbox', u: user, type: "new"

View file

@ -1,4 +1,4 @@
.card.mb-3.inbox-box{class: "bg-#{i.new? ? 'primary' : 'default'}", data: { id: i.id }}
.card.inbox-box{class: "bg-#{i.new? ? 'primary' : 'default'}", data: { id: i.id }}
.card-header
.media
- unless i.question.author_is_anonymous

View file

@ -1,8 +1,8 @@
.card.mb-3.inbox--panel
.card.inbox--panel
.card-header= t 'views.inbox.sidebar.questions.title'
.card-body
%button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'}= t 'views.inbox.sidebar.questions.button'
.card.mb-3.inbox--panel
.card.inbox--panel
.card-header= t 'views.inbox.sidebar.share.title'
.card-body
%a.btn.btn-block.btn-primary{target: '_blank', href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}"}
@ -11,14 +11,14 @@
%a.btn.btn-block.btn-primary{target: '_blank', href: "http://www.tumblr.com/share/link?url=#{show_user_profile_url(current_user.screen_name)}&name=Ask%20me%20anything%21"}
%i.fa.fa-fw.fa-tumblr
= raw t('views.inbox.sidebar.share.button', service: "Tumblr")
.card.mb-3.inbox--panel
.card.inbox--panel
.card-header Show author
.card-body
%form#author_form
= bootstrap_form_tag url: inbox_path, method: :get do |f|
= f.text_field :author, value: params[:author], placeholder: "username", prepend: "@" , hide_label: true
= f.button "Show", name: nil, class: "btn btn-light btn-block btn-sm", id: "ib-author"
.card.mb-3.warning--panel
.card.warning--panel
.card-header= t 'views.inbox.sidebar.actions.title'
.card-body
%button.btn.btn-block.btn-danger{type: :button, id: @delete_id , disabled: (@disabled ? 'disabled' : nil), data: { ib_count: @inbox_count }}= t 'views.inbox.sidebar.actions.button'

View file

@ -1,9 +1,9 @@
= render 'navigation/feed'
.container.j2-page
.row
.col-md-3.col-sm-4
.col-md-3.col-sm-4.d-none.d-sm-block
= render 'shared/sidebar'
.col-md-9.col-xs-12.col-sm-8.j2-col-reset
.col-md-9.col-xs-12.col-sm-8
= render 'layouts/messages'
= yield
.visible-xs= render 'shared/links'

View file

@ -1,11 +1,11 @@
%li.nav-item.dropdown.profile--image-dropdown
%a.nav-link.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
%img.profile--image-avatar.hidden-xs{src: current_user.profile_picture.url(:small)}
%img.profile--image-avatar.d-none.d-sm-inline{src: current_user.profile_picture.url(:small)}
%span.d-none.d-sm-inline.d-md-none
= current_user.screen_name
%b.caret
.dropdown-menu
%h6.dropdown-header.hidden-xs= current_user.screen_name
%h6.dropdown-header.d-none.d-sm-block= current_user.screen_name
%a.dropdown-item{href: show_user_profile_path(current_user.screen_name)}
%i.fa.fa-fw.fa-user
= t('views.navigation.show')

View file

@ -1,10 +1,9 @@
.card
.card-header
%h3.card-title
- if @user.motivation_header.blank?
= t 'views.questionbox.title'
- else
= @user.motivation_header
- if @user.motivation_header.blank?
= t 'views.questionbox.title'
- else
= @user.motivation_header
.card-body
- if @user.banned?
.row

View file

@ -1,5 +1,5 @@
- header_class = if current_user.profile_header.exists? then "userbox--header-container" else "userbox--no-header" end
.card.hidden-xs
.card
%div{class: header_class}
%img.userbox--header{src: current_user.profile_header.url(:mobile)}
.card-body
@ -14,15 +14,15 @@
%span.profile--username
= current_user.screen_name
.row
%a{href: show_user_followers_path(current_user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
.col-md-6.col-sm-6.col-xs-6
%a{href: show_user_followers_path(current_user.screen_name)}
%h4.entry-text#follower-count= current_user.follower_count
%h6.entry-subtext= t('views.general.follower').pluralize(current_user.follower_count)
%a{href: show_user_friends_path(current_user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
.col-md-6.col-sm-6.col-xs-6
%a{href: show_user_friends_path(current_user.screen_name)}
%h4.entry-text#friend-count= current_user.friend_count
%h6.entry-subtext= t('views.general.following')
.card.hidden-xs
.card
.list-group
= list_group_item t('views.general.timeline'), root_path
- if APP_CONFIG.dig(:features, :public, :enabled)
@ -30,7 +30,7 @@
- current_user.groups.each do |group|
= list_group_item group.display_name, group_timeline_path(group.name)
- unless @group.nil?
.card.profile--panel.hidden-xs
.card.profile--panel
.card-header
%h3.card-title= t('views.group.members')
.card-body
@ -38,4 +38,4 @@
%a{href: show_user_profile_path(member.user.screen_name), title: member.user.screen_name, data: { toggle: :tooltip, placement: :top }}
%img.img-rounded.answerbox--img-small{src: member.user.profile_picture.url(:medium)}
.hidden-xs= render 'shared/links'
= render 'shared/links'

View file

@ -1,22 +1,21 @@
.card.profile--panel#profile-stats
.card-header
%h3.card-title Stats
.card-header Stats
.card-body
.row
%a{href: show_user_followers_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
.col-md-6.col-sm-6.col-xs-6
%a{href: show_user_followers_path(@user.screen_name)}
%h4.entry-text#follower-count= @user.follower_count
%h6.entry-subtext= t('views.general.follower').pluralize(@user.follower_count)
%a{href: show_user_friends_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
.col-md-6.col-sm-6.col-xs-6
%a{href: show_user_friends_path(@user.screen_name)}
%h4.entry-text#friend-count= @user.friend_count
%h6.entry-subtext= t('views.general.following')
.row
%a{href: show_user_questions_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
.col-md-6.col-sm-6.col-xs-6
%a{href: show_user_questions_path(@user.screen_name)}
%h4.entry-text#asked-count= @user.asked_count
%h6.entry-subtext= t('views.general.question').pluralize(@user.asked_count)
%a{href: show_user_profile_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
.col-md-6.col-sm-6.col-xs-6
%a{href: show_user_profile_path(@user.screen_name)}
%h4.entry-text#answered-count= @user.answered_count
%h6.entry-subtext= t('views.general.answer').pluralize(@user.answered_count)