Improve profile details

- Re-order details so numbers are first
- Only have interaction hover and active styling for the links
This commit is contained in:
Nick Colley 2023-02-01 11:19:29 +00:00
parent 4f36e16808
commit 7d79b98e8b
1 changed files with 12 additions and 13 deletions

View File

@ -1,36 +1,36 @@
<h2 class="sr-only">{intl.statisticsAndMoreOptions}</h2> <h2 class="sr-only">{intl.statisticsAndMoreOptions}</h2>
<div class="account-profile-details"> <div class="account-profile-details">
<div class="account-profile-details-item"> <div class="account-profile-details-item">
<span class="account-profile-details-item-title">
{intl.statuses}
</span>
<span class="account-profile-details-item-datum"> <span class="account-profile-details-item-datum">
{numStatusesDisplay} {numStatusesDisplay}
</span> </span>
<span class="account-profile-details-item-title">
{intl.statuses}
</span>
</div> </div>
<a class="account-profile-details-item" <a class="account-profile-details-item"
href='/accounts/{account.id}/follows' href='/accounts/{account.id}/follows'
aria-label={followingLabel} aria-label={followingLabel}
rel="prefetch" rel="prefetch"
> >
<span class="account-profile-details-item-title">
{intl.follows}
</span>
<span class="account-profile-details-item-datum"> <span class="account-profile-details-item-datum">
{numFollowingDisplay} {numFollowingDisplay}
</span> </span>
<span class="account-profile-details-item-title">
{intl.follows}
</span>
</a> </a>
<a class="account-profile-details-item" <a class="account-profile-details-item"
href='/accounts/{account.id}/followers' href='/accounts/{account.id}/followers'
aria-label={followersLabel} aria-label={followersLabel}
rel="prefetch" rel="prefetch"
> >
<span class="account-profile-details-item-title">
{intl.followers}
</span>
<span class="account-profile-details-item-datum"> <span class="account-profile-details-item-datum">
{numFollowersDisplay} {numFollowersDisplay}
</span> </span>
<span class="account-profile-details-item-title">
{intl.followers}
</span>
</a> </a>
<!-- TODO: re-enable this when we support profile editing --> <!-- TODO: re-enable this when we support profile editing -->
{#if account && verifyCredentials && account.id !== verifyCredentials.id} {#if account && verifyCredentials && account.id !== verifyCredentials.id}
@ -61,24 +61,23 @@
font-size: 1.1em; font-size: 1.1em;
} }
.account-profile-details-item:hover { .account-profile-details-item[href]:hover {
text-decoration: none; text-decoration: none;
background: var(--button-bg-hover); background: var(--button-bg-hover);
cursor: pointer; cursor: pointer;
} }
.account-profile-details-item:active { .account-profile-details-item[href]:active {
background: var(--button-bg-active); background: var(--button-bg-active);
} }
.account-profile-details-item-title { .account-profile-details-item-title {
color: var(--deemphasized-text-color); color: var(--deemphasized-text-color);
margin-right: 5px;
} }
.account-profile-details-item-datum { .account-profile-details-item-datum {
color: var(--body-text-color); color: var(--body-text-color);
margin-left: 5px; margin-right: 5px;
font-weight: 600; font-weight: 600;
} }