summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yaksh/file_utils.py5
-rw-r--r--yaksh/static/yaksh/css/offline.css18
-rw-r--r--yaksh/templates/yaksh/courses.html5
-rw-r--r--yaksh/templates/yaksh/index.html12
-rw-r--r--yaksh/templates/yaksh/module.html22
-rw-r--r--yaksh/templates/yaksh/unit.html12
6 files changed, 27 insertions, 47 deletions
diff --git a/yaksh/file_utils.py b/yaksh/file_utils.py
index af0ee1e..8a94260 100644
--- a/yaksh/file_utils.py
+++ b/yaksh/file_utils.py
@@ -70,13 +70,12 @@ def is_csv(document):
def write_static_files_to_zip(zipfile, course_name, current_dir):
- relative_folders = ["css", "js", "images"]
static_files = {"js": ["bootstrap.js", "bootstrap.min.js",
"jquery-1.9.1.min.js", "video.js"],
"css": ["bootstrap.css", "bootstrap.min.css",
- "video-js.css"],
+ "video-js.css", "offline.css"],
"images": ["yaksh_banner.png"]}
- for folder in relative_folders:
+ for folder in static_files.keys():
folder_path = os.sep.join((current_dir, "static", "yaksh", folder))
for file in static_files[folder]:
file_path = os.sep.join((folder_path, file))
diff --git a/yaksh/static/yaksh/css/offline.css b/yaksh/static/yaksh/css/offline.css
new file mode 100644
index 0000000..1ec40ab
--- /dev/null
+++ b/yaksh/static/yaksh/css/offline.css
@@ -0,0 +1,18 @@
+.footer {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ background-color: #D3D3D3;
+ color: black;
+ text-align: center;
+}
+
+.module {
+ border: none;
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+.module tr td:nth-child(2) {
+ border-left: 1px solid #D3D3D3;
+} \ No newline at end of file
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index 77e1859..3a98792 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -142,7 +142,8 @@
</li>
<br>
<li>
- <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content in html format" data-placement="top">Download Course
+ <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content for offline view" data-placement="top">
+ Download course offline
</a>
</li>
</ul>
@@ -283,7 +284,7 @@
</li>
<br>
<li>
- <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content in html format" data-placement="top">Download Course
+ <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content for offline view" data-placement="top">Download course offline
</a>
</li>
</ul>
diff --git a/yaksh/templates/yaksh/index.html b/yaksh/templates/yaksh/index.html
index 9a2c395..a90cf4c 100644
--- a/yaksh/templates/yaksh/index.html
+++ b/yaksh/templates/yaksh/index.html
@@ -2,19 +2,9 @@
<html>
<link rel="stylesheet" href="static/css/bootstrap.css">
<link rel="stylesheet" href="static/css/bootstrap.min.css">
+<link rel="stylesheet" href="static/css/offline.css">
<script src="static/js/jquery-1.9.1.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
-<style>
-.footer {
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- background-color: #D3D3D3;
- color: black;
- text-align: center;
-}
-</style>
{% block pagetitle %} {{course.name}} {% endblock %}
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
diff --git a/yaksh/templates/yaksh/module.html b/yaksh/templates/yaksh/module.html
index a2a2c96..2ce5442 100644
--- a/yaksh/templates/yaksh/module.html
+++ b/yaksh/templates/yaksh/module.html
@@ -2,28 +2,10 @@
<html>
<link rel="stylesheet" href="../static/css/bootstrap.css">
<link rel="stylesheet" href="../static/css/bootstrap.min.css">
+<link rel="stylesheet" href="../static/css/offline.css">
<script src="../static/js/jquery-1.9.1.min.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script src="https://vjs.zencdn.net/6.9.0/video.js"></script>
-<style>
-.footer {
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- background-color: #D3D3D3;
- color: black;
- text-align: center;
-}
-table {
- border: none;
- border-spacing: 0;
- border-collapse: collapse;
-}
-table tr td:nth-child(2) {
- border-left: 1px solid #D3D3D3;
-}
-</style>
{% block pagetitle %} {{module.name}} {% endblock %}
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
@@ -46,7 +28,7 @@ table tr td:nth-child(2) {
<hr>
{% block content %}
<center><h2>{{module.name}}</h2></center>
- <table class="table">
+ <table class="table module">
<tr>
<td>
<h4><strong>Lessons (Click on lesson name to open lesson)
diff --git a/yaksh/templates/yaksh/unit.html b/yaksh/templates/yaksh/unit.html
index 3ffc399..bd34b32 100644
--- a/yaksh/templates/yaksh/unit.html
+++ b/yaksh/templates/yaksh/unit.html
@@ -2,21 +2,11 @@
<html>
<link rel="stylesheet" href="../../static/css/bootstrap.css">
<link rel="stylesheet" href="../../static/css/bootstrap.min.css">
+<link rel="stylesheet" href="../../static/css/offline.css">
<link rel="stylesheet" href="../../static/css/video-js.css">
<script src="../../static/js/jquery-1.9.1.min.js"></script>
<script src="../../static/js/bootstrap.min.js"></script>
<script src="../../static/js/video.js"></script>
-<style>
-.footer {
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- background-color: #D3D3D3;
- color: black;
- text-align: center;
-}
-</style>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">