From 5bd270e21bfdf08bd73940bf471ebcf566fb9de6 Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 10 Jul 2018 13:48:54 +0530 Subject: Changes in file_utils.py, courses.html, index.html, module.html, unit.html, offline.css - Remove unnecessary list from write_templates_to_zip function in file_utils - Remove styling from index.html, module.html, unit.html - Add offline.css for styling in index.html, module.html, unit.html --- yaksh/file_utils.py | 5 ++--- yaksh/static/yaksh/css/offline.css | 18 ++++++++++++++++++ yaksh/templates/yaksh/courses.html | 5 +++-- yaksh/templates/yaksh/index.html | 12 +----------- yaksh/templates/yaksh/module.html | 22 ++-------------------- yaksh/templates/yaksh/unit.html | 12 +----------- 6 files changed, 27 insertions(+), 47 deletions(-) create mode 100644 yaksh/static/yaksh/css/offline.css 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 @@
  • - Download Course + + Download course offline
  • @@ -283,7 +284,7 @@
  • - Download Course + Download course offline
  • 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 @@ + - {% block pagetitle %} {{course.name}} {% endblock %}