[Mahasiswa] Penambahan Cetak KRS, KHS, dan Transkrip
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{-- Satu-satunya tempat yang memancarkan <img> lambang Untan. --}}
|
||||
@props(['size' => 'md', 'priority' => false])
|
||||
@props(['size' => 'md', 'priority' => false, 'pdf' => false])
|
||||
|
||||
@php
|
||||
$px = ['sm' => 32, 'md' => 44, 'lg' => 72, 'xl' => 128][$size] ?? 44;
|
||||
@@ -15,14 +15,25 @@
|
||||
->implode(', ');
|
||||
@endphp
|
||||
|
||||
<img
|
||||
src="{{ asset("images/logo-untan-{$file}.png") }}"
|
||||
srcset="{{ $srcset }}"
|
||||
sizes="{{ $px }}px"
|
||||
alt="Lambang Universitas Tanjungpura"
|
||||
width="{{ $px }}"
|
||||
height="{{ $px }}"
|
||||
decoding="async"
|
||||
@if ($priority) fetchpriority="high" @endif
|
||||
{{ $attributes->class('logo') }}
|
||||
>
|
||||
@if ($pdf)
|
||||
{{-- Dompdf tidak memuat URL jarak jauh dan tidak mengenal srcset: lambang disematkan sebagai data URI (berkas 512 agar tajam saat dicetak). --}}
|
||||
<img
|
||||
src="data:image/png;base64,{{ base64_encode((string) file_get_contents(public_path('images/logo-untan-512.png'))) }}"
|
||||
alt="Lambang Universitas Tanjungpura"
|
||||
width="{{ $px }}"
|
||||
height="{{ $px }}"
|
||||
{{ $attributes }}
|
||||
>
|
||||
@else
|
||||
<img
|
||||
src="{{ asset("images/logo-untan-{$file}.png") }}"
|
||||
srcset="{{ $srcset }}"
|
||||
sizes="{{ $px }}px"
|
||||
alt="Lambang Universitas Tanjungpura"
|
||||
width="{{ $px }}"
|
||||
height="{{ $px }}"
|
||||
decoding="async"
|
||||
@if ($priority) fetchpriority="high" @endif
|
||||
{{ $attributes->class('logo') }}
|
||||
>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user