wip(org): Working on stats/users pages
This commit is contained in:
parent
873539c92b
commit
ffe938783f
13 changed files with 392 additions and 6 deletions
42
sites/shared/components/user-profile.mjs
Normal file
42
sites/shared/components/user-profile.mjs
Normal file
|
@ -0,0 +1,42 @@
|
|||
import { cloudflareImageUrl } from 'shared/utils.mjs'
|
||||
import { Fingerprint } from 'shared/components/fingerprint.mjs'
|
||||
import { Role } from 'shared/components/role.mjs'
|
||||
import { Mdx } from 'shared/components/mdx/dynamic.mjs'
|
||||
|
||||
export const UserProfile = ({ user }) => (
|
||||
<>
|
||||
<div className="text-center max-w-prose">
|
||||
<img
|
||||
src={cloudflareImageUrl({ id: `uid-${user.ihash}` })}
|
||||
className="mx-auto max-w-96 shrink-0 grow-0 rounded-full shadow"
|
||||
/>
|
||||
<div className="w-2/3 px-8">
|
||||
<h2 className="flex flex-row items-center justify-between w-full">
|
||||
{user.username}
|
||||
<Fingerprint id={user.id} />
|
||||
<Role role={user.role} />
|
||||
<span>{user.role}</span>
|
||||
</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>k</th>
|
||||
<th>v</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{user.username}</td>
|
||||
<td>username</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<img
|
||||
src={cloudflareImageUrl({ id: `uid-${user.ihash}` })}
|
||||
className="w-1/3 shrink-0 grow-0 rounded-lg shadow"
|
||||
/>
|
||||
</div>
|
||||
<Mdx md={user.bio} />
|
||||
</>
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue