From 0d38b9aab1ce13c3ff7474ced52a012609e0179c Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Wed, 11 May 2022 15:07:26 +0530 Subject: [PATCH 1/4] fix: course banner spaces --- lms/public/css/style.css | 29 +++++++++------- lms/www/courses/course.html | 67 +++++++++++++++++++------------------ 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 07a261f7..2cc604ec 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -305,6 +305,7 @@ input[type=checkbox] { font-size: var(--text-3xl); line-height: 44px; color: var(--gray-900); + margin: 0.25rem 0; } .button { @@ -567,7 +568,7 @@ input[type=checkbox] { font-size: var(--text-base); line-height: 20px; color: var(--gray-900); - padding: 1rem 0; + padding: 0; } .course-details-outline { @@ -1166,10 +1167,6 @@ pre { margin: 0 1rem; } -.course-head-container .progress { - margin-top: 1rem; -} - .course-overlay-card { background-color: white; border-radius: var(--border-radius-lg); @@ -1265,14 +1262,14 @@ pre { } @media (max-width: 500px) { - .reviews-header { - flex-direction: column; - align-items: center; - } + .reviews-header { + flex-direction: column; + align-items: center; + } - .vertical-divider { - margin: 1rem 0; - } + .vertical-divider { + margin: 1rem; + } } .bold-heading { @@ -1291,7 +1288,8 @@ pre { } .vertical-divider { - border: 1px solid var(--gray-300); + border: 1px solid var(--gray-300); + margin: 0 1rem; } .avg-rating-stars { @@ -1432,3 +1430,8 @@ pre { float: right; font-size: var(--text-sm); } + +li { + line-height: 1.7; +} + diff --git a/lms/www/courses/course.html b/lms/www/courses/course.html index f67ebe93..1702fc5f 100644 --- a/lms/www/courses/course.html +++ b/lms/www/courses/course.html @@ -28,8 +28,8 @@ {% macro CourseHomeHeader(course) %}
-
-
+
+
{{ BreadCrumb(course) }} {{ CourseCardWide(course) }}
@@ -49,38 +49,41 @@ {% macro CourseCardWide(course) %}
-
- {% for tag in get_tags(course.name) %} -
{{ tag }}
- {% endfor %} -
-
- {{ course.title }} -
-
- {{ course.short_introduction }} -
- - {% if membership %} - {% set progress = frappe.utils.cint(membership.progress) %} -
-
+
+ {% for tag in get_tags(course.name) %} +
{{ tag }}
+ {% endfor %} +
+
+ {{ course.title }} +
+
+ {{ course.short_introduction }}
-
- {% endif %} -
-
Instructors:
- {% for instructor in get_instructors(course.name) %} -
- {{ widgets.Avatar(member=instructor, avatar_class="avatar-small") }} - - {{ instructor.full_name }} - -
- {% endfor %} -
+
+
Instructors:
+ {% for instructor in get_instructors(course.name) %} +
+ {{ widgets.Avatar(member=instructor, avatar_class="avatar-small") }} + + {{ instructor.full_name }} + +
+ {% endfor %} +
+ + {% if membership %} + {% set progress = frappe.utils.cint(membership.progress) %} +
+
{{ progress }}% Completed
+
+
+
+
+
+ {% endif %}
From 6521415ae08b231eb5cdf31d43751aeee330fbde Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Thu, 19 May 2022 15:59:41 +0530 Subject: [PATCH 2/4] fix: course overlay site --- lms/public/css/style.css | 20 ++++++++++++++++---- lms/www/courses/course.html | 17 +++++++---------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 835d909f..97ba9dad 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -301,11 +301,11 @@ input[type=checkbox] { } .course-card-wide-title { - font-weight: bold; - font-size: var(--text-3xl); + font-weight: 700; + font-size: var(--text-4xl); line-height: 44px; color: var(--gray-900); - margin: 0.25rem 0; + margin: 0.5rem 0; } .button { @@ -1193,7 +1193,6 @@ pre { padding: 1.25rem; font-size: var(--text-base); color: var(--text-color); - text-align: center; } .breadcrumb-destination { @@ -1253,6 +1252,12 @@ pre { width: 75%; } +@media (max-width: 1250px) { + .reviews-header { + width: 85%; + } +} + @media (max-width: 768px) { .reviews-header { width: 100%; @@ -1432,3 +1437,10 @@ li { line-height: 1.7; } +.course-overlay-title { + font-weight: 700; + font-size: var(--text-2xl); + line-height: 1rem; + color: var(--gray-900); + margin-bottom: 1.25rem; +} diff --git a/lms/www/courses/course.html b/lms/www/courses/course.html index 1702fc5f..5d41ea28 100644 --- a/lms/www/courses/course.html +++ b/lms/www/courses/course.html @@ -97,7 +97,7 @@ {% endif %}
-
{{ course.title }}
+
{{ course.title }}
{{ _("You have opted to be notified for this course. You will receive an email when the course becomes available.") }} @@ -132,25 +132,22 @@
{% endif %} -
-
+
{{ get_students(course.name) | length }} {{ _("Enrolled") }} -
+
- - {% if get_lessons(course.name) | length %} -
+ {% if get_lessons(course.name) | length %} +
- + {{ get_lessons(course.name) | length }} {{ _("Lessons") }} -
- {% endif %}
+ {% endif %} {% if course.paid_certificate %}
From 87fe3e72a2fdde292ad9d522b52e850575c941b7 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 24 May 2022 16:51:55 +0530 Subject: [PATCH 3/4] fix: course certificate price display --- lms/lms/utils.py | 2 +- lms/lms/widgets/CourseCard.html | 18 ++++-- lms/lms/widgets/CourseOutline.html | 92 +++++++++++++++--------------- lms/public/css/style.css | 20 ++++--- lms/public/icons/symbol-defs.svg | 19 ++++++ lms/www/courses/course.html | 85 +++++++++++++-------------- lms/www/courses/index.html | 3 +- 7 files changed, 136 insertions(+), 103 deletions(-) diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 7b550d51..129737fc 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -372,4 +372,4 @@ def format_amount(amount, currency): if amount_reduced < 1: return amount precision = 0 if amount % 1000 == 0 else 1 - return _("{0}K").format(fmt_money(amount_reduced, precision, currency)) + return _("{0}k").format(fmt_money(amount_reduced, precision, currency)) diff --git a/lms/lms/widgets/CourseCard.html b/lms/lms/widgets/CourseCard.html index 05908ca7..d8a11583 100644 --- a/lms/lms/widgets/CourseCard.html +++ b/lms/lms/widgets/CourseCard.html @@ -51,6 +51,18 @@ {{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
{% endif %} + + {% if course.paid_certificate %} +
+ + + + + {{ format_amount(course.price_certificate, course.currency) }} + +
+ {% endif %} +
{% endif %}
@@ -66,12 +78,6 @@
{{ progress }}% {{ _("Completed") }}
{% endif %} - {% if course.paid_certificate %} -
- {{ _("Certificate Price: {0}").format(format_amount(course.price_certificate, course.currency)) }} -
- {% endif %} -