Added helper file, replaced size file for human version as a helper method, next prev buttons for chapters.
This commit is contained in:
@@ -1,14 +1,26 @@
|
||||
<x-layout>
|
||||
<h1>
|
||||
{{ $chapter->course->name }}
|
||||
<a href="/">List</a> » <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>
|
||||
|
||||
Reference in New Issue
Block a user