summaryrefslogtreecommitdiff
path: root/stapp
diff options
context:
space:
mode:
authorJay Parikh2012-07-19 19:25:52 +0530
committerJay Parikh2012-07-19 19:25:52 +0530
commitbe07f320f872c9be90d9fbc53aba8fadadc35396 (patch)
tree0f76f9355a6dd0b8f8afa27ae05aa5aae0c59763 /stapp
parent6c2fa5dc986fc3ea548f79e713eb2def052a585d (diff)
downloadstproject-be07f320f872c9be90d9fbc53aba8fadadc35396.tar.gz
stproject-be07f320f872c9be90d9fbc53aba8fadadc35396.tar.bz2
stproject-be07f320f872c9be90d9fbc53aba8fadadc35396.zip
changed the UI to seperate the main video and removed thumbnails
Diffstat (limited to 'stapp')
-rw-r--r--stapp/static/video/css/style.css25
-rw-r--r--stapp/templates/base.html29
-rw-r--r--stapp/templates/video/home.html35
-rw-r--r--stapp/video/views.py2
4 files changed, 68 insertions, 23 deletions
diff --git a/stapp/static/video/css/style.css b/stapp/static/video/css/style.css
new file mode 100644
index 0000000..5586116
--- /dev/null
+++ b/stapp/static/video/css/style.css
@@ -0,0 +1,25 @@
+body{
+ padding-top:40px;
+}
+
+.container-fluid{
+ padding-left:0;
+ padding-right:0;
+}
+
+.top-row{
+ background-color:#3c8fc9;
+}
+
+.main-video{
+ padding-top:30px;
+ padding-left:20px;
+ padding-bottom:20px;
+}
+
+.module-list{
+ position:relative;
+ float:left;
+ margin-right:30px;
+ margin-bottom:50px;
+}
diff --git a/stapp/templates/base.html b/stapp/templates/base.html
index 11e0925..c151a5c 100644
--- a/stapp/templates/base.html
+++ b/stapp/templates/base.html
@@ -22,6 +22,7 @@ padding: 9px 0;
}
</style>
<link rel="stylesheet" href="{{ URL_BASE }}/static/video/css/base.css" type="text/css" />
+ <link rel="stylesheet" href="{{ URL_BASE }}/static/video/css/style.css" type="text/css" />
{% block css %}
{% endblock %}
@@ -30,6 +31,7 @@ padding: 9px 0;
</head>
<body {% block onload %}{% endblock %}>
+
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
@@ -55,9 +57,28 @@ padding: 9px 0;
</div>
</div>
</div>
- <div class="container">
- {% block video %}
- {% endblock %}
- </div>
+
+ <div class="container-fluid">
+ <div class="row-fluid top-row">
+ <div class="span12 main-video">
+ <div class="span6">
+ {% block video %}
+ {% endblock %}
+ </div>
+ <div class="span6">
+ {% block video_description%}
+ {% endblock %}
+ </div>
+ </div>
+ </div>
+ <div class="row-fluid well">
+ {% block module_list %}
+ {% endblock %}
+ </div>
+<hr>
+ <footer>
+ <p>&copy; Company 2012</p>
+ </footer>
+ </div><!--/.fluid-container-->
</body>
</html>
diff --git a/stapp/templates/video/home.html b/stapp/templates/video/home.html
index 0bd09bb..4dbdc9f 100644
--- a/stapp/templates/video/home.html
+++ b/stapp/templates/video/home.html
@@ -14,27 +14,26 @@ function myfunction(video,image)
</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="none" src="{{play.filename.url}}">
+{% block video %}
+ <video width="640" height="480" controls="controls" id="mainvideo" poster="{{play.image.url}}" preload="none" src="{{play.filename.url}}">
+ </video>
- </video>
- <div id="footnote"></div>
-</div>
+{% endblock%}
+
+{% block video_description %}
+ <h1>{{ play.name }}</h1>
+ <p>{{ play.description }}</p>
+ {% endblock %}
-{% for module in modules %}
-<div class="row">
- <div span="12">
- <h2>{{module.name}}</h2>
+{% block module_list %}
+ {% for module in modules %}
+ <div class="module-list"><h2>{{module.name}}</h2>
+ <h5>{{module.description}}</h5>
{% for video in module.video_list.all %}
-
- <a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}") > <img src='{{video.thumbnail.url}}' name='video' id='video{{forloop.counter}}' />{{video.name}}</a>
- {% endfor %}
- </div>
-</div>
+ <a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}") >{{video.name}}</a> <br />
+ {% endfor %}</div>
+{% endfor %}
+{% endblock %}
-{% endfor %}
-{% endblock%}
diff --git a/stapp/video/views.py b/stapp/video/views.py
index 3ec1953..3500f74 100644
--- a/stapp/video/views.py
+++ b/stapp/video/views.py
@@ -12,7 +12,7 @@ def show(request):
latest_video = Video.objects.latest('created')
#Get last three modified modules
- latest_modules = Module.objects.order_by('-modified')[0:3]
+ latest_modules = Module.objects.order_by('-modified')
context = { 'modules' : latest_modules , 'play' : latest_video}