Commit 073aecd4 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: styling

parent 3e1c679f
...@@ -134,94 +134,98 @@ ...@@ -134,94 +134,98 @@
}} }}
/> />
<div class="flex space-x-5"> <div class="space-y-1">
<div class="flex flex-col"> <!-- <div class=" text-sm font-medium">{$i18n.t('Account')}</div> -->
<div class="self-center mt-2">
<button
class="relative rounded-full dark:bg-gray-700"
type="button"
on:click={() => {
profileImageInputElement.click();
}}
>
<img
src={profileImageUrl !== '' ? profileImageUrl : generateInitialsImage(name)}
alt="profile"
class=" rounded-full size-16 object-cover"
/>
<div <div class="flex space-x-5">
class="absolute flex justify-center rounded-full bottom-0 left-0 right-0 top-0 h-full w-full overflow-hidden bg-gray-700 bg-fixed opacity-0 transition duration-300 ease-in-out hover:opacity-50" <div class="flex flex-col">
<div class="self-center mt-2">
<button
class="relative rounded-full dark:bg-gray-700"
type="button"
on:click={() => {
profileImageInputElement.click();
}}
> >
<div class="my-auto text-gray-100"> <img
<svg src={profileImageUrl !== '' ? profileImageUrl : generateInitialsImage(name)}
xmlns="http://www.w3.org/2000/svg" alt="profile"
viewBox="0 0 20 20" class=" rounded-full size-16 object-cover"
fill="currentColor" />
class="w-5 h-5"
> <div
<path class="absolute flex justify-center rounded-full bottom-0 left-0 right-0 top-0 h-full w-full overflow-hidden bg-gray-700 bg-fixed opacity-0 transition duration-300 ease-in-out hover:opacity-50"
d="m2.695 14.762-1.262 3.155a.5.5 0 0 0 .65.65l3.155-1.262a4 4 0 0 0 1.343-.886L17.5 5.501a2.121 2.121 0 0 0-3-3L3.58 13.419a4 4 0 0 0-.885 1.343Z" >
/> <div class="my-auto text-gray-100">
</svg> <svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
class="w-5 h-5"
>
<path
d="m2.695 14.762-1.262 3.155a.5.5 0 0 0 .65.65l3.155-1.262a4 4 0 0 0 1.343-.886L17.5 5.501a2.121 2.121 0 0 0-3-3L3.58 13.419a4 4 0 0 0-.885 1.343Z"
/>
</svg>
</div>
</div> </div>
</div> </button>
</button> </div>
</div> </div>
</div>
<div class="flex-1 flex flex-col self-center"> <div class="flex-1 flex flex-col self-center gap-0.5">
<div class=" font-medium mb-1.5">{$i18n.t('Profile Image')}</div> <div class=" mb-0.5 text-sm font-medium">{$i18n.t('Profile Image')}</div>
<div> <div>
<button <button
class=" text-xs text-center text-gray-800 dark:text-gray-400 rounded-lg px-4 py-1 bg-gray-100 dark:bg-gray-850" class=" text-xs text-center text-gray-800 dark:text-gray-400 rounded-full px-4 py-0.5 bg-gray-100 dark:bg-gray-850"
on:click={async () => { on:click={async () => {
if (canvasPixelTest()) { if (canvasPixelTest()) {
profileImageUrl = generateInitialsImage(name); profileImageUrl = generateInitialsImage(name);
} else { } else {
toast.info( toast.info(
$i18n.t( $i18n.t(
'Fingerprint spoofing detected: Unable to use initials as avatar. Defaulting to default profile image.' 'Fingerprint spoofing detected: Unable to use initials as avatar. Defaulting to default profile image.'
), ),
{ {
duration: 1000 * 10 duration: 1000 * 10
} }
); );
} }
}}>{$i18n.t('Use Initials')}</button }}>{$i18n.t('Use Initials')}</button
> >
<button <button
class=" text-xs text-center text-gray-800 dark:text-gray-400 rounded-lg px-4 py-1 bg-gray-100 dark:bg-gray-850" class=" text-xs text-center text-gray-800 dark:text-gray-400 rounded-full px-4 py-0.5 bg-gray-100 dark:bg-gray-850"
on:click={async () => { on:click={async () => {
const url = await getGravatarUrl($user.email); const url = await getGravatarUrl($user.email);
profileImageUrl = url; profileImageUrl = url;
}}>{$i18n.t('Use Gravatar')}</button }}>{$i18n.t('Use Gravatar')}</button
> >
<button <button
class=" text-xs text-center text-gray-800 dark:text-gray-400 rounded-lg px-4 py-1 bg-gray-100 dark:bg-gray-850" class=" text-xs text-center text-gray-800 dark:text-gray-400 rounded-lg px-2 py-1"
on:click={async () => { on:click={async () => {
profileImageUrl = '/user.png'; profileImageUrl = '/user.png';
}}>{$i18n.t('Remove')}</button }}>{$i18n.t('Remove')}</button
> >
</div>
</div> </div>
</div> </div>
</div>
<div class="flex-1"> <div class="pt-0.5">
<div class="flex flex-col w-full"> <div class="flex flex-col w-full">
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Name')}</div> <div class=" mb-1 text-xs font-medium">{$i18n.t('Name')}</div>
<div class="flex-1"> <div class="flex-1">
<input <input
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none" class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
type="text" type="text"
bind:value={name} bind:value={name}
required required
/> />
</div>
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment