From d5e49b72ebe55d059d75cc188dd3b6bf8f21bef0 Mon Sep 17 00:00:00 2001
From: Andreas Valder <andreasv@fsmpi.rwth-aachen.de>
Date: Wed, 7 Sep 2016 02:25:23 +0200
Subject: [PATCH] added featured section

---
 templates/index.html | 40 ++++++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/templates/index.html b/templates/index.html
index 6b34bdc..201abe4 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -30,15 +30,39 @@
 				</p>
 			</div>
 		</div>
-		<div class="panel panel-default">
-			<div class="panel-heading">
-				<h1 class="panel-title">Featured</h1>
-			</div>
-			<div class="panel-body">
-				<h1 class="panel-title">Collegium Musicum</h1 class="panel-title">
-				<img style="width:100%" src="http://www.cm.rwth-aachen.de/typo3/typo3temp/pics/c1d685f56a.jpg">
+		{% if featured|length > 0 %}
+			<div class="panel panel-default">
+				<div class="panel-heading">
+					<h1 class="panel-title">Featured</h1>
+				</div>
+				<div class="panel-body">
+					<div id="myCarousel" class="carousel slide" data-ride="carousel" style="background-color: #EEE; min-height: 400px;">
+						<!-- Indicators -->
+						<ol class="carousel-indicators">
+							{% for i in featured %}
+								<li data-target="#myCarousel" data-slide-to="0" {% if loop.first %} class="active" {% endif %}></li>
+							{% endfor %}
+						</ol>
+							<div class="carousel-inner" role="listbox">
+						{% for i in featured %}
+								<div class="item {% if loop.first %}active{% endif %}">
+									{{ i.text|safe }}
+									<div class="carousel-caption"><h1>{{ i.title }}</h1></div>
+								</div>
+						{% endfor %}
+							</div>
+						<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
+							<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
+							<span class="sr-only">Previous</span>
+						</a>
+						<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
+							<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
+							<span class="sr-only">Next</span>
+						</a>
+					</div>
+				</div>
 			</div>
-		</div>
+		{% endif %}
 	</div>
 	<div class="col-md-6">
 		<div class="panel panel-default">
-- 
GitLab