Select Git revision
lecture.html
Forked from
Video AG Infrastruktur / website
Source project has a limited visibility.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
macros.html 4.99 KiB
{% macro preview(lecture) %}
<li class="list-group-item">
<a class="hidden-xs" href="/play?lectureid={{ lecture['id'] }}" title="{{ lecture['coursetitle'] }}">
<div class="row">
<img class="col-xs-4" src="https://videoag.fsmpi.rwth-aachen.de/{{ lecture['titlefile'] }}" alt="Vorschaubild">
<div class="col-xs-4">
<span style="color: #000;"><strong>{{ lecture['short'] }}</strong></span><br>
<span style="color: #000;">{{ lecture['time'] }}</span>
{% if lecture['speaker'] %}
<div class="small" style="color: #000;">Gehalten von {{ lecture['speaker'] }} </div>
{% endif %}
</div>
<div class="col-xs-4" style="color: #000;">
<div style="color: #000;">{{ lecture['title'] }}</div>
<p style="font-style: italic; color: #777;">{{ lecture['comment'] }}</p>
</div>
</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>
</div>
</div>
{% if lecture['speaker'] %}
<div class="row">
<div class="col-xs-12">
<div class="small" style="color: #000;">Gehalten von {{ lecture['speaker'] }} </div>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-xs-12">
<div style="color: #000;">{{ lecture['title'] }}</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<p style="font-style: italic; color: #777;">{{ lecture['comment'] }}</p>
</div>
</div>
</a>
</li>
{% endmacro %}
{% macro player(lecture, videos) %}
<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: 100%;">
{% for v in videos %}
<source type="video/mp4" src="https://videoag.fsmpi.rwth-aachen.de/{{ v.path }}" />
{% endfor %}
</video>
<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>
{% endmacro %}
{% macro course_list_item(course,show_semester=False) %}
<li class="list-group-item">
<div class="row">
<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 }}
</span>
<span class="col-xs-3">
{{ course.organizer }}
</span>
<span class="col-xs-2">
{{ course.subject }}
</span>
</a>
</div>
</li>
{% endmacro %}
{% macro video_download_btn(videos) %}
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Download <span class="caret"></span></button>
<ul class="dropdown-menu">
{% for v in videos %}
<li><a href="https://video.fsmpi.rwth-aachen.de/{{v.path}}">{{v.format_description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% endfor %}
</ul>
<noscript>
<ul class="pull-right list-unstyled" style="margin-left:10px;">
{% for v in videos %}
<li><a href="https://video.fsmpi.rwth-aachen.de/{{v.path}}">{{v.format_description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% endfor %}
</ul>
</noscript>
{% endmacro %}
{%macro video_embed_btn(lectureid) %}
<a class="btn btn-default" id="embedcodebtn" data-container="body" data-toggle="popover" data-placement="bottom">
<span>Einbetten</span>
</a>
<script>
{% set embedcode = '<iframe width="700" height="394" src="https://videoag.fsmpi.rwth-aachen.de/site/embed.php?lecture='+lectureid|string+'" frameborder="0" allowfullscreen="true"></iframe>' %}
$('#embedcodebtn').popover(
{
html:true,
title:'Einbettcode',
content:'<span><input type="text" onclick="this.select()" value="{{embedcode}}"></span>'
}
)
</script>
{% endmacro %}
{% macro lecture_list_item(lecture,videos) %}
<li class="list-group-item">
<div class="row">
<img class="col-sm-2 col-xs-12"src="https://videoag.fsmpi.rwth-aachen.de/{{lecture.titlefile}}" alt="Vorschaubild">
<span class="col-sm-3 col-xs-12">
<ul class="list-unstyled">
<li>{{ lecture.title }}</li>
{% if lecture.speaker %}<li>Gehalten von {{ lecture.speaker|safe }}</li>{% endif %}
<li>{{ lecture.time }}</li>
</ul>
</span>
<span class="col-sm-4 col-xs-12">
{{ lecture.comment|safe }}
</span>
<span class="col-sm-3 col-xs-12">
<span class="pull-right">
<span class="dropdown">
{{ video_download_btn(videos) }}
</span>
<a href="/play?lectureid={{lecture.id}}">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-play"></span>
<span>Play</span>
</button>
</a>
</span>
</span>
</div>
</li>
{% endmacro %}