From dba4be1038063845a74e83aaa85d6ab08d5625dd Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 7 Mar 2022 11:38:52 +0100 Subject: Change appearance of account cards in web UI (#17689) * Change appearance of account cards in web UI * Various fixes and improvements * Various fixes and improvements --- app/views/directories/index.html.haml | 57 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 29 deletions(-) (limited to 'app/views/directories') diff --git a/app/views/directories/index.html.haml b/app/views/directories/index.html.haml index 04639e32c..2b338115b 100644 --- a/app/views/directories/index.html.haml +++ b/app/views/directories/index.html.haml @@ -19,37 +19,36 @@ - else .directory__list - @accounts.each do |account| - .directory__card - .directory__card__img - = image_tag account.header.url, alt: '' - .directory__card__bar - = link_to TagManager.instance.url_for(account), class: 'directory__card__bar__name' do - .avatar - = image_tag account.avatar.url, alt: '', class: 'u-photo' - + .account-card + = link_to TagManager.instance.url_for(account), class: 'account-card__permalink' do + .account-card__header + = image_tag account.header.url, alt: '' + .account-card__title + .account-card__title__avatar + = image_tag account.avatar.url, alt: '' .display-name %bdi %strong.emojify.p-name= display_name(account, custom_emojify: true) - %span= acct(account) - .directory__card__bar__relationship.account__relationship - = minimal_account_action_button(account) - - .directory__card__extra - .account__header__content.emojify= Formatter.instance.simplified_format(account, custom_emojify: true) - - .directory__card__extra - .accounts-table__count - = friendly_number_to_human account.statuses_count - %small= t('accounts.posts', count: account.statuses_count).downcase - .accounts-table__count - = friendly_number_to_human account.followers_count - %small= t('accounts.followers', count: account.followers_count).downcase - .accounts-table__count - - if account.last_status_at.present? - %time.time-ago{ datetime: account.last_status_at.to_date.iso8601, title: l(account.last_status_at.to_date) }= l account.last_status_at.to_date - - else - = t('accounts.never_active') - - %small= t('accounts.last_active') + %span + = acct(account) + = fa_icon('lock') if account.locked? + - if account.note.present? + .account-card__bio.emojify + = Formatter.instance.simplified_format(account, custom_emojify: true) + - else + .flex-spacer + .account-card__actions + .account-card__counters + .account-card__counters__item + = friendly_number_to_human account.statuses_count + %small= t('accounts.posts', count: account.statuses_count).downcase + .account-card__counters__item + = friendly_number_to_human account.followers_count + %small= t('accounts.followers', count: account.followers_count).downcase + .account-card__counters__item + = friendly_number_to_human account.following_count + %small= t('accounts.following', count: account.following_count).downcase + .account-card__actions__button + = account_action_button(account) = paginate @accounts -- cgit