Ekapp/skolehjem/resources/views/app/news/index.blade.php

157 lines
5.5 KiB
PHP
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<title>@yield("title")</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
2020-08-10 12:53:49 +00:00
@if(request()->cookie("mode") == "dark")
<link type="text/css" rel="stylesheet" href="{{ mix("/css/webappdark.css") }}">
@else
<link type="text/css" rel="stylesheet" href="{{ mix("/css/webapp.css") }}">
@endif
</head>
<body>
<header class="row align-items-center" id="header">
2020-08-10 12:53:49 +00:00
@if(request()->cookie("mode") == "dark")
<img class="w-50" id="sdeLogo" src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" onclick="location.href = '{{ route("root.index") }}';" alt="Syddansk Erhvervsskole">
@else
<img class="w-50" id="sdeLogo" src="{{URL::asset('/images/logos/Logo-normal.svg')}}" onclick="location.href = '{{ route("root.index") }}';" alt="Syddansk Erhvervsskole">
@endif
<button class="ml-auto" id="toggle">
2020-08-10 13:19:53 +00:00
<i id="icon" class="fas fa-bars" style="color: black;"></i>
</button>
</header>
<div class="d-none bg-sde-blue col" id="menu">
<a href="{{ route("root.index") }}">
<img src="{{URL::asset('/images/icons/Home.svg')}}" alt="Home">
Home
</a>
<a href="{{ route("menu-plans.index") }}">
<img src="{{URL::asset('/images/icons/Menuplan.svg')}}" alt="Menuplan">
Menuplan
</a>
<a href="{{ route("events.index") }}">
<img src="{{URL::asset('/images/icons/Aktiviteter.svg')}}" alt="Aktiviteter">
Aktiviteter
</a>
<a href="{{ route("washing-reservations.appindex") }}">
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Reservationer">
Reservationer
</a>
{{-- IKKE SLETTES!!!! --}}
{{-- <a href="# ">--}}
{{-- <img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">--}}
{{-- Galleri--}}
{{-- </a>--}}
<a href="{{ route("contacts.index") }}">
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
Kontoret
</a>
<a href="{{ route("phones.index") }}">
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
Vagttelefon
</a>
<a href="{{ route("guides.index") }}">
<img src="{{URL::asset('/images/icons/Vejledninger.svg')}}" alt="Guide">
Vejledninger
</a>
<a href="{{ route("users.account") }}">
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
Konto
</a>
<a href="{{ route('users.logout') }}">
<img src="{{URL::asset('/images/icons/Logout.svg')}}" alt="Logud">
Log Ud
</a>
</div>
2020-08-10 07:05:53 +00:00
<style>
div.card {
margin-top: 1rem;
margin-bottom: 30px;
width: auto;
heigt: auto;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
div.header {
background-color: #00788a;
2020-08-10 07:05:53 +00:00
color: white;
2020-08-10 08:21:09 +00:00
padding: 8px;
2020-08-10 07:05:53 +00:00
font-size: 10px;
text-align: center;
}
div.container {
2020-08-10 08:21:09 +00:00
padding: 8px;
2020-08-10 07:05:53 +00:00
text-align: justify;
line-height: 1.5;
}
2020-08-10 08:21:09 +00:00
ol {
padding-right: 8px;
}
2020-08-10 07:05:53 +00:00
</style>
<main>
@foreach(\App\News::query()->orderBy("created_at", "desc")->get() as $new)
2020-08-10 07:05:53 +00:00
<div class="card">
<div class="header">
<p><b>{{ $new->name }}</b></p>
2020-08-10 08:21:09 +00:00
<h3>{{ $new->subname }}</h3>
2020-08-10 07:05:53 +00:00
</div>
<div class="container">
2020-08-10 09:46:08 +00:00
{!! $new->content !!}
2020-08-10 07:05:53 +00:00
</div>
</div>
@endforeach
2020-08-07 08:25:46 +00:00
@if(count(\App\News::query()->orderBy("created_at", "desc")->get()) == 0)
<p class="text-center">{{__('msg.ingennyheder')}}</p>
2020-08-07 08:25:46 +00:00
@endif
</main>
<script src="{{ mix("/js/app.js") }}"></script>
@yield("scripts")
2020-08-10 13:19:53 +00:00
@if(request()->cookie("mode") == "dark")
<script type="text/javascript">
function toggleMenu(menu) {
let menuElement = document.getElementById(menu);
let logoElement = document.getElementById("sdeLogo");
let htmlElement = document.getElementsByTagName('html')[0];
2020-08-11 07:13:48 +00:00
let bodyElement = document.getElementsByTagName('body')[0];
2020-08-10 13:19:53 +00:00
let mainElement = document.getElementsByTagName('main')[0];
let iconElement = document.getElementById("icon");
let headerElement = document.getElementById("header");
if(menuElement.classList.contains("hide")) {
menuElement.classList.remove("hide");
mainElement.classList.remove("d-none");
htmlElement.style.backgroundColor = '';
2020-08-11 07:13:48 +00:00
bodyElement.style.backgroundColor = '#666666';
2020-08-10 13:19:53 +00:00
logoElement.src = '/images/logos/Logo-hvid.svg';
iconElement.classList.remove("fa-times");
iconElement.classList.add("fa-bars");
headerElement.style.backgroundColor = '';
} else {
menuElement.classList.add("hide");
mainElement.classList.add("d-none");
htmlElement.style.backgroundColor = 'rgb(0, 120, 138)';
2020-08-11 07:13:48 +00:00
bodyElement.style.backgroundColor = 'rgb(0, 120, 138)';
2020-08-10 13:19:53 +00:00
logoElement.src = '/images/logos/Logo-hvid.svg';
iconElement.classList.remove("fa-bars");
iconElement.classList.add("fa-times");
headerElement.style.backgroundColor = 'rgb(0, 120, 138)';
}
}
if(document.getElementById("toggle"))
document.getElementById("toggle").onclick = function () {
toggleMenu('menu');
};
</script>
@endif
</body>
</html>