summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParth Buch2012-07-20 19:34:53 +0530
committerParth Buch2012-07-20 19:34:53 +0530
commit0a66a25e8fe16e96b3e805c10c53f8496a2341b3 (patch)
treeb264585bbaa3abdc2cf1b70e323e2e1688ab1239
parentfa78132169b6f56f2c5b83461ef4f116b8ee4940 (diff)
downloadstproject-0a66a25e8fe16e96b3e805c10c53f8496a2341b3.tar.gz
stproject-0a66a25e8fe16e96b3e805c10c53f8496a2341b3.tar.bz2
stproject-0a66a25e8fe16e96b3e805c10c53f8496a2341b3.zip
UI Changes, removed the 'well' class to get rid of padding problem
-rw-r--r--stapp/static/video/css/style.css8
-rw-r--r--stapp/templates/base.html3
-rw-r--r--stapp/templates/video/home.html22
-rw-r--r--stapp/video/views.py6
4 files changed, 26 insertions, 13 deletions
diff --git a/stapp/static/video/css/style.css b/stapp/static/video/css/style.css
index c4aecbf..4e23946 100644
--- a/stapp/static/video/css/style.css
+++ b/stapp/static/video/css/style.css
@@ -3,15 +3,13 @@ body{
}
-.container-fluid{
- padding-left:0;
- padding-right:0;
-}
-
.top-row{
background-color:#3c8fc9;
background:-moz-linear-gradient(top,#3c8fc9,#ffffff);
background:-webkit-linear-gradient(top,#3c8fc9,#ffffff);
+ margin-left:-20px;
+ padding-right:40px;
+ margin-bottom:40px;
}
.main-video{
diff --git a/stapp/templates/base.html b/stapp/templates/base.html
index 1f70617..560b290 100644
--- a/stapp/templates/base.html
+++ b/stapp/templates/base.html
@@ -71,10 +71,9 @@ padding: 9px 0;
</div>
</div>
</div>
- <div class="row-fluid well">
+
{% block module_list %}
{% endblock %}
- </div>
<hr>
<footer>
<p>&copy; Company 2012</p>
diff --git a/stapp/templates/video/home.html b/stapp/templates/video/home.html
index 54f3b26..275a77a 100644
--- a/stapp/templates/video/home.html
+++ b/stapp/templates/video/home.html
@@ -32,14 +32,30 @@ function myfunction(video,image)
{% endblock %}
{% block module_list %}
- {% for module in modules %}
- <div class="module-list"><h2>{{module.name}}</h2>
+ <div class="row-fluid">
+ <h1>Latest Modules</h1>
+ {% for module in latest_modules %}
+ <div class="module-list"><h3>{{module.name}}</h3>
<h5>{{module.description|safe}}</h5>
{% for video in module.video_list.all %}
<a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}");javascript:document.getElementById('videoname').innerHTML={{video.name}}; >{{video.name}}</a>
<br />
{% endfor %}</div>
-{% endfor %}
+ {% endfor %}
+ </div>
+
+ <div class="row-fluid">
+ <h1>All Modules</h1>
+ {% for module in all_modules %}
+ <div class="module-list"><h3>{{module.name}}</h3>
+ <h5>{{module.description|safe}}</h5>
+ {% for video in module.video_list.all %}
+ <a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}");javascript:document.getElementById('videoname').innerHTML={{video.name}}; >{{video.name}}</a>
+ <br />
+ {% endfor %}</div>
+ {% endfor %}
+ </div>
+
{% endblock %}
diff --git a/stapp/video/views.py b/stapp/video/views.py
index 3500f74..544c2b0 100644
--- a/stapp/video/views.py
+++ b/stapp/video/views.py
@@ -12,9 +12,9 @@ def show(request):
latest_video = Video.objects.latest('created')
#Get last three modified modules
- latest_modules = Module.objects.order_by('-modified')
+ latest_modules = Module.objects.order_by('-modified')[0:3]
+ all_modules = Module.objects.order_by('modified')
-
- context = { 'modules' : latest_modules , 'play' : latest_video}
+ context = { 'latest_modules' : latest_modules , 'play' : latest_video, 'all_modules':all_modules}
return render(request, 'video/home.html', context)