summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stapp/templates/base.html2
-rw-r--r--stapp/templates/video/home.html25
2 files changed, 20 insertions, 7 deletions
diff --git a/stapp/templates/base.html b/stapp/templates/base.html
index 3963837..11e0925 100644
--- a/stapp/templates/base.html
+++ b/stapp/templates/base.html
@@ -29,7 +29,7 @@ padding: 9px 0;
{% endblock %}
</head>
-<body>
+<body {% block onload %}{% endblock %}>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
diff --git a/stapp/templates/video/home.html b/stapp/templates/video/home.html
index 2bb26ef..470403d 100644
--- a/stapp/templates/video/home.html
+++ b/stapp/templates/video/home.html
@@ -1,15 +1,26 @@
{% extends "base.html" %}
<!DOCTYPE html>
-
{% block title %} STProject {% endblock %}
+
+{% block script %}
+<script>
+function myfunction(video,image)
+{
+ document.getElementById('mainvideo').poster = image;
+ document.getElementById('mainvideo').src = video;
+
+}
+</script>
+{% endblock %}
+{% block onload %} {% endblock onload %}
{% block video %}
<div class="hero-unit">
<h3>Latest Video</h3>
- <video width="700" height="400" controls="controls" id="mainvideo" poster="{{play.image.url}}" preload="metadata">
- <source src="{{play.filename.url}}">
+ <video width="700" height="400" controls="controls" id="mainvideo" poster="{{play.image.url}}" src="{{play.filename.url}}">
+
</video>
<div id="footnote"></div>
</div>
@@ -19,12 +30,14 @@
<div span="12">
<h2>{{module.name}}</h2>
{% for video in module.video_list.all %}
- <video width="150" height="150" controls="controls" poster="{{video.thumbnail.url}}" preload="metadata">
- <source src="{{video.filename.url}}" >
- </video>
+
+ <a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}") > <img src='{{video.image.url}}' name='video' id='video{{forloop.counter}}' /></a>
+
{{video.name}}
{% endfor %}
</div>
</div>
+
+
{% endfor %}
{% endblock%}