basic frontend

This commit is contained in:
TimmensOne 2023-03-24 16:51:30 +01:00
parent 68735a3af7
commit 665916d05f
4 changed files with 62 additions and 20 deletions

View File

@ -1,9 +1,15 @@
<h1>Device Detail</h1> @extends('layout')
<h2>{{ $device['device_id'] }}</h2>
<h2>{{ $device['title'] }}</h2> @section('content')
<h2>{{ $device['device_type'] }}</h2> <h1>Device Detail</h1>
<h2>{{ $device['description'] }}</h2> <ul>
<h2>{{ $device['accessories'] }}</h2> <li>{{ $device['device_id'] }}</li>
<h2>{{ $device['rz_username_buyer'] }}</h2> <li>{{ $device['title'] }}</li>
<h2>{{ $device['serial_number'] }}</h2> <li>{{ $device['device_type'] }}</li>
<h2>{{ $device['image_url'] }}</h2> <li>{{ $device['description'] }}</li>
<li>{{ $device['accessories'] }}</li>
<li>{{ $device['rz_username_buyer'] }}</li>
<li>{{ $device['serial_number'] }}</li>
<li>{{ $device['image_url'] }}</li>
</ul>
@endsection

View File

@ -1,10 +1,16 @@
<h1>Device List</h1> @extends('layout')
@unless(count($devices) == 0)
@foreach ($devices as $device) @section('content')
<h2> <h1>Device List</h1>
<a href="/devices/{{ $device['device_id'] }}">{{$device['title']}}</<a> @unless(count($devices) == 0)
</h2> <ul>
@endforeach @foreach ($devices as $device)
@else <li>
<p>No devices</p> <a href="/devices/{{ $device['device_id'] }}">{{ $device->title }}</a>
@endunless </li>
@endforeach
</ul>
@else
<p>No devices found</p>
@endunless
@endsection

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Device Manager</title>
</head>
<body>
<nav>
<ul>
<li><a href="/">Home</a></li>
</ul>
</nav>
<main>
<h1>Device Manager</h1>
<div class="container">
@yield('content')
</div>
</main>
<footer>
<p>&copy; 2023 My Website. All rights reserved.</p>
</footer>
</body>
</html>

View File

@ -1 +1,6 @@
<h1>Welcome</h1> @extends('layout')
@section('content')
<h1>Welcome</h1>
<a href="/devices">To List</a>
@endsection