vpn.keks.cloud/resources/views/layout/app.blade.php
2020-11-08 03:07:10 +01:00

73 lines
3 KiB
PHP

<!-- Stored in resources/views/layouts/app.blade.php -->
<html>
<head>
<title>@yield('title')</title>
<link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" style="margin-top: 20px;">
<a class="navbar-brand" href="/dashboard">VPN</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
@if($user->hasPrivilege("createVPN") || count($vpn) > 1)
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
@if(isset($currentVPNName))
{{ $currentVPNName }}
@else
VPN
@endif
</a>
<div class="dropdown-menu">
@foreach($vpn as $v)
<a class="dropdown-item" href="/vpn?id={{ $v->id }}">{{ $v->name }}</a>
@endforeach
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/vpn/new">New</a>
</div>
</li>
@endif
@if(isset($currentVPNName))
<li class="nav-item">
<a class="nav-link" href="/vpn/peer">Peers</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">API-Key</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/vpn/access">Access</a>
</li>
@endif
</ul>
</div>
<div class="navbar-collapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/users">Users</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Logout</a>
</li>
</ul>
</div>
</nav>
<div class="row" style="min-height: 30px;"></div>
@yield('content')
</div>
</body>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
@yield('script')
</html>