abschlussprojekt-device-man.../device-app/resources/views/layout.blade.php

109 lines
3.4 KiB
PHP
Raw Normal View History

2023-03-24 16:51:30 +01:00
<!DOCTYPE html>
<html>
<head>
2023-04-06 12:17:42 +02:00
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
2023-03-24 16:51:30 +01:00
<title>Device Manager</title>
2023-04-06 12:17:42 +02:00
{{-- Bulma CSS Framework --}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" />
2023-03-24 16:51:30 +01:00
</head>
2023-04-06 12:17:42 +02:00
<style>
/*for sticky footer*/
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
#wrapper {
flex: 1;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
});
</script>
2023-03-24 16:51:30 +01:00
<body>
2023-04-06 12:17:42 +02:00
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/home">
Device Manager
</a>
{{-- nav bar for mobile device --}}
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navBarBasic">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navBarBasic" class="navbar-menu">
<div class="navbar-start">
@auth
<a class="navbar-item" href="/devices">To List</a>
<a class="navbar-item" href="/log-viewer">To Log-Viewer</a>
@endauth
</div>
<div class="navbar-end">
@auth
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
{{ auth()->user()->full_name }}
</a>
<div class="navbar-dropdown is-right">
<form class="navbar-item" method="POST" action="/logout">
@csrf
<button class="button is-small" type="submit">Logout</button>
</form>
</div>
</div>
@else
<a class="navbar-item" href="/login">
Login
</a>
<a class="navbar-item" href="/register">
Register
</a>
@endauth
</div>
2023-03-24 16:51:30 +01:00
</div>
2023-04-06 12:17:42 +02:00
</nav>
<main id="wrapper">
<section class="section">
<div class="container">
@yield('content')
</div>
</section>
2023-03-24 16:51:30 +01:00
</main>
2023-04-06 12:17:42 +02:00
<footer class="footer notification is-dark p-5">
<p class="has-text-centered">&copy; 2023 Device-Manager. MIT License.</p>
2023-03-24 16:51:30 +01:00
</footer>
</body>
</html>