Skip to content
Snippets Groups Projects
Commit b64ff6e6 authored by CEYLAN EREN's avatar CEYLAN EREN
Browse files

Merge branch 'datas_page' into 'main'

final commit

See merge request !33
parents fdd9e20c c3d9a995
Branches
1 merge request!33final commit
......@@ -15,6 +15,6 @@ class AddBoatController extends Controller
$boat->description = $request->input('description');
$boat->url_image = $request->input('urlimg');
$boat->save();
return view('/community/boat');
return redirect()->route('community.boat');
}
}
......@@ -607,6 +607,22 @@ video {
max-width: 1536px;
}
}
.pointer-events-none {
pointer-events: none;
}
.absolute {
position: absolute;
}
.relative {
position: relative;
}
.inset-y-0 {
top: 0px;
bottom: 0px;
}
.right-0 {
right: 0px;
}
.my-2 {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
......@@ -635,18 +651,48 @@ video {
margin-top: 2rem;
margin-bottom: 2rem;
}
.-mx-3 {
margin-left: -0.75rem;
margin-right: -0.75rem;
}
.mx-32 {
margin-left: 8rem;
margin-right: 8rem;
}
.mx-44 {
margin-left: 11rem;
margin-right: 11rem;
}
.ml-40 {
margin-left: 10rem;
}
.mt-3 {
margin-top: 0.75rem;
}
.mt-1 {
margin-top: 0.25rem;
}
.mb-6 {
margin-bottom: 1.5rem;
}
.mb-2 {
margin-bottom: 0.5rem;
}
.mb-3 {
margin-bottom: 0.75rem;
}
.block {
display: block;
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.h-4 {
height: 1rem;
}
.w-56 {
width: 14rem;
}
......@@ -659,9 +705,26 @@ video {
.w-40 {
width: 10rem;
}
.w-32 {
width: 8rem;
}
.w-full {
width: 100%;
}
.w-4 {
width: 1rem;
}
.max-w-lg {
max-width: 32rem;
}
.flex-grow {
flex-grow: 1;
}
.appearance-none {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
......@@ -671,6 +734,9 @@ video {
.flex-col {
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.items-center {
align-items: center;
}
......@@ -695,6 +761,20 @@ video {
.rounded-2xl {
border-radius: 1rem;
}
.rounded {
border-radius: 0.25rem;
}
.border {
border-width: 1px;
}
.border-red-500 {
--tw-border-opacity: 1;
border-color: rgba(239, 68, 68, var(--tw-border-opacity));
}
.border-gray-200 {
--tw-border-opacity: 1;
border-color: rgba(229, 231, 235, var(--tw-border-opacity));
}
.bg-white {
--tw-bg-opacity: 1;
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
......@@ -706,6 +786,13 @@ video {
--tw-bg-opacity: 1;
background-color: rgba(229, 231, 235, var(--tw-bg-opacity));
}
.bg-blue-500 {
--tw-bg-opacity: 1;
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
}
.fill-current {
fill: currentColor;
}
.p-4 {
padding: 1rem;
}
......@@ -725,6 +812,29 @@ video {
padding-top: 1.25rem;
padding-bottom: 1.25rem;
}
.px-3 {
padding-left: 0.75rem;
padding-right: 0.75rem;
}
.py-3 {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
.px-4 {
padding-left: 1rem;
padding-right: 1rem;
}
.px-2 {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
.py-2 {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.pr-8 {
padding-right: 2rem;
}
.text-center {
text-align: center;
}
......@@ -751,12 +861,28 @@ video {
font-size: 1.125rem;
line-height: 1.75rem;
}
.text-xs {
font-size: 0.75rem;
line-height: 1rem;
}
.font-bold {
font-weight: 700;
}
.font-medium {
font-weight: 500;
}
.uppercase {
text-transform: uppercase;
}
.italic {
font-style: italic;
}
.leading-tight {
line-height: 1.25;
}
.tracking-wide {
letter-spacing: 0.025em;
}
.text-gray-400 {
--tw-text-opacity: 1;
color: rgba(156, 163, 175, var(--tw-text-opacity));
......@@ -777,6 +903,18 @@ video {
--tw-text-opacity: 1;
color: rgba(37, 99, 235, var(--tw-text-opacity));
}
.text-gray-700 {
--tw-text-opacity: 1;
color: rgba(55, 65, 81, var(--tw-text-opacity));
}
.text-red-500 {
--tw-text-opacity: 1;
color: rgba(239, 68, 68, var(--tw-text-opacity));
}
.text-gray-600 {
--tw-text-opacity: 1;
color: rgba(75, 85, 99, var(--tw-text-opacity));
}
.shadow-2xl {
--tw-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
......@@ -1069,6 +1207,11 @@ h2 {
background-color: rgba(249, 250, 251, var(--tw-bg-opacity));
}
.hover\:bg-blue-700:hover {
--tw-bg-opacity: 1;
background-color: rgba(29, 78, 216, var(--tw-bg-opacity));
}
.hover\:text-yellow-500:hover {
--tw-text-opacity: 1;
color: rgba(245, 158, 11, var(--tw-text-opacity));
......@@ -1079,6 +1222,21 @@ h2 {
color: rgba(59, 130, 246, var(--tw-text-opacity));
}
.focus\:border-gray-500:focus {
--tw-border-opacity: 1;
border-color: rgba(107, 114, 128, var(--tw-border-opacity));
}
.focus\:bg-white:focus {
--tw-bg-opacity: 1;
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
}
.focus\:outline-none:focus {
outline: 2px solid transparent;
outline-offset: 2px;
}
.active\:bg-gray-100:active {
--tw-bg-opacity: 1;
background-color: rgba(243, 244, 246, var(--tw-bg-opacity));
......@@ -1090,10 +1248,22 @@ h2 {
@media (min-width: 768px) {
.md\:mb-0 {
margin-bottom: 0px;
}
.md\:w-64 {
width: 16rem;
}
.md\:w-1\/2 {
width: 50%;
}
.md\:w-1\/3 {
width: 33.333333%;
}
.md\:text-5xl {
font-size: 3rem;
line-height: 1;
......
@extends('layouts.app')
@section('title', 'Sauveteurs')
@section('content')
<body>
<div class="container mx-auto resquer flex flex-col">
<h1 class="font-bold text-5xl text-blue-800 my-5">Listes des Bateaux</h1>
<div class="flex flex-col gap-3">
@foreach ($bateaux as $bateau)
......@@ -16,6 +16,15 @@
</a>
@endforeach
<a href="{{route('community.boat')}}" class="rounded-lg bg-white p-4 shadow-md flex gap-3 hover:bg-gray-50 transition ease-in-out duration-200 active:bg-gray-100">
<div>
<h2>Ajouter un nouveau bateau</h2>
</div>
</a>
</div>
</body>
</div>
@endsection
......@@ -2,18 +2,49 @@
@section('title', 'Bateau')
@section('content')
<body>
<h1>Community bateau</h1>
<form action="{{ route('add_boat') }}" method="POST">
<h1 class="mx-44 font-bold text-5xl text-blue-800 my-5">Ajout d'un bateau</h1>
<div class="flex justify-center items-center" >
<form class="w-full max-w-lg" action="{{ route('add_boat') }}" method="POST">
@csrf
<input type="text" name="name" id="name" placeholder="Nom" required>
<select name="typeput" id="typeput">
@foreach(App\Models\TypeBateau::all() as $type)
<option value="{{ $type->id }}">{{$type->nom}}</option>
@endforeach
</select>
<textarea placeholder="Url image" id="urlimg" name="urlimg"></textarea>
<textarea placeholder="Description" id="description" name="description"></textarea>
<button id="btnSubmit" type="submit">Valider !</button>
</form>
<div class="flex flex-wrap -mx-3 mb-6">
<div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-first-name">
Nom du bateau
</label>
<input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white" id="grid-first-name" type="text" name="name" id="name" placeholder="Nom" required>
<p class="text-red-500 text-xs italic">Please fill out this field.</p>
</div>
</div>
<div class="flex flex-wrap -mx-3 mb-2">
<div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
<textarea class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" placeholder="Description" id="description" name="description"></textarea>
</div>
<div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-state">
Type
</label>
<div class="relative">
<select class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" name="typeput" id="typeput">
@foreach(App\Models\TypeBateau::all() as $type)
<option value="{{ $type->id }}">{{$type->nom}}</option>
@endforeach
</select>
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>
</div>
</div>
</div>
<div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
<textarea class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" placeholder="Url image" id="urlimg" name="urlimg"></textarea>
</div>
</div>
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="submit">
Submit
</button>
</form>
</div>
</body>
@endsection
\ No newline at end of file
@endsection
@extends('layouts.app')
@section('title', 'Sauveteurs')
@section('content')
<body>
<h1>Community Sauvés</h1>
<div class="">
<form action="{{ route('add_rescue') }}" class="flex flex-col gap-3 w-32" method="POST">
@csrf
<input type="text" name="name" id="name" placeholder="Nom" required>
<input type="text" name="prenom" id="prenom" placeholder="Prenom" required>
<input type="date" name="dateBirth" id="dateBirth" placeholder="Date de naissance" required>
<input type="date" name="dateDeath" id="dateDeath" oninput="checkDOB()" placeholder="Date de décès (facultatif)">
<select name="gradeput" id="gradeput">
@foreach(App\Models\Grade::all() as $grades)
<option value="{{ $grades->id }}">{{$grades->Nom}}</option>
@endforeach
</select>
<textarea placeholder="Etat civil" id="etatcivil" name="etatcivil"></textarea>
<textarea placeholder="Carrière" id="carriere" name="carriere"></textarea>
<textarea placeholder="Généalogie" id="genealogie" name="genealogie"></textarea>
<textarea placeholder="Image URL" id="urlimage" name="urlimage"></textarea>
<button id="btnSubmit" type="submit">Valider !</button>
</form>
<h1 class="mx-44 font-bold text-5xl text-blue-800 my-5">Ajout d'un sauveteur</h1>
<div class="flex justify-center items-center">
<form class="w-full max-w-lg" action="{{ route('add_rescue') }}" class="flex flex-col gap-3 w-32" method="POST">
@csrf
<div class="flex flex-wrap -mx-3 mb-6">
<div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-first-name">
Nom
</label>
<input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white" id="grid-first-name" type="text" name="name" id="name" placeholder="Nom" required>
<p class="text-red-500 text-xs italic">Please fill out this field.</p>
</div>
<div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-first-name">
Prenom
</label>
<input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white" id="grid-first-name" type="text" name="prenom" id="prenom" placeholder="Prenom" required>
<p class="text-red-500 text-xs italic">Please fill out this field.</p>
</div>
</div>
<div class="flex flex-wrap -mx-3 mb-2">
<div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
<input type="date" name="dateBirth" id="dateBirth" placeholder="Date de naissance" required class="my-5 block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500">
<input type="date" name="dateDeath" id="dateDeath" oninput="checkDOB()" placeholder="Date de décès (facultatif)" class="my-5 block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500">
<textarea class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" placeholder="Description" id="description" name="description"></textarea>
</div>
<div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-state">
Grade
</label>
<div class="relative">
<select class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" name="gradeput" id="gradeput">
@foreach(App\Models\Grade::all() as $grades)
<option value="{{ $grades->id }}">{{$grades->Nom}}</option>
@endforeach
</select>
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>
</div>
<textarea placeholder="Généalogie" id="genealogie" name="genealogie" class="my-5 block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500"></textarea>
<textarea placeholder="Image URL" id="urlimage" name="urlimage" class="my-5 block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500"></textarea>
</div>
</div>
<div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
<textarea placeholder="Etat civil" id="etatcivil" name="etatcivil" class="my-5 block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500"></textarea>
<textarea placeholder="Carrière" id="carriere" name="carriere" class="my-5 block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500"></textarea>
</div>
</div>
</body>
<button id="btnSubmit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="submit">
Submit
</button>
</form>
</div>
@endsection
<script type="text/javascript">
......
......@@ -64,9 +64,7 @@ Route::get('/trips/{id}', function ($id) {
})->name('trips');
Route::get('/community/boat', function () {
return view('community.boat');
})->name('community.boat');
Route::get('/community/resquer', function () {
......@@ -84,9 +82,9 @@ Route::post('add_boat', [AddBoatController::class, 'add_boat'])->name('add_boat'
Route::post('/community/saved', function () {
return view('/community/saved');
});
Route::post('/community/boat', function () {
return view('/community/boat');
});
Route::get('/community/boat', function () {
return view('community/boat');
})->name('community.boat');
Route::get('/community/trips', function () {
return view('community.trips');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment