Skip to content

Commit

Permalink
feat: profile component (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
ell-ska authored Feb 13, 2025
2 parents e5a4ebb + b40a746 commit af0778b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions resources/views/components/profile.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@props([
'user',
'stats' => [
'lists' => 0,
'reviews' => 0,
'friends' => 0,
],
])

<div class="relative flex w-full">
<div class="absolute top-0 right-0">
<x-lucide-ellipsis-vertical class="size-6 text-slate-50" />
</div>

<div class="mr-8 flex w-full flex-row flex-wrap items-center gap-4">
<x-avatar :image="$user->image ?? null" size="lg" />

<div class="flex grow flex-col gap-3 text-slate-50">
<div class="text-lg font-bold">
{{ $user->username }}
</div>
<div class="flex gap-6 text-slate-50">
@foreach ($stats as $stat => $sum)
<div class="flex flex-col">
<p class="text-sm font-bold">
{{ $sum }}
</p>
<span class="text-sm font-normal text-slate-200">
{{ $stat }}
</span>
</div>
@endforeach
</div>
</div>

<div class="flex flex-none flex-row gap-2 self-start">
{{ $slot }}
</div>
</div>
</div>
Empty file modified resources/views/profile.blade.php
100644 → 100755
Empty file.

0 comments on commit af0778b

Please sign in to comment.