simedkom/resources/views/dashboard/news/print.blade.php
2025-04-15 08:50:13 +07:00

106 lines
2.8 KiB
PHP

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<link rel="icon" href="{{$app->app_icon == 'simedkom-logo-circle.png' ? public_path('assets/defaults/simedkom-logo-circle.png') : public_path('storage/uploads/settings/'. $app->app_icon)}}" type="image/png">
<title>Berita - {{ $news->title }}</title>
<style>
body {
font-family: DejaVu Sans, sans-serif;
margin: 40px;
color: #333;
}
.header {
text-align: center;
border-bottom: 2px solid #000;
padding-bottom: 10px;
margin-bottom: 20px;
}
.header h1 {
margin: 0;
font-size: 22px;
text-transform: uppercase;
}
.meta {
font-size: 14px;
margin-bottom: 20px;
}
.meta strong {
display: inline-block;
width: 100px;
}
.content {
font-size: 16px;
line-height: 1.5;
text-align: justify;
}
.footer {
position: absolute;
bottom: 30px;
left: 40px;
right: 40px;
border-top: 1px solid #aaa;
font-size: 12px;
text-align: center;
padding-top: 10px;
}
</style>
</head>
<body>
<div class="header">
<h1>{{ $news->title }}</h1>
@if($news->image)
<img src="{{ public_path(display_image($news->image, 'news')) }}" alt="Gambar Berita"
style="max-width: 100%; height: auto; margin-top: 10px;">
@endif
<p>{{ idn_date($news->created_at, 'l, d F Y') }}</p>
</div>
<div class="meta">
<table>
<tr>
<td>Kategori</td>
<td>:</td>
<td>{{ $news->category === '0' ? 'Berita' : 'Pengumuman' }}</td>
</tr>
<tr>
<td>Tag</td>
<td>:</td>
<td>{{ $news->tag ?? '-' }}</td>
</tr>
<tr>
<td>Link</td>
<td>:</td>
<td>
@if (filled($news->link))
<a href="{{$news->link}}" target="_blank">{{$news->link}}</a>
@else
-
@endif
</td>
</tr>
<tr>
<td>Author</td>
<td>:</td>
<td>{{ $news->author->name ?? '-' }}</td>
</tr>
<tr>
<td>Dilihat</td>
<td>:</td>
<td>{{ $news->views}}</td>
</tr>
</table>
</div>
<div class="content">
{!! $news->content !!}
</div>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} | {{$app->app_title}}
</div>
</body>
</html>