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

48 lines
1.3 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