aboutsummaryrefslogtreecommitdiff
path: root/resources/views/layouts/master.blade.php
diff options
context:
space:
mode:
authorCamil Staps2016-09-05 22:30:47 +0200
committerCamil Staps2016-09-05 22:30:47 +0200
commitfc5cef0efddbb1141b0a371108a23fc7f6e8d860 (patch)
tree8b3e62b50e5f856c57af477a78a51567d6e859f2 /resources/views/layouts/master.blade.php
parentUser creation and authentication (diff)
Vote on verb suggestions
Diffstat (limited to 'resources/views/layouts/master.blade.php')
-rw-r--r--resources/views/layouts/master.blade.php33
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>