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

48 lines
1.3 KiB
PHP
Raw Normal View History

2020-08-11 11:44:18 +00:00
@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);
}
2020-08-10 07:05:53 +00:00
2020-08-11 11:44:18 +00:00
div.header {
background-color: #00788a;
color: white;
padding: 8px;
font-size: 10px;
text-align: center;
}
2020-08-10 08:21:09 +00:00
2020-08-11 11:44:18 +00:00
div.container {
padding: 8px;
text-align: justify;
line-height: 1.5;
}
2020-08-10 07:05:53 +00:00
2020-08-11 11:44:18 +00:00
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>
2020-08-10 07:05:53 +00:00
2020-08-11 11:44:18 +00:00
<div class="container">
{!! $new->content !!}
</div>
2020-08-10 07:05:53 +00:00
</div>
2020-08-11 11:44:18 +00:00
@endforeach
@if(count(\App\News::query()->orderBy("created_at", "desc")->get()) == 0)
<p class="text-center">{{__('msg.ingennyheder')}}</p>
@endif
</main>
@endsection