@props([ 'student', 'interactive' => false, 'img' => null, 'bg' => null, 'theme' => null, 'nobg' => false, // leave background empty 'showPhoto' => false ]) @if($showPhoto === true) @if($student->photo === null) {{ __(':name\'s profile photo', ['name' => $student->nickname]) }}merge([ 'class' => "max-w-24 max-h-24 rounded-xl " ]) }}> @else {{ __(':name\'s profile photo', ['name' => $student->nickname]) }}merge([ 'class' => "max-w-24 max-h-24 rounded-xl " ]) }}> @endif @else @php $img = $img ?? ($student->avatar ?? 'YOUR-TEXT.png'); $bg = $bg ?? $student->background_image; $theme = $theme ?? ($student->theme ?? 'dark'); @endphp
merge([ 'class' => "flex justify-center rounded-xl bg-white overflow-hidden " . ($nobg ? "" : " bg-gradient-$theme ") . ($interactive ? ' cursor-pointer transition-all hover:scale-105 hover:shadow-lg ' : '') ]) }}> @if(!$slot->isEmpty()) {{ $slot }} @else {{ __(':name\'s profile picture', ['name' => $student->nickname]) }} @endif
@endif