@extends('siswa.layout') @section('content')
Kembali

{{ $lesson->title }}

{{-- FIX #4: Hapus fixed position hardcode top-[73px] di sidebar. Gunakan flex layout biasa; sidebar mengikuti tinggi konten secara alami. Sidebar tetap sticky agar tetap terlihat saat scroll. --}}

{{ $lesson->title }}

@if(!empty($lesson->content) && $lesson->content_type !== 'text')
{!! nl2br(e($lesson->content)) !!}
@endif @if($lesson->available_at && now()->lt($lesson->available_at))
Materi ini dapat dibuka pada: {{ $lesson->available_at->translatedFormat('d F Y H:i') }}
@endif {{-- ================= CONTENT AREA ================= --}}
{{-- Frame TV Style --}}
{{-- FIX #2: Konten dipindah ke partial _content.blade.php agar tidak duplikasi antara desktop & mobile. Termasuk FIX #3 (regex videoId) ada di dalam partial tersebut. --}} @include('siswa.modul._content')
{{-- ACTION BAR DESKTOP --}}
{{-- KIRI --}}
@if($isCompleted) Materi telah diselesaikan @endif
{{-- KANAN --}}
@if(! $isCompleted)
@csrf @php $hasDuration = !empty($lesson->duration); $isVideo = $lesson->content_type === 'video'; $lockFinish = $isVideo || $hasDuration; @endphp @if($hasDuration) @endif
@elseif($nextLesson) @if($nextLesson->is_locked) Kembali ke Dashboard @else @php $nextUrl = match($nextLesson->type){ 'lesson' => route('siswa.modul.show', $nextLesson->id), 'quiz' => route('siswa.quiz.intro', $nextLesson->id), 'task' => route('siswa.task.show', $nextLesson->id), default => route('siswa.dashboard') }; @endphp Lanjut ke Materi → @endif @else Kembali ke Dashboard @endif
{{-- SIDEBAR DESKTOP --}} @include('siswa.modul.sidebar-desktop')
@endsection