diff options
Diffstat (limited to 'resources/views/layouts')
-rw-r--r-- | resources/views/layouts/master.blade.php | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php index 3c111da..199db2d 100644 --- a/resources/views/layouts/master.blade.php +++ b/resources/views/layouts/master.blade.php @@ -16,17 +16,43 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> +<?php +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Request; + +$activePage = isset($activePage) ? $activePage : ''; +$menu = [ + 'Train' => ['/', ''], + 'Contribute' => ['contribute', 'contribute'], +]; + +if (Auth::check()) { + $menu['Statistics'] = ['stats', 'stats']; + $menu['Logout'] = ['logout', 'logout']; +} +?> <html lang="en"> <head> <meta charset="utf-8"> <title>ParseTrainer</title> <link rel="stylesheet" href="{{ env('APP_URL') }}vendor/twbs/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="{{ env('APP_URL') }}public/css/hebrewparsetrainer.css"> + + <script type="text/javascript"> + var app_url = '{{ env('APP_URL') }}'; + </script> </head> <body role="application"> <div class="container" role="main"> - <div class="page-header"> - <h1>ParseTrainer</h1> + <div class="header clearfix"> + <nav> + <ul class="nav nav-pills pull-right"> + @foreach($menu as $name => $link) + <li role="presentation" class="{{ Request::is($link[0]) ? 'active' : '' }}"><a href="{{ env('APP_URL') }}{{ $link[1] }}">{{ $name }}</a></li> + @endforeach + </ul> + </nav> + <h2 class="text-muted">ParseTrainer</h2> </div> @yield('master-content') @@ -35,5 +61,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <script src="{{ env('APP_URL') }}vendor/components/jquery/jquery.min.js"></script> <script src="{{ env('APP_URL') }}vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script> <script src="{{ env('APP_URL') }}public/js/hebrewparsetrainer.js"></script> + @if(Auth::check()) + <script src="{{ env('APP_URL') }}public/js/moderators.js"></script> + @endif </body> </html> |