Pony.fm/app/views/shared/_app_layout.blade.php

127 lines
3.7 KiB
PHP
Raw Normal View History

2013-07-25 23:33:04 +02:00
@extends('shared._layout')
@section('content')
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '186765381447538',
status: true,
cookie: true,
xfbml: true
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
2013-07-25 23:33:04 +02:00
<header>
<a href="/">pony.fm <small>(beta)</small></a>
2013-08-13 07:11:14 +02:00
<div class="now-playing">
@if (Auth::check())
<div class="user-details dropdown">
<a class="avatar dropdown-toggle" href="#">
<img src="{{Auth::user()->getAvatarUrl(\Entities\Image::THUMBNAIL)}}" />
<span><i class="icon-chevron-down"></i></span>
</a>
<ul class="dropdown-menu">
<li><a href="{{Auth::user()->url}}">Your Profile</a></li>
<li><a href="#" pfm-eat-click ng-click="logout()">Logout</a></li>
</ul>
</div>
@endif
2013-08-13 07:11:14 +02:00
<pfm-player></pfm-player>
2013-07-25 23:33:04 +02:00
</div>
</header>
<div class="site-body">
2013-08-13 07:11:14 +02:00
<ul class="sidebar" ng-controller="sidebar">
@if (Auth::check())
2013-09-03 11:42:03 +02:00
<li ng-class="{selected: stateIncludes('home')}"><a href="/">Dashboard</a></li>
2013-08-13 07:11:14 +02:00
@else
2013-09-03 11:42:03 +02:00
<li ng-class="{selected: stateIncludes('home')}"><a href="/">Home</a></li>
2013-08-13 07:11:14 +02:00
@endif
2013-08-18 06:18:41 +02:00
<li ng-class="{selected: (stateIncludes('content') && !isPinnedPlaylistSelected)}">
2013-09-03 11:42:03 +02:00
<a href="/tracks">Discover</a>
2013-08-13 07:11:14 +02:00
</li>
@if (Auth::check())
2013-09-03 11:42:03 +02:00
<li ng-class="{selected: stateIncludes('favourites')}"><a href="/account/favourites/tracks">Favourites</a></li>
<li ng-class="{selected: stateIncludes('account')}"><a href="/account/tracks">Account</a></li>
2013-08-13 07:11:14 +02:00
@endif
2013-09-03 11:42:03 +02:00
<li ng-class="{selected: isActive('/about')}"><a href="/about">About</a></li>
2013-08-13 07:11:14 +02:00
@if (Auth::check())
<li class="uploader" ng-class="{selected: stateIncludes('uploader')}">
2013-09-03 11:42:03 +02:00
<a href="/account/uploader">Upload Music</a>
</li>
2013-08-13 07:11:14 +02:00
<li>
<h3>
<a href="#" ng-click="createPlaylist()" pfm-eat-click title="Create Playlist"><i class="icon-plus"></i></a>
Playlists
</h3>
</li>
<li class="none" ng-show="!playlists.length"><span>no pinned playlists</span></li>
2013-08-18 06:18:41 +02:00
<li class="dropdown" ng-repeat="playlist in playlists" ng-cloak ng-class="{selected: stateIncludes('content.playlist') && $state.params.id == playlist.id}">
2013-08-13 07:11:14 +02:00
<a href="{{Helpers::angular('playlist.url')}}" ng-bind="playlist.title"></a>
</li>
2013-09-01 04:59:12 +02:00
@else
2013-09-12 02:13:24 +02:00
<li><a href="/login" target="_self">Login</a></li>
<li><a href="/register" target="_self">Register</a></li>
2013-08-13 07:11:14 +02:00
@endif
</ul>
2013-07-30 06:53:57 +02:00
<ui-view class="site-content">
2013-07-25 23:33:04 +02:00
@yield('app_content')
2013-07-30 06:53:57 +02:00
</ui-view>
2013-07-25 23:33:04 +02:00
</div>
@endsection
@section('styles')
2013-09-01 11:55:59 +02:00
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Josefin+Sans" />
2013-09-01 07:13:51 +02:00
<link rel="stylesheet" href="/styles/loader.css" />
2013-07-25 23:33:04 +02:00
{{ Assets::styleIncludes() }}
@endsection
@section('scripts')
<script>
window.pfm = {
token: "{{Session::token()}}",
auth: {
@if (Auth::check())
isLogged: true,
user: {{Auth::user()->toJson()}}
@else
isLogged: false
@endif
}
};
</script>
<script>
{{-- Google Analytics --}}
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29463256-1']);
_gaq.push(['_setDomainName', 'pony.fm']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
2013-07-25 23:33:04 +02:00
{{ Assets::scriptIncludes() }}
2013-09-01 23:54:33 +02:00
@yield('app_scripts')
2013-07-25 23:33:04 +02:00
@endsection