From db535acaf483899982a794becd16b67a85da2fb2 Mon Sep 17 00:00:00 2001
From: Andreas Valder <andreasv@fsmpi.rwth-aachen.de>
Date: Thu, 11 Aug 2016 22:02:04 +0200
Subject: [PATCH] changed video preview; added cache to gitignore

---
 .gitignore            |  2 ++
 server.py             |  2 +-
 templates/macros.html | 14 +++++++-------
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1377554..1a6ee45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 *.swp
+config.py
+__pycache__
diff --git a/server.py b/server.py
index 27f0952..5fac9fc 100755
--- a/server.py
+++ b/server.py
@@ -15,7 +15,7 @@ def query(operation, *params):
 @app.route('/')
 def index():
 	return render_template('index.html', latestvideos=query('''
-				SELECT lectures.*, max(videos.time_updated) AS lastvidtime, courses.downloadable, courses.title AS coursetitle
+				SELECT lectures.*, max(videos.time_updated) AS lastvidtime, courses.short, courses.downloadable, courses.title AS coursetitle
 				FROM lectures
 				LEFT JOIN videos ON (videos.lecture_id = lectures.id)
 				LEFT JOIN courses on (courses.id = lectures.course_id)
diff --git a/templates/macros.html b/templates/macros.html
index 6312f7a..8f3e6cb 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -4,16 +4,16 @@
 		<a href="?view=player&amp;lectureid={{ lecture['id'] }}#content" title="{{ lecture['coursetitle'] }}">
 			<img class="col-xs-4" src="https://videoag.fsmpi.rwth-aachen.de/{{ lecture['titlefile'] }}" alt="Vorschaubild">
 			<div class="col-xs-4">
-				<span>{{ lecture['coursetitle'] }}</span>
-				<span>{{ lecture['time'] }}</span>
-				<p>{{ lecture['title'] }}</p>
-			</div>
-			<div class="col-xs-4">
-				<div class="comment">{{ lecture['comment']  }}</div>
+				<span style="color: #000;"><strong>{{ lecture['short'] }}</strong></span><br>
+				<span style="color: #000;">{{ lecture['time'] }}</span>
 				{% if lecture['speaker'] %}
-					<div class="comment">Gehalten von {{ lecture['speaker'] }} </div>
+					<div class="small" style="color: #000;">Gehalten von {{ lecture['speaker'] }} </div>
 				{% endif %}
 			</div>
+			<div class="col-xs-4" style="color: #000;">
+				<div class="comment" style="color: #000;">{{ lecture['comment']  }}</div>
+				<p style="font-style: italic; color: #777;">{{ lecture['title'] }}</p>
+			</div>
 		</a>
 	</div>
 </li>
-- 
GitLab