mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Aesthetic changes to Account sheet
- Larger avatar - Less rounded sheet - Add Joined date
This commit is contained in:
parent
7c30ba35e4
commit
4b49c6fb03
4 changed files with 23 additions and 6 deletions
|
@ -471,7 +471,7 @@ button.carousel-dot[disabled].active {
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: calc(40em - 50px - 16px);
|
max-width: calc(40em - 50px - 16px);
|
||||||
border-radius: 36px 36px 0 0;
|
border-radius: 16px 16px 0 0;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
box-shadow: 0 -1px 32px var(--divider-color);
|
box-shadow: 0 -1px 32px var(--divider-color);
|
||||||
animation: slide-up 0.2s ease-out;
|
animation: slide-up 0.2s ease-out;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
color: var(--outline-color);
|
color: var(--outline-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
#account-container header{
|
#account-container header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
@ -16,8 +16,10 @@
|
||||||
#account-container .stats {
|
#account-container .stats {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 16px;
|
column-gap: 16px;
|
||||||
|
row-gap: 4px;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#account-container .actions {
|
#account-container .actions {
|
||||||
|
@ -28,4 +30,4 @@
|
||||||
}
|
}
|
||||||
#account-container .actions button {
|
#account-container .actions button {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ function Account({ account }) {
|
||||||
{!info || uiState === 'loading' ? (
|
{!info || uiState === 'loading' ? (
|
||||||
<>
|
<>
|
||||||
<header>
|
<header>
|
||||||
<Avatar size="xxl" />
|
<Avatar size="xxxl" />
|
||||||
███ ████████████
|
███ ████████████
|
||||||
</header>
|
</header>
|
||||||
<div class="note">
|
<div class="note">
|
||||||
|
@ -120,7 +120,7 @@ function Account({ account }) {
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<header>
|
<header>
|
||||||
<Avatar url={avatar} size="xxl" />
|
<Avatar url={avatar} size="xxxl" />
|
||||||
<NameText account={info} showAcct external />
|
<NameText account={info} showAcct external />
|
||||||
</header>
|
</header>
|
||||||
<div
|
<div
|
||||||
|
@ -141,6 +141,20 @@ function Account({ account }) {
|
||||||
<b title={followersCount}>{shortenNumber(followersCount)}</b>{' '}
|
<b title={followersCount}>{shortenNumber(followersCount)}</b>{' '}
|
||||||
Followers
|
Followers
|
||||||
</span>
|
</span>
|
||||||
|
{!!createdAt && (
|
||||||
|
<span>
|
||||||
|
Joined:{' '}
|
||||||
|
<b>
|
||||||
|
<time datetime={createdAt}>
|
||||||
|
{Intl.DateTimeFormat('en', {
|
||||||
|
year: 'numeric',
|
||||||
|
month: 'short',
|
||||||
|
day: 'numeric',
|
||||||
|
}).format(new Date(createdAt))}
|
||||||
|
</time>
|
||||||
|
</b>
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</p>
|
</p>
|
||||||
<p class="actions">
|
<p class="actions">
|
||||||
{followedBy ? <span class="tag">Following you</span> : <span />}{' '}
|
{followedBy ? <span class="tag">Following you</span> : <span />}{' '}
|
||||||
|
|
|
@ -6,6 +6,7 @@ const SIZES = {
|
||||||
l: 24,
|
l: 24,
|
||||||
xl: 32,
|
xl: 32,
|
||||||
xxl: 50,
|
xxl: 50,
|
||||||
|
xxxl: 64,
|
||||||
};
|
};
|
||||||
|
|
||||||
function Avatar({ url, size, alt = '' }) {
|
function Avatar({ url, size, alt = '' }) {
|
||||||
|
|
Loading…
Reference in a new issue