94 lines
4.8 KiB
PHP
94 lines
4.8 KiB
PHP
@extends('layouts.app')
|
|||
|
|
|
||
|
|
@section('content')
|
||
|
|
<div class="container">
|
||
|
|
<div class="row justify-content-center">
|
||
|
|
<div class="col-md-8">
|
||
|
|
<div class="card">
|
||
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
||
|
|
<span>{{ $user->name }}'s Profile</span>
|
||
|
|
@auth
|
||
|
|
@if (Auth::id() === $user->id)
|
||
|
|
<a href="{{ route('profile.edit') }}" class="btn btn-sm btn-primary">Edit Profile</a>
|
||
|
|
@endif
|
||
|
|
@endauth
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="card-body">
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-md-3 text-center">
|
||
|
|
@if ($user->avatar)
|
||
|
|
<img src="{{ $user->avatar_url }}" alt="{{ $user->name }}" class="img-fluid rounded-circle mb-3" style="max-width: 150px;">
|
||
|
|
@else
|
||
|
|
<div class="bg-secondary text-white rounded-circle d-flex align-items-center justify-content-center mb-3" style="width: 150px; height: 150px; font-size: 48px; margin: 0 auto;">
|
||
|
|
{{ strtoupper(substr($user->name, 0, 1)) }}
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-md-9">
|
||
|
|
<h3>{{ $user->name }}</h3>
|
||
|
|
<p class="text-muted">{{ $user->email }}</p>
|
||
|
|
|
||
|
|
@if ($user->bio)
|
||
|
|
<div class="mt-3">
|
||
|
|
<h5>Bio</h5>
|
||
|
|
<p>{{ $user->bio }}</p>
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
|
||
|
|
@if ($user->website || $user->twitter || $user->github || $user->linkedin)
|
||
|
|
<div class="mt-4">
|
||
|
|
<h5>Links</h5>
|
||
|
|
<ul class="list-unstyled">
|
||
|
|
@if ($user->website)
|
||
|
|
<li class="mb-2">
|
||
|
|
<strong>Website:</strong>
|
||
|
|
<a href="{{ $user->website }}" target="_blank" rel="noopener">{{ $user->website }}</a>
|
||
|
|
</li>
|
||
|
|
@endif
|
||
|
|
@if ($user->twitter)
|
||
|
|
<li class="mb-2">
|
||
|
|
<strong>Twitter:</strong>
|
||
|
|
<a href="https://twitter.com/{{ $user->twitter }}" target="_blank" rel="noopener">@{{ $user->twitter }}</a>
|
||
|
|
</li>
|
||
|
|
@endif
|
||
|
|
@if ($user->github)
|
||
|
|
<li class="mb-2">
|
||
|
|
<strong>GitHub:</strong>
|
||
|
|
<a href="https://github.com/{{ $user->github }}" target="_blank" rel="noopener">{{ $user->github }}</a>
|
||
|
|
</li>
|
||
|
|
@endif
|
||
|
|
@if ($user->linkedin)
|
||
|
|
<li class="mb-2">
|
||
|
|
<strong>LinkedIn:</strong>
|
||
|
|
<a href="https://linkedin.com/in/{{ $user->linkedin }}" target="_blank" rel="noopener">{{ $user->linkedin }}</a>
|
||
|
|
</li>
|
||
|
|
@endif
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
|
||
|
|
@if ($user->roles->isNotEmpty())
|
||
|
|
<div class="mt-4">
|
||
|
|
<h5>Roles</h5>
|
||
|
|
<div>
|
||
|
|
@foreach ($user->roles as $role)
|
||
|
|
<span class="badge bg-primary me-1">{{ $role->name }}</span>
|
||
|
|
@endforeach
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
|
||
|
|
<div class="mt-3 text-muted">
|
||
|
|
<small>Member since {{ $user->created_at->format('F Y') }}</small>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
@endsection
|