1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-08 06:35:19 +02:00

fix: Make look of public profile like internal

This commit is contained in:
Lars Lehmann 2025-01-23 18:39:37 +01:00
parent e0fa62c1ea
commit 27b7f3a350
No known key found for this signature in database
GPG key ID: BC832CCD9A8BAE4D
3 changed files with 6752 additions and 8 deletions

6737
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -108,5 +108,5 @@
<svelte:head>
<title>Profile | AdventureLog</title>
<meta name="description" content="{data.user.first_name}'s profile on AdventureLog." />
<meta name="description" content="View your adventure collections." />
</svelte:head>

View file

@ -1,20 +1,23 @@
<script lang="ts">
import type { PageData } from './$types';
import { t } from 'svelte-i18n';
export let data: PageData;
const user = data.props.user;
console.log(user);
</script>
{#if user.profile_pic}
<div class="avatar flex items-center justify-center mt-4">
<div class="w-48 rounded-md">
<div class="w-24 rounded-full ring ring-primary ring-offset-base-100 ring-offset-2 shadow-md">
<img src={user.profile_pic} alt={user.username} />
</div>
</div>
{/if}
<h1 class="text-center font-semibold text-4xl mt-4">{user.first_name} {user.last_name}</h1>
<h1 class="text-center font-semibold text-4xl mt-4 text-primary">
{user.first_name}
{user.last_name}
</h1>
<h2 class="text-center font-semibold text-2xl">{user.username}</h2>
<div class="flex justify-center mt-4">
@ -24,12 +27,16 @@
</div>
<div class="flex justify-center mt-4">
<p class="text-sm text-neutral-content">
{user.date_joined ? 'Joined ' + new Date(user.date_joined).toLocaleDateString() : ''}
<p class="text-lg font-medium">{$t('profile.member_since')}</p>
<div class="flex items-center ml-2">
<iconify-icon icon="mdi:calendar" class="text-2xl text-primary"></iconify-icon>
<p class="ml-2 text-lg">
{new Date(user.date_joined).toLocaleDateString(undefined, { timeZone: 'UTC' })}
</p>
</div>
</div>
<svelte:head>
<title>{user.username} | AdventureLog</title>
<meta name="description" content="View your adventure collections." />
<meta name="description" content="{user.first_name}'s profile on AdventureLog." />
</svelte:head>