-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added `achievement-lockup` component with a new design - Added `lock_fill` symbol
- Loading branch information
1 parent
c08ecad
commit 064f32d
Showing
3 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions
51
resources/views/components/lockups/achievement-lockup.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@props(['achievement']) | ||
|
||
@php | ||
$borderColor = strtolower($achievement->text_color) == '#ffffffff' ? '#ffffff80' : $achievement->text_color; | ||
@endphp | ||
|
||
<div | ||
class="flex flex-col items-center justify-center border-2 border-white rounded-xl shadow-lg overflow-hidden" | ||
style="min-height: 392px; background: linear-gradient(0deg, #d7d7d7 0%, #fdfdfd 100%);" | ||
> | ||
<div class="w-24 mt-8 mr-4 ml-4 aspect-square"> | ||
<div class="flex items-center justify-center w-28 mt-2 bg-gray-200 aspect-square rounded-full overflow-hidden"> | ||
@if ($achievement->is_achieved) | ||
<picture class="relative"> | ||
<img | ||
class="w-full aspect-square lazyload" | ||
data-sizes="auto" | ||
data-src="{{ $achievement->getFirstMediaFullUrl(\App\Enums\MediaCollection::Symbol()) }}" | ||
alt="{{ $achievement->name }} Symbol" | ||
title="{{ $achievement->name }}" | ||
> | ||
|
||
<div | ||
class="absolute top-0 left-0 h-full w-full border-2 border-black/20 rounded-full" | ||
style="box-shadow: inset 0 0 10px 0 rgba(0,0,0, 0.5);" | ||
></div> | ||
</picture> | ||
@else | ||
<div class="relative flex items-center justify-center w-full text-gray-400 aspect-square"> | ||
@svg('lock_fill', 'fill-current', ['width' => '32']) | ||
|
||
<div | ||
class="absolute top-0 left-0 h-full w-full rounded-full" | ||
style="box-shadow: inset 0 0 10px 0 #8c8c8c;" | ||
></div> | ||
</div> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="flex flex-col justify-between h-full mb-8"> | ||
<div class="flex flex-col flex-grow pr-4 pl-4 pt-2 pb-2 text-center"> | ||
<p class="font-semibold text-2xl">{{ $achievement->name }}</p> | ||
<p class="text-gray-400 text-sm">{{ $achievement->description }}</p> | ||
</div> | ||
|
||
<p class="text-gray-400 text-sm text-center font-semibold"> | ||
{{ $achievement->achieved_at?->format('M d, Y') }} | ||
</p> | ||
</div> | ||
</div> |
4 changes: 2 additions & 2 deletions
4
resources/views/livewire/profile/achievements/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters