129 lines
6.1 KiB
PHP
129 lines
6.1 KiB
PHP
{{-- Cangkang pengguna masuk: sidebar kaca melayang, bilah atas ramping, <main> berisi slot. --}}
|
|
@props(['title' => null, 'description' => 'Sistem Informasi Akademik Universitas Tanjungpura.', 'menu' => null])
|
|
|
|
@php
|
|
$user = auth()->user();
|
|
$menuView = $menu ?? $user->role->value.'.partials.menu';
|
|
$today = now()->locale('id');
|
|
@endphp
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<x-layouts.head :title="$title" :description="$description" />
|
|
</head>
|
|
<body>
|
|
<a class="skip-link" href="#isi">Lewati ke konten utama</a>
|
|
|
|
<x-ui.sky :defs="true" />
|
|
|
|
<x-ui.flash />
|
|
|
|
<div class="app" x-data="appShell" x-on:keydown.escape.window="close()">
|
|
<x-glass.panel as="aside" padding="none" :strong="true" id="sidebar" class="sidebar" x-bind:class="{ 'is-open': open }" x-on:touchstart.passive="swipeStart($event)" x-on:touchend.passive="swipeEnd($event)">
|
|
<div class="sidebar__head">
|
|
<x-brand.wordmark :href="route('dashboard')" />
|
|
<x-ui.button
|
|
variant="ghost"
|
|
icon="x-mark"
|
|
:icon-only="true"
|
|
class="sidebar__close"
|
|
aria-label="Tutup menu"
|
|
x-ref="close"
|
|
x-on:click="close()"
|
|
/>
|
|
</div>
|
|
|
|
<nav class="sidebar__nav" aria-labelledby="menu-label">
|
|
<p id="menu-label" class="sidebar__label">Menu {{ $user->role->label() }}</p>
|
|
<div class="sidebar__list">
|
|
@include($menuView)
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="sidebar__foot">
|
|
<div class="sidebar__user">
|
|
<x-ui.avatar :name="$user->name" />
|
|
<div class="sidebar__who">
|
|
<span class="sidebar__name" x-data="nameMarquee" title="{{ $user->name }}"><span class="sidebar__name-text" x-ref="inner">{{ $user->name }}</span></span>
|
|
<span class="sidebar__role">{{ $user->profile?->nomor_induk ?? $user->role->label() }}</span>
|
|
</div>
|
|
</div>
|
|
<form method="POST" action="{{ route('logout') }}">
|
|
@csrf
|
|
<x-ui.button type="submit" variant="secondary" icon="arrow-right-on-rectangle" :block="true">Keluar</x-ui.button>
|
|
</form>
|
|
</div>
|
|
</x-glass.panel>
|
|
|
|
<div class="scrim" x-bind:class="{ 'is-open': open }" x-on:click="close()" aria-hidden="true"></div>
|
|
|
|
<div class="app__col" x-bind:inert="locked">
|
|
<div class="veil veil--top" aria-hidden="true"><x-ui.sky /></div>
|
|
<div class="veil veil--bottom" aria-hidden="true"><x-ui.sky /></div>
|
|
<div class="veil-edge veil-edge--top" aria-hidden="true"></div>
|
|
<div class="veil-edge veil-edge--bottom" aria-hidden="true"></div>
|
|
|
|
<x-glass.panel as="header" padding="none" :strong="true" class="topbar" x-data="{ over: false }" x-on:scroll.window.passive="over = window.scrollY > 4" x-bind:data-over="over || null">
|
|
<x-ui.button
|
|
variant="ghost"
|
|
icon="bars-3"
|
|
:icon-only="true"
|
|
class="topbar__menu"
|
|
aria-label="Buka menu"
|
|
aria-controls="sidebar"
|
|
aria-expanded="false"
|
|
x-ref="menu"
|
|
x-bind:aria-label="menuLabel"
|
|
x-bind:aria-expanded="narrow ? open : !collapsed"
|
|
x-on:click="toggle()"
|
|
/>
|
|
@php
|
|
$tickerLines = [
|
|
'Selamat Datang di SIAKAD Universitas Tanjungpura',
|
|
'Sistem Informasi Akademik terpadu untuk mahasiswa, dosen, dan tenaga kependidikan',
|
|
'Kelola perkuliahan, nilai, dan layanan akademik dalam satu tempat',
|
|
];
|
|
@endphp
|
|
<div class="ticker" role="group" aria-label="{{ $tickerLines[0] }}" x-data="{ i: 0, lines: @js($tickerLines) }">
|
|
<span class="ticker__badge" aria-hidden="true"><x-heroicon-s-megaphone /></span>
|
|
<div class="ticker__viewport" aria-hidden="true">
|
|
<span class="ticker__item" x-text="lines[i]" x-on:animationiteration="i = (i + 1) % lines.length">{{ $tickerLines[0] }}</span>
|
|
</div>
|
|
</div>
|
|
<time class="topbar__date" datetime="{{ $today->toDateString() }}">
|
|
<span class="topbar__date-long">{{ $today->isoFormat('dddd, D MMMM YYYY') }}</span>
|
|
<span class="topbar__date-short">{{ $today->isoFormat('ddd, D MMM YYYY') }}</span>
|
|
</time>
|
|
<x-ui.theme-toggle />
|
|
<x-ui.role-switch :user="$user" />
|
|
</x-glass.panel>
|
|
|
|
<main id="isi" class="app__main">
|
|
{{ $slot }}
|
|
</main>
|
|
|
|
<x-glass.panel as="footer" padding="none" :strong="true" class="app-footer" x-data="{ over: false }" x-init="over = (window.innerHeight + window.scrollY) < document.documentElement.scrollHeight - 4" x-on:scroll.window.passive="over = (window.innerHeight + window.scrollY) < document.documentElement.scrollHeight - 4" x-bind:data-over="over || null">
|
|
<p>© {{ $today->year }} Universitas Tanjungpura. Hak cipta dilindungi.</p>
|
|
<p>SIAKAD, Sistem Informasi Akademik</p>
|
|
</x-glass.panel>
|
|
</div>
|
|
|
|
<button
|
|
type="button"
|
|
class="to-top"
|
|
aria-label="Kembali ke atas"
|
|
title="Kembali ke atas"
|
|
x-data="{ show: false }"
|
|
x-on:scroll.window.passive="show = window.scrollY > 320"
|
|
x-bind:class="{ 'is-visible': show }"
|
|
x-bind:inert="!show"
|
|
x-on:click="window.scrollTo({ top: 0, behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' })"
|
|
inert
|
|
>
|
|
<x-heroicon-m-arrow-up />
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|