diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/admin/account_moderation_notes_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/home_helper.rb | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/admin/account_moderation_notes_helper.rb b/app/helpers/admin/account_moderation_notes_helper.rb index 25586fbba..4d8f0352e 100644 --- a/app/helpers/admin/account_moderation_notes_helper.rb +++ b/app/helpers/admin/account_moderation_notes_helper.rb @@ -4,7 +4,7 @@ module Admin::AccountModerationNotesHelper def admin_account_link_to(account) return if account.nil? - link_to admin_account_path(account.id), class: name_tag_classes(account) do + link_to admin_account_path(account.id), class: name_tag_classes(account), title: account.acct do safe_join([ image_tag(account.avatar.url, width: 15, height: 15, alt: display_name(account), class: 'avatar'), content_tag(:span, account.acct, class: 'username'), @@ -15,7 +15,7 @@ module Admin::AccountModerationNotesHelper def admin_account_inline_link_to(account) return if account.nil? - link_to admin_account_path(account.id), class: name_tag_classes(account, true) do + link_to admin_account_path(account.id), class: name_tag_classes(account, true), title: account.acct do content_tag(:span, account.acct, class: 'username') end end diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index f5b501235..0157785fa 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -7,13 +7,13 @@ module HomeHelper } end - def account_link_to(account, button = '') + def account_link_to(account, button = '', size: 36, path: nil) content_tag(:div, class: 'account') do content_tag(:div, class: 'account__wrapper') do section = if account.nil? content_tag(:div, class: 'account__display-name') do content_tag(:div, class: 'account__avatar-wrapper') do - content_tag(:div, '', class: 'account__avatar', style: "background-image: url(#{full_asset_url('avatars/original/missing.png', skip_pipeline: true)})") + content_tag(:div, '', class: 'account__avatar', style: "width: #{size}px; height: #{size}px; background-size: #{size}px #{size}px; background-image: url(#{full_asset_url('avatars/original/missing.png', skip_pipeline: true)})") end + content_tag(:span, class: 'display-name') do content_tag(:strong, t('about.contact_missing')) + @@ -21,9 +21,9 @@ module HomeHelper end end else - link_to(TagManager.instance.url_for(account), class: 'account__display-name') do + link_to(path || TagManager.instance.url_for(account), class: 'account__display-name') do content_tag(:div, class: 'account__avatar-wrapper') do - content_tag(:div, '', class: 'account__avatar', style: "background-image: url(#{account.avatar.url})") + content_tag(:div, '', class: 'account__avatar', style: "width: #{size}px; height: #{size}px; background-size: #{size}px #{size}px; background-image: url(#{account.avatar.url})") end + content_tag(:span, class: 'display-name') do content_tag(:bdi) do |