Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • intros
  • live_sources
  • bootstrap4
  • modules
5 results

macros.html

Blame
  • Forked from Video AG Infrastruktur / website
    1024 commits behind the upstream repository.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    macros.html 4.34 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: 80%;">
    	<source type="video/mp4" src="https://videoag.fsmpi.rwth-aachen.de/{{ videos[0]['path'] }}" />
    </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 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="dropdown pull-right">
    				<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>
    			</span>
    			<a href="/play?lectureid={{lecture.id}}" class="pull-right">
    				<button class="btn btn-default" type="button">
    					<span class="glyphicon glyphicon-play"></span>
    					<span>Play</span>
    				</button>
    			</a>
    		</span>
    	</div>
    </li>
    {% endmacro %}