Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anders 2020-06-29 08:47:09 +02:00
commit 4eb2a29af9
4 changed files with 22 additions and 10 deletions

View File

@ -32,17 +32,22 @@ function toggleMenu(menu) {
let logoElement = document.getElementById("sdeLogo"); let logoElement = document.getElementById("sdeLogo");
let htmlElement = document.getElementsByTagName('html')[0]; let htmlElement = document.getElementsByTagName('html')[0];
let mainElement = document.getElementsByTagName('main')[0]; let mainElement = document.getElementsByTagName('main')[0];
let iconElement = document.getElementById("icon");
if(menuElement.classList.contains("hide")) { if(menuElement.classList.contains("hide")) {
menuElement.classList.remove("hide"); menuElement.classList.remove("hide");
mainElement.classList.remove("d-none"); mainElement.classList.remove("d-none");
htmlElement.style.backgroundColor = 'rgb(255, 255, 255)'; htmlElement.style.backgroundColor = 'rgb(255, 255, 255)';
logoElement.src = '/images/logos/Logo-normal.svg'; logoElement.src = '/images/logos/Logo-normal.svg';
iconElement.classList.remove("fa-times");
iconElement.classList.add("fa-bars");
} else { } else {
menuElement.classList.add("hide"); menuElement.classList.add("hide");
mainElement.classList.add("d-none"); mainElement.classList.add("d-none");
htmlElement.style.backgroundColor = 'rgb(0, 120, 138)'; htmlElement.style.backgroundColor = 'rgb(0, 120, 138)';
logoElement.src = '/images/logos/Logo-hvid.svg'; logoElement.src = '/images/logos/Logo-hvid.svg';
iconElement.classList.remove("fa-bars");
iconElement.classList.add("fa-times");
} }
} }

View File

@ -15,19 +15,19 @@
@csrf @csrf
@method("PUT") @method("PUT")
<label for="mandag">Mandag:</label> <label for="mandag">Mandag:</label>
<input type="text" name="mandag" id="mandag" value="{{ $menuplan->monday }}" required> <input type="text" name="monday" id="mandag" value="{{ $menuplan->monday }}" required>
<label for="tirsdag">Tirsdag:</label> <label for="tirsdag">Tirsdag:</label>
<input type="text" name="tirsdag" id="tirsdag" value="{{ $menuplan->tuesday }}" required> <input type="text" name="tuesday" id="tirsdag" value="{{ $menuplan->tuesday }}" required>
<label for="onsdag">Onsdag:</label> <label for="onsdag">Onsdag:</label>
<input type="text" name="onsdag" id="onsdag" value="{{ $menuplan->wednesday }}" required> <input type="text" name="wednesday" id="onsdag" value="{{ $menuplan->wednesday }}" required>
<label for="torsdag">Torsdag:</label> <label for="torsdag">Torsdag:</label>
<input type="text" name="torsdag" id="torsdag" value="{{ $menuplan->thursday }}" required> <input type="text" name="thursday" id="torsdag" value="{{ $menuplan->thursday }}" required>
<label for="fredag">Fredag:</label> <label for="fredag">Fredag:</label>
<input type="text" name="fredag" id="fredag" value="{{ $menuplan->friday }}" required> <input type="text" name="friday" id="fredag" value="{{ $menuplan->friday }}" required>
<label for="lørdag">Lørdag:</label> <label for="lørdag">Lørdag:</label>
<input type="text" name="lørdag" id="lørdag" value="{{ $menuplan->saturday }}" required> <input type="text" name="saturday" id="lørdag" value="{{ $menuplan->saturday }}" required>
<label for="søndag">Søndag:</label> <label for="søndag">Søndag:</label>
<input type="text" name="søndag" id="søndag" value="{{ $menuplan->sunday }}" required> <input type="text" name="sunday" id="søndag" value="{{ $menuplan->sunday }}" required>
<input type="submit" class="btn btn-dark text-white" value="Opret Menuplan"> <input type="submit" class="btn btn-dark text-white" value="Opret Menuplan">
</form> </form>

View File

@ -31,8 +31,15 @@
<td>{{$menuplan->friday}}</td> <td>{{$menuplan->friday}}</td>
<td>{{$menuplan->saturday}}</td> <td>{{$menuplan->saturday}}</td>
<td>{{$menuplan->sunday}}</td> <td>{{$menuplan->sunday}}</td>
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td> <td><a href="{{ route("menu-plans.edit", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><a href="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td> <td>
<form method="post" action="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}" class="w-100">
@csrf
@method("delete")
<button class="w-100" type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -12,7 +12,7 @@
<img class="w-50" id="sdeLogo" src="{{URL::asset('/images/logos/Logo-normal.svg')}}" alt="Syddansk Erhvervsskole"> <img class="w-50" id="sdeLogo" src="{{URL::asset('/images/logos/Logo-normal.svg')}}" alt="Syddansk Erhvervsskole">
<button class="ml-auto" id="toggle"> <button class="ml-auto" id="toggle">
{{-- <img src="{{URL::asset('/images/icons/icon.svg')}}" id="menuIcon" alt="-">--}} {{-- <img src="{{URL::asset('/images/icons/icon.svg')}}" id="menuIcon" alt="-">--}}
<i class="fas fa-bars"></i> <i id="icon" class="fas fa-bars"></i>
</button> </button>
</header> </header>
<div class="d-none bg-sde-blue col" id="menu"> <div class="d-none bg-sde-blue col" id="menu">