diff --git a/app/views/about/index.html.haml b/app/views/about/index.html.haml index 10508f9f..b8b0a1d1 100644 --- a/app/views/about/index.html.haml +++ b/app/views/about/index.html.haml @@ -47,13 +47,17 @@ .card-body .row.mx-n2 .col.px-2 - %button.btn.btn-block.btn-success.js-theme-button{ data: { theme: "theme-success" } }= t(".customize.themes.green") + .d-grid + %button.btn.btn-success.js-theme-button{ data: { theme: "theme-success" } }= t(".customize.themes.green") .col.px-2 - %button.btn.btn-block.btn-warning.js-theme-button{ data: { theme: "theme-warning" } }= t(".customize.themes.orange") + .d-grid + %button.btn.btn-warning.js-theme-button{ data: { theme: "theme-warning" } }= t(".customize.themes.orange") .col.px-2 - %button.btn.btn-block.btn-danger.js-theme-button{ data: { theme: "theme-danger" } }= t(".customize.themes.red") + .d-grid + %button.btn.btn-danger.js-theme-button{ data: { theme: "theme-danger" } }= t(".customize.themes.red") .col.px-2 - %button.btn.btn-block.btn-default.js-theme-button{ data: { theme: "reset" } }= t(".customize.themes.reset") + .d-grid + %button.btn.btn-default.js-theme-button{ data: { theme: "reset" } }= t(".customize.themes.reset") .container.text-center %h2.mb-4= t(".more_features") diff --git a/app/views/application/_questionbox.html.haml b/app/views/application/_questionbox.html.haml index 53331753..42c0731e 100644 --- a/app/views/application/_questionbox.html.haml +++ b/app/views/application/_questionbox.html.haml @@ -50,9 +50,11 @@ %strong= t(".promote.message") .row .col-sm-5.offset-sm-1 - %button.btn.btn-block.btn-primary#create-account= t(".promote.create") + .d-grid + %button.btn.btn-primary#create-account= t(".promote.create") .col-sm-5 - %button.btn.btn-block.btn-default#new-question= t(".promote.another") + .d-grid + %button.btn.btn-default#new-question= t(".promote.another") .row .col-xs-12.col-sm-10.offset-sm-1.text-center %small= t(".promote.join", app_title: APP_CONFIG["site_name"]) diff --git a/app/views/user/_actions.html.haml b/app/views/user/_actions.html.haml index d86fc6a4..909efe22 100644 --- a/app/views/user/_actions.html.haml +++ b/app/views/user/_actions.html.haml @@ -1,54 +1,56 @@ .profile__actions - type ||= :nil - if user_signed_in? && user == current_user - %a.btn.btn-dark.btn-block{ href: settings_profile_path } Edit profile + .d-grid + %a.btn.btn-dark{ href: settings_profile_path } Edit profile - elsif user_signed_in? - - if current_user.following? user - %button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name } } - = t("voc.unfollow") - - else - %button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name } } - = t("voc.follow") - .btn-group.btn-block - %button.btn.btn-light.btn-block.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } } - = t(".title") - %span.caret - .dropdown-menu - %a.dropdown-item.d-block.d-sm-none{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } } - %i.fa.fa-list.fa-fw - = t(".list") - - if current_user.blocking?(user) - %a.dropdown-item{ href: '#', data: { action: :unblock, target: user.screen_name } } - %i.fa.fa-minus-circle.fa-fw - %span.pe-none= t("voc.unblock") - - else - %a.dropdown-item{ href: '#', data: { action: :block, target: user.screen_name } } - %i.fa.fa-minus-circle.fa-fw - %span.pe-none= t("voc.block") - - if current_user.muting?(user) - %a.dropdown-item{ href: '#', data: { action: :unmute, target: user.screen_name } } - %i.fa.fa-volume-off.fa-fw - %span.pe-none= t("voc.unmute") - - else - %a.dropdown-item{ href: '#', data: { action: :mute, target: user.screen_name } } - %i.fa.fa-volume-off.fa-fw - %span.pe-none= t("voc.mute") - %a.dropdown-item{ href: '#', data: { action: 'report-user', target: user.screen_name } } - %i.fa.fa-exclamation-triangle.fa-fw - = t("voc.report") - - if current_user.mod? - %a.dropdown-item{ href: '#', data: { bs_target: '#modal-privileges', bs_toggle: :modal } } - %i.fa.fa-wrench.fa-fw - = raw t(".privilege", user: user.screen_name) - - unless user.has_cached_role?(:administrator) - %a.dropdown-item{ href: '#', data: { bs_target: '#modal-ban', bs_toggle: :modal } } - %i.fa.fa-ban.fa-fw - = t(".ban") - - if current_user.mod? && user != current_user - %a.dropdown-item{ href: mod_inbox_index_path(user: user.screen_name) } - %i.fa.fa-inbox.fa-fw - = t(".view_inbox") - - if current_user.has_cached_role? :administrator - %a.dropdown-item{ href: rails_admin_path_for_resource(user), target: '_blank' } - %i.fa.fa-cogs.fa-fw - = t("voc.view_in_rails_admin") + .d-grid.gap-2 + - if current_user.following? user + %button.btn.btn-primary{ type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name } } + = t("voc.unfollow") + - else + %button.btn.btn-primary{ type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name } } + = t("voc.follow") + .btn-group + %button.btn.btn-light.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } } + = t(".title") + %span.caret + .dropdown-menu + %a.dropdown-item.d-block.d-sm-none{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } } + %i.fa.fa-list.fa-fw + = t(".list") + - if current_user.blocking?(user) + %a.dropdown-item{ href: '#', data: { action: :unblock, target: user.screen_name } } + %i.fa.fa-minus-circle.fa-fw + %span.pe-none= t("voc.unblock") + - else + %a.dropdown-item{ href: '#', data: { action: :block, target: user.screen_name } } + %i.fa.fa-minus-circle.fa-fw + %span.pe-none= t("voc.block") + - if current_user.muting?(user) + %a.dropdown-item{ href: '#', data: { action: :unmute, target: user.screen_name } } + %i.fa.fa-volume-off.fa-fw + %span.pe-none= t("voc.unmute") + - else + %a.dropdown-item{ href: '#', data: { action: :mute, target: user.screen_name } } + %i.fa.fa-volume-off.fa-fw + %span.pe-none= t("voc.mute") + %a.dropdown-item{ href: '#', data: { action: 'report-user', target: user.screen_name } } + %i.fa.fa-exclamation-triangle.fa-fw + = t("voc.report") + - if current_user.mod? + %a.dropdown-item{ href: '#', data: { bs_target: '#modal-privileges', bs_toggle: :modal } } + %i.fa.fa-wrench.fa-fw + = raw t(".privilege", user: user.screen_name) + - unless user.has_cached_role?(:administrator) + %a.dropdown-item{ href: '#', data: { bs_target: '#modal-ban', bs_toggle: :modal } } + %i.fa.fa-ban.fa-fw + = t(".ban") + - if current_user.mod? && user != current_user + %a.dropdown-item{ href: mod_inbox_index_path(user: user.screen_name) } + %i.fa.fa-inbox.fa-fw + = t(".view_inbox") + - if current_user.has_cached_role? :administrator + %a.dropdown-item{ href: rails_admin_path_for_resource(user), target: '_blank' } + %i.fa.fa-cogs.fa-fw + = t("voc.view_in_rails_admin")