88 lines
3.2 KiB
PHP
88 lines
3.2 KiB
PHP
@extends("app.layout.base")
|
|
@section("content")
|
|
<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;
|
|
color: white;
|
|
padding: 8px;
|
|
font-size: 10px;
|
|
text-align: center;
|
|
}
|
|
|
|
div.container {
|
|
padding: 8px;
|
|
text-align: justify;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
ol {
|
|
padding-right: 8px;
|
|
}
|
|
</style>
|
|
<main>
|
|
@foreach(\App\News::query()->orderBy("created_at", "desc")->get() as $new)
|
|
<div class="card">
|
|
<div class="header">
|
|
<p><b>{{ $new->name }}</b></p>
|
|
<h3>{{ $new->subname }}</h3>
|
|
</div>
|
|
|
|
<div class="container">
|
|
{!! $new->content !!}
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
@if(count(\App\News::query()->orderBy("created_at", "desc")->get()) == 0)
|
|
<p class="text-center">{{__('msg.ingennyheder')}}</p>
|
|
@endif
|
|
</main>
|
|
@endsection
|
|
@section("scripts")
|
|
@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];
|
|
let bodyElement = document.getElementsByTagName('body')[0];
|
|
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 = '';
|
|
bodyElement.style.backgroundColor = '#666666';
|
|
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)';
|
|
bodyElement.style.backgroundColor = 'rgb(0, 120, 138)';
|
|
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
|
|
@endsection
|