From ed918017698db1045f575daa021c7717ae1eaae8 Mon Sep 17 00:00:00 2001 From: pateljannat Date: Thu, 26 Aug 2021 18:32:14 +0530 Subject: [PATCH] fix: ui issues --- community/hooks.py | 6 -- community/lms/doctype/lesson/lesson.py | 2 +- .../lms_quiz_submission.json | 5 +- community/lms/widgets/ChapterTeaser.html | 6 +- community/lms/widgets/CourseOutline.html | 2 +- community/public/css/style.css | 83 +++++++++---------- community/www/courses/course.html | 2 +- 7 files changed, 47 insertions(+), 59 deletions(-) diff --git a/community/hooks.py b/community/hooks.py index 26ac5de0..00472b15 100644 --- a/community/hooks.py +++ b/community/hooks.py @@ -137,14 +137,8 @@ website_route_rules = [ {"from_route": "/courses//", "to_route": "courses/certificate"}, {"from_route": "/hackathons/", "to_route": "hackathons/hackathon"}, {"from_route": "/hackathons//", "to_route": "hackathons/project"}, - {"from_route": "/add-a-new-batch", "to_route": "add-a-new-batch"}, - {"from_route": "/courses//home", "to_route": "batch/home"}, {"from_route": "/courses//learn", "to_route": "batch/learn"}, {"from_route": "/courses//learn/.", "to_route": "batch/learn"}, - {"from_route": "/courses//schedule", "to_route": "batch/schedule"}, - {"from_route": "/courses//members", "to_route": "batch/members"}, - {"from_route": "/courses//discuss", "to_route": "batch/discuss"}, - {"from_route": "/courses//about", "to_route": "batch/about"}, {"from_route": "/courses//progress", "to_route": "batch/progress"}, {"from_route": "/courses//join", "to_route": "batch/join"}, {"from_route": "/discussions/", "to_route": "discussions/discussion"}, diff --git a/community/lms/doctype/lesson/lesson.py b/community/lms/doctype/lesson/lesson.py index d9426524..9fe2de50 100644 --- a/community/lms/doctype/lesson/lesson.py +++ b/community/lms/doctype/lesson/lesson.py @@ -8,7 +8,7 @@ from frappe.model.document import Document from ...md import markdown_to_html, find_macros class Lesson(Document): - def before_save(self): + def on_update(self): dynamic_documents = ["Exercise", "Quiz"] for section in dynamic_documents: self.update_lesson_name_in_document(section) diff --git a/community/lms/doctype/lms_quiz_submission/lms_quiz_submission.json b/community/lms/doctype/lms_quiz_submission/lms_quiz_submission.json index 63cd97ef..0bed54d0 100644 --- a/community/lms/doctype/lms_quiz_submission/lms_quiz_submission.json +++ b/community/lms/doctype/lms_quiz_submission/lms_quiz_submission.json @@ -13,6 +13,8 @@ { "fieldname": "quiz", "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Quiz", "options": "LMS Quiz" }, @@ -25,12 +27,13 @@ { "fieldname": "score", "fieldtype": "Data", + "in_list_view": 1, "label": "Score" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-06-07 14:19:54.958989", + "modified": "2021-08-26 12:24:15.973829", "modified_by": "Administrator", "module": "LMS", "name": "LMS Quiz Submission", diff --git a/community/lms/widgets/ChapterTeaser.html b/community/lms/widgets/ChapterTeaser.html index 8a4f6c6e..81fd0e6d 100644 --- a/community/lms/widgets/ChapterTeaser.html +++ b/community/lms/widgets/ChapterTeaser.html @@ -19,7 +19,7 @@ {% for lesson in course.get_lessons(chapter) %} -
+
{% if membership or lesson.include_in_preview or is_instructor %} { expand_the_active_chapter(); - $(".chapter-title").click((e) => { + $(".chapter-title").unbind().click((e) => { rotate_chapter_icon(e); }); @@ -103,7 +103,6 @@ } var rotate_chapter_icon = (e) => { - e.preventDefault(); var icon = $(e.currentTarget).children(".chapter-icon"); if (icon.css("transform") == "none") { icon.css("transform", "rotate(90deg)"); @@ -111,5 +110,4 @@ icon.css("transform", "none"); } } - diff --git a/community/lms/widgets/CourseOutline.html b/community/lms/widgets/CourseOutline.html index 60524e0c..8e56d3a5 100644 --- a/community/lms/widgets/CourseOutline.html +++ b/community/lms/widgets/CourseOutline.html @@ -3,7 +3,7 @@
Course Outline
-
+
{% for chapter in course.get_chapters() %} {{ widgets.ChapterTeaser(index=loop.index, chapter=chapter, course=course, batch=batch, membership=membership) }} {% endfor %} diff --git a/community/public/css/style.css b/community/public/css/style.css index b006c55a..b6efb7ab 100644 --- a/community/public/css/style.css +++ b/community/public/css/style.css @@ -98,7 +98,7 @@ section { padding: 15px; margin: 70px auto; border: 1px solid #d1d8dd; - border-radius: 4px; + border-radius: 8px; background-color: #fff; box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); } @@ -162,8 +162,8 @@ input[type=checkbox] { .course-tags { display: flex; position: relative; - top: 0.75rem; - left: 0.75rem; + top: 1rem; + left: 1rem; } .course-card-pills { @@ -184,8 +184,9 @@ input[type=checkbox] { .common-page-style { background: #F4F5F6; - padding-bottom: 2rem; + padding-bottom: 5rem; min-height: 60vh; + padding-top: 3rem; } .common-card-style { @@ -194,7 +195,7 @@ input[type=checkbox] { border-radius: 8px; position: relative; border: 1px solid #EEF0F2; - box-shadow: 0 1px 4px 4px rgb(25, 39, 52, 0.02); + box-shadow: 0 0px 4px 2px #19273405; } .course-card { @@ -279,23 +280,13 @@ input[type=checkbox] { line-height: 135%; color: var(--text-color); } -.view-talk-link { - background: var(--button-background); - border-radius: 4px; - font-size: 14px; - padding: 8px 22px 8px; - text-align: center; - line-height: 135%; - color: var(--text-color); - -} .cards-parent { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); - -moz-column-gap: 32px; - column-gap: 32px; - row-gap: 32px; + -moz-column-gap: 40px; + column-gap: 40px; + row-gap: 40px; align-items: center; } @@ -318,7 +309,8 @@ input[type=checkbox] { } .courses-header { - padding: 50px 20px 20px; + margin-bottom: 1.5rem; + padding: 0 1rem; color: var(--text-color); font-weight: 600; font-size: 22px; @@ -420,7 +412,7 @@ input[type=checkbox] { height: 1.5rem; width: 1.5rem; border: 1px solid black; - border-radius: 5px; + border-radius: 8px; } .custom-checkbox>label>input:checked+.empty-checkbox { @@ -438,7 +430,7 @@ input[type=checkbox] { flex-direction: row; padding: 24px; background: #E2E6E9; - border-radius: 12px; + border-radius: 8px; margin-top: 16px; } @@ -463,7 +455,7 @@ input[type=checkbox] { background-position: center; background-repeat: no-repeat; margin-right: 32px; - border-radius: 5px; + border-radius: 8px; flex: 1; align-self: center; } @@ -545,7 +537,7 @@ input[type=checkbox] { .button { box-shadow: var(--btn-shadow); - border-radius: 6px; + border-radius: 8px; cursor: pointer; display: flex; align-items: center; @@ -736,9 +728,8 @@ input[type=checkbox] { margin-left: .875rem; } -.coure-outline { - background: #FFFFFF; - border-radius: 12px; +.course-outline { + flex-direction: column; padding: 16px 12px 16px; } @@ -763,7 +754,7 @@ input[type=checkbox] { padding: 20px 0px 16px; } -.member-card .talk-title{ +.member-card .talk-title { font-weight: bold; } @@ -792,7 +783,6 @@ input[type=checkbox] { font-weight: bold; } - .member-card-xl .member-card-title { font-weight: bold; } @@ -837,6 +827,7 @@ input[type=checkbox] { letter-spacing: -0.0175em; color: #192734; margin-bottom: 1rem; + padding: 0 1rem; } .course-detail-headings { @@ -847,7 +838,7 @@ input[type=checkbox] { margin: 0; } -.avatar-medium-schedule{ +.avatar-medium-schedule { width: 70px; height: 70px; } @@ -881,6 +872,14 @@ input[type=checkbox] { flex-direction: column; } +.description-card p { + line-height: 1.72; +} + +.description-card p:last-child { + margin-bottom: 0; +} + .overview-card { padding: 1.5rem; width: 256px; @@ -996,7 +995,7 @@ input[type=checkbox] { } .breadcrumb { - padding: 1rem 0 0; + padding: 0 1rem; display: flex; align-items: center; font-size: 12px; @@ -1052,7 +1051,7 @@ input[type=checkbox] { .active-lesson { background-color: #EBF5FF; - border-radius: 4px; + border-radius: 0.25rem; } .lesson-progress { @@ -1061,7 +1060,7 @@ input[type=checkbox] { font-size: 10px; line-height: 120%; margin: 0px 10px 20px; - border-radius: 4px; + border-radius: 8px; font-weight: bold; } @@ -1071,7 +1070,7 @@ input[type=checkbox] { .profile-banner { height: 248px; - border-radius: 12px 12px 0px 0px; + border-radius: 8px 8px 0px 0px; background-size: cover; background-position: center; } @@ -1090,7 +1089,7 @@ input[type=checkbox] { .profile-info { height: 68px; background: #ffffff; - border-radius: 0px 0px 12px 12px; + border-radius: 0px 0px 8px 8px; } .profile-avatar { @@ -1333,13 +1332,12 @@ pre { font-size: 20px; } -.schedule-info{ +.schedule-info { padding: 20px; } - .drop-down-icon { - padding : 5px 0 0 5px; + padding: 5px 0 0 5px; } .event-btn { @@ -1354,12 +1352,12 @@ pre { padding-bottom: 30px; } -.exhibitor-card .company-name{ +.exhibitor-card .company-name { font-size: 25px; margin-top: 30px; } -.exhibitor-card .company-logo{ +.exhibitor-card .company-logo { height: 158px; width: 252px; object-fit: contain; @@ -1376,7 +1374,7 @@ pre { margin-top: 6px; } -.info-avatar img{ +.info-avatar img { object-fit: contain; } @@ -1451,20 +1449,16 @@ textarea.form-control { } } - @media (max-width: 768px) { .certificate-page .common-card-style { width: 50%; } - .certificate-content { padding: 2rem; } - .certificate-ribbon { margin-right: 1rem; } - .certificate-heading { font-size: 2rem; } @@ -1480,7 +1474,6 @@ textarea.form-control { .certificate-page .common-card-style { width: 90%; } - .certificate-heading { font-size: 2rem; } diff --git a/community/www/courses/course.html b/community/www/courses/course.html index da0a9eae..5c7298e1 100644 --- a/community/www/courses/course.html +++ b/community/www/courses/course.html @@ -178,7 +178,7 @@
Course Description
-
+
{{ frappe.utils.md_to_html(course.description) }}