Streamline Blade directives

Laravel offers many built-in Blade directives, including: `@auth`, `@guest` ,`@csrf`, `@method`, `@json`, and more.

Review the [Blade][1] documentation for more details.

[1]: https://laravel.com/docs/5.7/blade
This commit is contained in:
Laravel Shift 2021-02-14 19:45:51 +00:00
parent 2a62eaa50a
commit 8225ff5b92
2 changed files with 10 additions and 10 deletions

View file

@ -53,7 +53,7 @@
<a href="/" class="logo"><img class="default-logo" src="/images/ponyfm-logo-white.svg"><img class="small-logo" src="/images/ponyfm-logo-white-nodisc.svg"></a>
</div>
<div class="now-playing">
@if (Auth::check())
@auth
<div class="user-details dropdown">
<a class="avatar dropdown-toggle" bs-dropdown href="#">
<img src="{{Auth::user()->getAvatarUrl(\App\Models\Image::THUMBNAIL)}}" />
@ -70,7 +70,7 @@
<a href="#" ng-click="notifPulloutToggle()"><i class="fa fa-bell fa-fw" aria-hidden="true"></i></a>
<div class="counter" ng-class="{'show': nCount > 0}">@{{ nCountFormatted }}</div>
</div>
@endif
@endauth
<pfm-player></pfm-player>
</div>
</header>
@ -90,7 +90,7 @@
<li ng-class="{selected: stateIncludes('pages')}"><a href="/about">About / FAQ</a></li>
<li><a href="https://mlpforums.com/forum/62-ponyfm/" title="Pony.fm Forum" target="_blank">Forum</a></li>
@if (Auth::check())
@auth
<li class="uploader" ui-sref-active="selected">
<a ui-sref="content.artist.account.uploader({slug: auth.user.slug})">Upload Music</a>
</li>
@ -114,7 +114,7 @@
@else
<li><a href="/login" target="_self">Login</a></li>
<li><a href="/register" target="_self">Register</a></li>
@endif
@endauth
<li class="x-attribution">
<a href="#" ng-click="showCredits()" pfm-eat-click title="Pony.fm project credits">
@if(config('ponyfm.use_powered_by_footer'))
@ -133,13 +133,13 @@
@yield('app_content')
</ui-view>
@if (Auth::check())
@auth
<div class="notification-pullout" ng-class="{'active': notifActive}">
<div class="notif-container">
<pfm-notification-list></pfm-notification-list>
</div>
</div>
@endif
@endauth
</div>
@endsection
@ -154,12 +154,12 @@
<script>
window.pfm = {
auth: {
@if (Auth::check())
@auth
isLogged: true,
user: {!! Auth::user()->toJson() !!}
@else
isLogged: false
@endif
@endauth
},
environment: "{{ App::environment() }}"
};

View file

@ -45,9 +45,9 @@
<img src="{{ $track->getCoverUrl(\App\Models\Image::SMALL) }}" />
</div>
<div class="meta">
@if (Auth::check())
@auth
<a href="#" class="favourite"><i title="Favourite this track!" class="favourite-icon fa fa-star-o"></i></a>
@endif
@endauth
<div class="progressbar">
<div class="loader"></div>
<div class="seeker"></div>