Added helper file, replaced size file for human version as a helper method, next prev buttons for chapters.

This commit is contained in:
Krzysztof Płaczek committed 2022-12-07 11:37:50 +01:00
1 parent b992d05312
commit 25e28f8193
7 files changed
+82 -16

No files matched your search

+14 -2
View File
@@ -1,14 +1,26 @@
<x-layout>
<h1>
{{ $chapter->course->name }}
<a href="/">List</a> &raquo; <a
href="{{ route('course.index', ['course' => $chapter->course_id]) }}">{{ $chapter->course->name }}</a>
<br>
<small class="text-muted">{{ $chapter->title }}</small>
</h1>
<div>
<div class="float-none">
@if($prev)
<div class="float-start m-2"><a href="{{ route('course.chapter', ['chapter' => $prev->id]) }}">Prev</a>
</div>
@endif
@if($next)
<div class="float-end m-2"><a href="{{ route('course.chapter', ['chapter' => $next->id]) }}">Next</a>
</div>
@endif
</div>
<div class="mx-auto" style="width: 500px;">
@if($chapter->is_video_file)
<video class="mx-auto" width="500" controls>
<source src="/{{ $chapter->video_path }}" type="video/mp4"/>
<source src="{{ $chapter->video_url }}" type="video/mp4"/>
</video>
@endif
</div>