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> <li class="breadcrumb-item"><a href="{{url($url)}}">{{ $item }}</a></li>
@endforeach @endforeach
@endisset @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> </ol>
</div><!-- /.col --> </div><!-- /.col -->
</div><!-- /.row --> </div><!-- /.row -->
</div><!-- /.container-fluid --> </div><!-- /.container-fluid -->
</div> </div>
<!-- /.content-header --> <!-- /.content-header -->

View File

@ -11,7 +11,7 @@
<!-- Sidebar user panel (optional) --> <!-- Sidebar user panel (optional) -->
<div class="user-panel mt-3 pb-3 mb-3 d-flex"> <div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="image"> <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"> <img src="{{ Gravatar::get(($user->exists AND $user->email) ? $user->email : 'nobody@example.com') }}" class="img-circle elevation-2" alt="User">
@else @else
<a name="login" href="{{ url()->current().'?login=1' }}" class="d-block"><i class="pl-1 fas fa-lock fa-2x"></i></a> <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>
<div class="info"> <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 @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>
</div> </div>
@ -34,4 +34,4 @@
<!-- /.sidebar-menu --> <!-- /.sidebar-menu -->
</div> </div>
<!-- /.sidebar --> <!-- /.sidebar -->
</aside> </aside>