Some minor improvements for projects that dont set /page_title

This commit is contained in:
Deon George 2020-08-23 10:31:08 +10:00
parent 432606760b
commit 7dc9ebf3a6
2 changed files with 7 additions and 5 deletions

View File

@ -15,10 +15,12 @@
<li class="breadcrumb-item"><a href="{{url($url)}}">{{ $item }}</a></li>
@endforeach
@endisset
<li class="breadcrumb-item active">@yield('page_title','Page Title')</li>
@if(View::hasSection('page_title'))
<li class="breadcrumb-item active">@yield('page_title','Page Title')</li>
@endif
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- /.content-header -->

View File

@ -11,7 +11,7 @@
<!-- Sidebar user panel (optional) -->
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="image">
@if($user->exists)
@if(isset($user) AND $user->exists)
<img src="{{ Gravatar::get(($user->exists AND $user->email) ? $user->email : 'nobody@example.com') }}" class="img-circle elevation-2" alt="User">
@else
<a name="login" href="{{ url()->current().'?login=1' }}" class="d-block"><i class="pl-1 fas fa-lock fa-2x"></i></a>
@ -19,7 +19,7 @@
</div>
<div class="info">
<a href="{{ url('login') }}" class="d-block">{{ $user->exists ? ($user->name ?: 'No Name') : 'Login' }}</a>
<a href="{{ url('login') }}" class="d-block">{{ (isset($user) AND $user->exists) ? ($user->name ?: 'No Name') : 'Login' }}</a>
@isset($user->lastlogin)<a name="login" span="d-block"><small><span style="color: #747474;">Last On:</span> {{ $user->lastlogin->format('Y-m-d H:i') }}</small></a>@endisset
</div>
</div>
@ -34,4 +34,4 @@
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>
</aside>