This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
video.html
102 lines (82 loc) · 2.96 KB
/
video.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{% include layout/header.html %}
<div class="content-container video-page">
<aside class="sidebar">
<button class="toc-toggler">Table of Contents</button>
<div class="sidebar-wrapper">
<ul>
<li class="level-0"><a href="{{ site.baseurl }}/videos/">← All Videos</a></li>
{% assign g = page.path | split: '/' %}
{% assign g = g[1] %}
{% assign playlists = site.videos | where: 'layout', 'videos' | where_exp: 'page', 'page.path contains g' | sort: 'menu_order' %}
{% for playlist in playlists %}
<li class="playlist-name">
<a href="{{ playlist.url }}">{{ playlist.title }}</a>
</li>
{% endfor %}
{% assign videos = site.videos | where: 'layout', 'video' | where_exp: 'page', 'page.path contains g' | sort: 'menu_order' %}
{% for video in videos %}
<li class="{% if video.url == page.url %}active{% assign current = forloop.index %}{% endif %}">
{% if site.baseurl == "" %}
<a href="{{ video.url }}">
{% else %}
<a href="{{ site.baseurl }}{{ video.url }}">
{% endif %}
{{ video.title }}
<span class="video-duration">{{ video.duration }} </span>
</a>
</li>
{% endfor %}
</ul>
</div>
</aside>
<section class="content">
<div class="content-wrap">
{% include layout/page-header.html %}
<div id="video-player" class="video-player-wrap">
<div class="video-player">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src='https://www.youtube.com/embed/{{ page.youtube_id }}'
itemprop='embedUrl'
frameborder='0'
allowfullscreen>
</iframe>
</div>
</div>
</div>
{{ content }}
<div class="adjaced-pages">
<div class="playlist-name">{{ playlists[0].title }}</div>
{% assign prev = current | minus: 2 %}
{% if prev >= 0 %}
<div class="previous-page">
{% if site.baseurl == "/" %}
<a href="{{ videos[prev].url }}">
{% else %}
<a href="{{ site.baseurl }}{{ videos[prev].url }}">
{% endif %}
<span class="arrow">← Previous</span>
<span class="title">{{ videos[prev].title }}</span>
</a>
</div>
{% endif %}
{% assign next = current %}
{% if next < videos.size %}
<div class="next-page">
{% if site.baseurl == "/" %}
<a href="{{ videos[next].url }}">
{% else %}
<a href="{{ site.baseurl }}{{ videos[next].url }}">
{% endif %}
<span class="arrow">Next →</span>
<span class="title">{{ videos[next].title }}</span>
</a>
</div>
{% endif %}
</div>
</div>
<!-- /.content-wrap -->
{% include layout/page-info.html %}
</section>
<!-- /.content -->
</div> <!-- /.container -->
{% include layout/footer.html %}