From f228489173d3d94dea54a968c44ed50fb1ff11d5 Mon Sep 17 00:00:00 2001 From: pateljannat Date: Tue, 31 Aug 2021 12:30:52 +0530 Subject: [PATCH 1/2] fix: ui and removed mockup --- community/lms/doctype/chapter/chapter.json | 8 +- community/lms/doctype/lesson/lesson.json | 11 +- community/lms/doctype/lessons/lessons.json | 5 +- community/lms/widgets/CourseCard.html | 2 +- community/lms/widgets/Reviews.html | 6 + community/lms/workspace/lms/lms.json | 11 +- community/public/css/style.css | 103 +--------- community/public/icons/slash.svg | 4 + community/www/courses/course.html | 21 +- mockups/README.md | 39 ---- mockups/base.html | 43 ---- mockups/course.html | 114 ----------- mockups/course.yml | 89 --------- mockups/sketches.html | 33 --- mockups/sketches.yml | 38 ---- mockups/static/style.css | 221 --------------------- 16 files changed, 49 insertions(+), 699 deletions(-) create mode 100644 community/public/icons/slash.svg delete mode 100644 mockups/README.md delete mode 100644 mockups/base.html delete mode 100644 mockups/course.html delete mode 100644 mockups/course.yml delete mode 100644 mockups/sketches.html delete mode 100644 mockups/sketches.yml delete mode 100644 mockups/static/style.css diff --git a/community/lms/doctype/chapter/chapter.json b/community/lms/doctype/chapter/chapter.json index 36ab38f5..6a985a80 100644 --- a/community/lms/doctype/chapter/chapter.json +++ b/community/lms/doctype/chapter/chapter.json @@ -18,7 +18,8 @@ "fieldname": "title", "fieldtype": "Data", "in_list_view": 1, - "label": "Title" + "label": "Title", + "reqd": 1 }, { "fieldname": "description", @@ -30,7 +31,8 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Course", - "options": "LMS Course" + "options": "LMS Course", + "reqd": 1 }, { "fieldname": "lessons", @@ -55,7 +57,7 @@ "link_fieldname": "chapter" } ], - "modified": "2021-08-19 13:43:51.025072", + "modified": "2021-08-31 10:43:45.866864", "modified_by": "Administrator", "module": "LMS", "name": "Chapter", diff --git a/community/lms/doctype/lesson/lesson.json b/community/lms/doctype/lesson/lesson.json index 5971085d..e8267c4f 100644 --- a/community/lms/doctype/lesson/lesson.json +++ b/community/lms/doctype/lesson/lesson.json @@ -22,18 +22,21 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Chapter", - "options": "Chapter" + "options": "Chapter", + "reqd": 1 }, { "fieldname": "title", "fieldtype": "Data", "in_list_view": 1, - "label": "Title" + "label": "Title", + "reqd": 1 }, { "fieldname": "body", "fieldtype": "Markdown Editor", - "label": "Body" + "label": "Body", + "reqd": 1 }, { "fieldname": "index_label", @@ -67,7 +70,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-07-27 16:28:29.203624", + "modified": "2021-08-31 10:44:14.168257", "modified_by": "Administrator", "module": "LMS", "name": "Lesson", diff --git a/community/lms/doctype/lessons/lessons.json b/community/lms/doctype/lessons/lessons.json index d4dfddd2..b05f5b13 100644 --- a/community/lms/doctype/lessons/lessons.json +++ b/community/lms/doctype/lessons/lessons.json @@ -13,13 +13,14 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Lesson", - "options": "Lesson" + "options": "Lesson", + "reqd": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2021-07-27 16:53:52.732191", + "modified": "2021-08-31 10:44:42.048232", "modified_by": "Administrator", "module": "LMS", "name": "Lessons", diff --git a/community/lms/widgets/CourseCard.html b/community/lms/widgets/CourseCard.html index 15501f5d..8fe82fb4 100644 --- a/community/lms/widgets/CourseCard.html +++ b/community/lms/widgets/CourseCard.html @@ -70,7 +70,7 @@ {% else %} - + {% else %} +
+ No Reviews +
{% endif %} @@ -89,3 +94,4 @@ +{% endif %} diff --git a/community/lms/workspace/lms/lms.json b/community/lms/workspace/lms/lms.json index 6b109a52..3bbe5663 100644 --- a/community/lms/workspace/lms/lms.json +++ b/community/lms/workspace/lms/lms.json @@ -49,6 +49,15 @@ "onboard": 0, "type": "Link" }, + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS Course Interest", + "link_to": "LMS Course Interest", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, { "hidden": 0, "is_query_report": 0, @@ -121,7 +130,7 @@ "type": "Link" } ], - "modified": "2021-06-29 15:11:07.324651", + "modified": "2021-08-31 10:33:39.838535", "modified_by": "Administrator", "module": "LMS", "name": "LMS", diff --git a/community/public/css/style.css b/community/public/css/style.css index b6efb7ab..c650300e 100644 --- a/community/public/css/style.css +++ b/community/public/css/style.css @@ -32,107 +32,10 @@ --text-3xl: 22px; } -body { - padding: 0px; - margin: 0px; -} - -.chapter-plan { - border-radius: 10px; - margin: 20px 0px; - padding: 20px; - border: 1px solid #ddc; - background: white; -} - -.chapter-plan h3 { - font-size: 1.1em; - font-weight: bold; -} - -.batch { - border-radius: 10px; - margin: 10px 0px; - background: white; - box-shadow: 0px 5px 10px rgb(0 0 0 / 10%); - border: 1px solid #ddc; -} - -.batch-details { - padding: 20px; -} - -.batch .cta { - margin-top: 10px; - padding: 10px; - min-height: 28px; - text-align: right; - border-top: 1px solid #ddc; -} - -.batch .right { - float: right; -} - -img.profile-photo { - width: 24px; - height: 24px; - border-radius: 50%; -} - -.lesson-type { - padding-right: 5px; -} - -section { - padding: 5rem 0 5rem 0; -} - -.batch-header { - background: #eee; - border: 2px solid #ddd; -} - -.page-card { - max-width: 360px; - padding: 15px; - margin: 70px auto; - border: 1px solid #d1d8dd; - border-radius: 8px; - background-color: #fff; - box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); -} - -.page-card .page-card-head { - padding: 10px 15px; - margin: -15px; - margin-bottom: 15px; - border-bottom: 1px solid #d1d8dd; -} - -.page-card .page-card-head .indicator { - color: #36414C; - font-size: 14px; -} - -.page-card .page-card-head .indicator::before { - margin: 0 6px 0.5px 0px; -} - -.page-card .btn { - margin-top: 30px; -} - input[type=checkbox] { appearance: auto; } -.progress-image { - margin-right: 3px; - border-radius: 50px; - padding: 5px; -} - .course-image { height: 168px; width: 100%; @@ -272,13 +175,11 @@ input[type=checkbox] { .view-course-link { height: 32px; - background: var(--button-background); border-radius: 4px; font-size: 12px; padding: 8px 0px 8px; text-align: center; line-height: 135%; - color: var(--text-color); } .cards-parent { @@ -578,8 +479,8 @@ input[type=checkbox] { } .is-default { - background: #98A1A9; - color: #ffffff; + background: #F4F5F6; + color: #1F272E; } @media (max-width: 600px) { diff --git a/community/public/icons/slash.svg b/community/public/icons/slash.svg new file mode 100644 index 00000000..c69604e2 --- /dev/null +++ b/community/public/icons/slash.svg @@ -0,0 +1,4 @@ + + + + diff --git a/community/www/courses/course.html b/community/www/courses/course.html index 5c7298e1..c22f0d52 100644 --- a/community/www/courses/course.html +++ b/community/www/courses/course.html @@ -22,8 +22,8 @@ {% macro CourseCardWide(course) %}
-
+
{% for tag in course.get_tags() %}
{{ tag }}
@@ -59,8 +59,8 @@ {% endif %} {% if course.upcoming %} - {% endif %} @@ -70,10 +70,6 @@
{% endif %} - {% set certificate = course.is_certified() %} - {% if certificate %} - Get Certificate - {% endif %}
@@ -101,6 +97,7 @@ {% macro CourseOutlineAndCreator(course) %} +{% set certificate = course.is_certified() %}
{{ widgets.CourseOutline(course=course, membership=membership) }} @@ -137,9 +134,13 @@ {{ frappe.utils.rounded(progress) }}%
-
+
+ {% if certificate %} + Get + Certificate + {% endif %}
{% endif %} diff --git a/mockups/README.md b/mockups/README.md deleted file mode 100644 index 40c55bfe..00000000 --- a/mockups/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Mockups - -HTML Mockups using [Mockdown][]. - -[Mockdown]: https://github.com/anandology/mockdown - -## How to use - -**Step 1:** Get into `mockups` directory - -``` -$ cd mockups -``` - -**Step 2:** Instal `mockdown` - -``` -$ pip install mockdown -``` - -**Step 3:** Start mockdown server - -``` -$ mockdown -... - * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) -... -``` - -**Step 4:** See the mockups at . - -## How does it work? - -Mockdown uses [Jinja][] templates for writing HTML. - -[Jinja]: https://jinja.palletsprojects.com/ - -To make is easy to provide test data, Mockdown looks for YAML file with the same name as the template. For example, `home.html` template uses the data from `home.yml`. - diff --git a/mockups/base.html b/mockups/base.html deleted file mode 100644 index 4a48a7ed..00000000 --- a/mockups/base.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - {% block title %}FOSS United{% endblock %} - - - - - {% block content %} -

Lorem ipsum...

- {% endblock %} - - diff --git a/mockups/course.html b/mockups/course.html deleted file mode 100644 index e152d2e9..00000000 --- a/mockups/course.html +++ /dev/null @@ -1,114 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -
-
-
course
-

{{title}}

-
- -
-
-
- -

Course Description

- -
- {{ description }} -
- -
- -
- -

Upcoming Batches

- -
- {% for batch in batches %} -
-
-
-
Session every {{batch.weekdays}}
-
{{batch.timeslot}}
-
Starting from {{batch.start_date}}
- -
mentors
- - {% for m in batch.mentors %} -
- - {{m.name}} -
- {% endfor %} -
-
-
- -
-
-
-
- {% endfor %} -
- - -

Course Outline

- - {% for chapter in chapters %} -
-

{{loop.index}} {{chapter.title}}

-
- {{chapter.description}} -
- -
- {% for lesson in chapter.lessons %} -
- - {{lesson.title}} -
- {% endfor %} -
-
- {% endfor %} -
-
- -
- - - -
- -
-
- - -{% endblock %} diff --git a/mockups/course.yml b/mockups/course.yml deleted file mode 100644 index a88dc34c..00000000 --- a/mockups/course.yml +++ /dev/null @@ -1,89 +0,0 @@ -title: The Joy of Programming -description: | - Learn the joy of programming by turning the computer into a canvas. -youtube_embed_url: "https://www.youtube.com/embed/IFWAYnUeHR8?start=149" -stats: - chapters: 4 - lessons: 25 - videos: 6 - completed: 287 - -instructor: - name: Anand Chitipothu - num_courses: 4 - -mentors: - - name: Anand Chitipothu - num_courses: 4 - - name: Rushabh Mehta - num_courses: 3 - - name: Jannat Patel - num_courses: 3 - -batches: - - id: jp01 - status: scheduled - mentors: - - name: Anand Chitipothu - photo_url: https://pbs.twimg.com/profile_images/2599066714/igu5hx4wlg3mxucodinl.jpeg - num_batches: 4 - start_date: May 3, 2021 - weekdays: Mon, Thu - timeslot: 5:00-6:00 PM - - - id: jp02 - status: scheduled - mentors: - - name: Anand Chitipothu - photo_url: https://pbs.twimg.com/profile_images/2599066714/igu5hx4wlg3mxucodinl.jpeg - num_batches: 4 - start_date: May 4, 2021 - weekdays: Tue, Fri - timeslot: 5:00-6:00 PM - - - id: jp03 - status: scheduled - mentors: - - name: Rusbhabh Mehta - photo_url: https://pbs.twimg.com/profile_images/2599066714/igu5hx4wlg3mxucodinl.jpeg - num_batches: 4 - start_date: May 15, 2021 - weekdays: Sat - timeslot: 5:00-6:00 PM - - -chapters: - - title: Getting Started - description: | - Getting started with programming by turning the computer into a canvas. - lessons: - - index: 1 - type: video - icon: bi bi-play-circle - title: Introduction to Programming - - index: 2 - type: practice - icon: bi bi-code-square - title: Drawing Shapes - - - title: Repeating Things - description: | - Isn't it very boring to do the same thing again and again? - Well, that is for humans. Computers love to do the same thing again and again. - Learn how to tell the computer to repeat multiple times the same task, or - with slight change every time. - - lessons: - - index: 1 - type: video - icon: bi bi-play-circle - title: Rinse and Repeat - - index: 2 - type: practice - title: many circles - icon: bi bi-check2-circle - - index: 3 - type: practice - icon: bi bi-code-square - title: print, print, print! - diff --git a/mockups/sketches.html b/mockups/sketches.html deleted file mode 100644 index fee44171..00000000 --- a/mockups/sketches.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -
-
-

Sketches

-
- - -
-{% endblock %} diff --git a/mockups/sketches.yml b/mockups/sketches.yml deleted file mode 100644 index ad274f13..00000000 --- a/mockups/sketches.yml +++ /dev/null @@ -1,38 +0,0 @@ -sketches: - - id: 20 - title: Big Circle - author: Anand Chitipothu - - id: 19 - title: Small Circle - author: Anand Chitipothu - - id: 18 - title: Circles in Queue - author: Chaitanya - - id: 17 - title: Random Bottom Circles - author: Anand Chitipothu - - id: 16 - title: Pipes - author: Vishal - - id: 15 - title: New Sketch - author: Malleshwari - - - id: 20 - title: Big Circle - author: Anand Chitipothu - - id: 19 - title: Small Circle - author: Anand Chitipothu - - id: 18 - title: Circles in Queue - author: Chaitanya - - id: 17 - title: Random Bottom Circles - author: Anand Chitipothu - - id: 16 - title: Pipes - author: Vishal - - id: 15 - title: New Sketch - author: Malleshwari diff --git a/mockups/static/style.css b/mockups/static/style.css deleted file mode 100644 index f2178eae..00000000 --- a/mockups/static/style.css +++ /dev/null @@ -1,221 +0,0 @@ -@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css"); - -:root { - --c1: #fefae0; - --c2: #264653; - --c3: #e9c46a; - --c4: #2a9d8f; - --c5: #f4a261; - --c6: #e76f51; - - --c7: #ccd5ae; - - --bg: var(--c1); - --header-bg: var(--c2); - --header-color: var(--c3); - --tag-color: var(--c7); - --sidebar-bg: var(--c7); - - --h-color: var(--c2); - - --text-color: #333; - --text-color-light: #ccc; - - --cta-color: var(--c4); -} - -body { - padding: 0px; - margin: 0px; - background: var(--bg); -} - -.navbar-light { - border-bottom: 1px solid #E2E6E9; -} - -.page-header { - margin-top: 20px; - padding: 20px; - border-radius: 10px; -} - -.page-header .page-header{ - margin-top: 20px; - padding: 20px; - border-radius: 10px; -} - -.course-header { - margin-top: 20px; - padding: 20px; - background: var(--header-bg); - color: var(--header-color); - border-radius: 10px; -} - -.course-header h1 { - color: inherit; -} - -.course-type { - text-transform: uppercase; - font-size: 1.0em; - color: var(--tag-color); -} - -.sidebar { - background: var(--sidebar-bg); - margin: 20px 0px; - border-radius: 10px; - padding: 1px 20px 20px 20px; - color: var(--text-color); -} - -.sidebar h3 { - margin-top: 20px; - color: var(--c2); -} - -.instructor { - padding: 10px; -} - -.instructor-title { - font-weight: bold; -} - -.instructor-subtitle { - font-size: 0.8em; - color: var(--text-color); -} - -.sidebar .notice { - padding: 10px; - border-radius: 10px; - border: 1px dashed var(--text-color); -} - -.sidebar .notice a { - color: inherit; - text-decoration: underline; -} - -.course-details { - margin: 20px 0px; -} - -.course-details h2 { - color: var(--h-color); - font-size: 1.4em; - font-weight: bold; - margin: 20px 0px 10px 0px; -} - -.chapter-plan { - border-radius: 10px; - margin: 20px 0px; - padding: 20px; - border: 1px solid #ddc; - background: white; -} - -.chapter-plan h3 { - font-size: 1.1em; - font-weight: bold; -} - -.chapter-number { - background: var(--text-color); - color: white; - border-radius: 50%; - height: 24px; - min-width: 24px; - align-items: center; - padding: 2px 8px 2px 8px; - margin-right: 5px; -} - -.chapter-description { - margin: 20px 0px; -} - -.lessons { - padding-left: 20px; -} -.lesson { - margin: 5px 0px; - font-weight: bold; -} - -.batch { - border-radius: 10px; - margin: 10px 0px; - background: white; - border: 1px solid #ddc; -} - -.batch-details { - padding: 20px; -} - -.batch .cta { - margin-top: 10px; - padding: 10px; - min-height: 28px; - text-align: right; - border-top: 1px solid #ddc; -} - -.batch .cta button { - background: var(--cta-color); - color: white; - border: none; - border-radius: 5px; - padding: 5px 10px; -} - -.batch .right { - float: right; -} - -img.profile-photo { - width: 24px; - height: 24px; - border-radius: 50%; -} - -.lesson-type { - padding-right: 5px; -} - -.preview-video { - text-align: center; - margin: 20px 0px; -} - -.preview-video iframe { - max-width: 100% -} - -.sketches-gallery svg { - width: 200px; - height: 200px; -} - -.sketch-card { - background: white; - border-radius: 10px; - border: 1px solid #ddd; - - margin: 10px; -} - -.sketch-card .sketch-image { - padding: 10px; -} - -.sketch-footer { - padding: 10px; - background: #eee; -} From 417436d7b6a11d56d88311c2971ec4cc596a3174 Mon Sep 17 00:00:00 2001 From: pateljannat Date: Tue, 31 Aug 2021 12:43:51 +0530 Subject: [PATCH 2/2] fix: course filter in review --- community/lms/doctype/lms_course_review/lms_course_review.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/community/lms/doctype/lms_course_review/lms_course_review.json b/community/lms/doctype/lms_course_review/lms_course_review.json index f2b78b5d..09c168ac 100644 --- a/community/lms/doctype/lms_course_review/lms_course_review.json +++ b/community/lms/doctype/lms_course_review/lms_course_review.json @@ -26,13 +26,14 @@ "fieldname": "course", "fieldtype": "Link", "in_list_view": 1, + "in_standard_filter": 1, "label": "Course", "options": "LMS Course" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-07-05 14:57:03.841430", + "modified": "2021-08-31 12:37:23.832131", "modified_by": "Administrator", "module": "LMS", "name": "LMS Course Review",