macros.html 3.56 KB
Newer Older
1
{% macro preview(lecture) %}
Andreas Valder's avatar
Andreas Valder committed
2

Andreas Valder's avatar
Andreas Valder committed
3
<li class="list-group-item">
Andreas Valder's avatar
Andreas Valder committed
4
5
	<a class="hidden-xs" href="/play?lectureid={{ lecture['id'] }}" title="{{ lecture['coursetitle'] }}">
		<div class="row">
6
			<img class="col-xs-4" src="https://videoag.fsmpi.rwth-aachen.de/{{ lecture['titlefile'] }}" alt="Vorschaubild">
Andreas Valder's avatar
Andreas Valder committed
7
			<div class="col-xs-4">
8
9
				<span style="color: #000;"><strong>{{ lecture['short'] }}</strong></span><br>
				<span style="color: #000;">{{ lecture['time'] }}</span>
10
				{% if lecture['speaker'] %}
11
					<div class="small" style="color: #000;">Gehalten von {{ lecture['speaker'] }} </div>
12
				{% endif %}
Andreas Valder's avatar
Andreas Valder committed
13
			</div>
14
			<div class="col-xs-4" style="color: #000;">
Andreas Valder's avatar
.    
Andreas Valder committed
15
16
				<div style="color: #000;">{{ lecture['title']  }}</div>
				<p style="font-style: italic; color: #777;">{{ lecture['comment'] }}</p>
17
			</div>
Andreas Valder's avatar
Andreas Valder committed
18
19
20
21
22
23
24
25
26
27
		</div>
	</a>
	<a class="visible-xs" href="/play?lectureid={{ lecture['id'] }}" title="{{ lecture['coursetitle'] }}">
		<div class="row">
			<img class="col-xs-12" src="https://videoag.fsmpi.rwth-aachen.de/{{ lecture['titlefile'] }}" alt="Vorschaubild">
		</div>
		<div class="row">
			<div class="col-xs-12">
				<span style="color: #000;"><strong>{{ lecture['short'] }}</strong></span>
				<span style="color: #000;">{{ lecture['time'] }}</span>
Andreas Valder's avatar
.    
Andreas Valder committed
28
			</div>
Andreas Valder's avatar
Andreas Valder committed
29
30
31
32
33
		</div>
		{% if lecture['speaker'] %}
		<div class="row">
			<div class="col-xs-12">
				<div class="small" style="color: #000;">Gehalten von {{ lecture['speaker'] }} </div>
Andreas Valder's avatar
.    
Andreas Valder committed
34
			</div>
Andreas Valder's avatar
Andreas Valder committed
35
36
37
38
39
		</div>
		{% endif %}
		<div class="row">
			<div class="col-xs-12">
				<div style="color: #000;">{{ lecture['title']  }}</div>
Andreas Valder's avatar
.    
Andreas Valder committed
40
			</div>
Andreas Valder's avatar
Andreas Valder committed
41
42
43
44
		</div>
		<div class="row">
			<div class="col-xs-12">
				<p style="font-style: italic; color: #777;">{{ lecture['comment'] }}</p>
Andreas Valder's avatar
Andreas Valder committed
45
			</div>
Andreas Valder's avatar
Andreas Valder committed
46
47
		</div>
	</a>
Andreas Valder's avatar
Andreas Valder committed
48
49
</li>

Andreas Valder's avatar
Andreas Valder committed
50
51
{% endmacro %}

Julian Rother's avatar
Julian Rother committed
52
{% macro player(lecture, videos) %}
Andreas Valder's avatar
Andreas Valder committed
53
54
55
<script src="static/mediaelementjs/mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="static/mediaelementjs/mediaelementplayer.css" />
<video class="mejs-player" width="640" height="360" style="width: 100%; height: 80%;">
Julian Rother's avatar
Julian Rother committed
56
	<source type="video/mp4" src="https://videoag.fsmpi.rwth-aachen.de/{{ videos[0]['path'] }}" />
Andreas Valder's avatar
Andreas Valder committed
57
</video>
Andreas Valder's avatar
Andreas Valder committed
58
59
60
61
62
63
<script>
$('.mejs-player').mediaelementplayer({ 
	features: ['playpause','progress','current','duration','tracks','volume','fullscreen'],
	speeds:   ['3.00', '2.50', '2.00', '1.50', '1.25', '1.00', '0.75']
});
</script>
Andreas Valder's avatar
Andreas Valder committed
64
{% endmacro %}
65
66
67
68

{% macro course_list_item(course,show_semester=False) %}
<li class="list-group-item">
	<div class="row">
Andreas Valder's avatar
Andreas Valder committed
69
70
71
72
73
74
75
76
77
78
		<a href=/course?courseid={{course.handle}}>
			{% if show_semester %}
				<span class="col-xs-1">
					{{ course.semester }}
				</span>
				<span class="col-xs-6">
			{% else %}
				<span class="col-xs-7">
			{% endif %}
				{{ course.title }}
79
			</span>
Andreas Valder's avatar
Andreas Valder committed
80
81
82
83
84
85
86
			<span class="col-xs-3">
				{{ course.organizer }}
			</span>
			<span class="col-xs-2">
				{{ course.subject }}
			</span>
		</a>
87
88
89
	</div>
</li>
{% endmacro %}
Andreas Valder's avatar
Andreas Valder committed
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

{% macro lecture_list_item(lecture) %}
<li class="list-group-item">
	<div class="row">
		<span class="col-xs-3">
			{{ lecture.title }}
		</span>
		<span class="col-xs-2">
			{{ lecture.time }}
		</span>
		<span class="col-xs-3">
			{{ lecture.comment|safe }}
		</span>
		<span class="col-xs-2 pull-right">
			<span class="dropdown">
				<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Download<span class="caret"></span></button>
				<ul class="dropdown-menu">
					<li><a href="#">HTML</a></li>
					<li><a href="#">CSS</a></li>
					<li><a href="#">JavaScript</a></li>
				</ul>
			</span>
			<span class="glyphicon glyphicon-play"></span>
			</ul>
		</span>
	</div>
</li>
{% endmacro %}