macros.html 2.57 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
58
</video>
{% endmacro %}
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

{% macro course_list_item(course,show_semester=False) %}
<li class="list-group-item">
	<div class="row">
		{% 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 }}
		</span>
		<span class="col-xs-3">
			{{ course.organizer }}
		</span>
		<span class="col-xs-2">
			{{ course.subject }}
		</span>
	</div>
</li>
{% endmacro %}