diff --git a/community/hooks.py b/community/hooks.py index 691d75ee..2f9caf24 100644 --- a/community/hooks.py +++ b/community/hooks.py @@ -136,7 +136,6 @@ primary_rules = [ {"from_route": "/courses//", "to_route": "courses/topic"}, {"from_route": "/hackathons/", "to_route": "hackathons/hackathon"}, {"from_route": "/hackathons//", "to_route": "hackathons/project"}, - {"from_route": "/dashboard", "to_route": ""}, {"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"}, diff --git a/community/lms/widgets/CourseCard.html b/community/lms/widgets/CourseCard.html index 04a8e47a..3599604a 100644 --- a/community/lms/widgets/CourseCard.html +++ b/community/lms/widgets/CourseCard.html @@ -1,10 +1,14 @@
-
+
{% for tag in course.get_tags() %}
{{ tag }}
{% endfor %}
+ {% if not course.image %} +
{{ course.title[0] }}
+ {% endif %}
diff --git a/community/lms/widgets/Reviews.html b/community/lms/widgets/Reviews.html index 59f57fe3..25a99f7f 100644 --- a/community/lms/widgets/Reviews.html +++ b/community/lms/widgets/Reviews.html @@ -1,15 +1,18 @@ -{% if course.get_reviews() | length %}
-
-
Student Review
+ {% set reviews = course.get_reviews() %} + {% if reviews | length or course.is_eligible_to_review(membership) %} +
+ Reviews {% if course.is_eligible_to_review(membership) %} - - Provide your Feedback - + + Write a review + {% endif %}
+ {% endif %} + {% if reviews | length %}
- {% for review in course.get_reviews() %} + {% for review in reviews %}
{{ review.review }}
{% endfor %}
+ {% endif %}
-{% endif %} diff --git a/community/public/css/style.css b/community/public/css/style.css index b5eba59a..b2b98732 100644 --- a/community/public/css/style.css +++ b/community/public/css/style.css @@ -234,6 +234,22 @@ input[type=checkbox] { background-repeat: no-repeat; } +.default-image { + background-color: var(--avatar-frame-bg); + color: var(--avatar-frame-color); + display: flex; + flex-direction: column; +} + +.default-image-text { + display: flex; + flex: 1; + align-self: center; + justify-content: normal; + font-size: 7rem; + font-weight: bold; +} + .course-tags { display: flex; position: relative; @@ -601,7 +617,7 @@ div.custom-checkbox>label>input:checked+img { } .button { - box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.13), 0px 0px 0.5px rgba(0, 0, 0, 0.5); + box-shadow: var(--btn-shadow); border-radius: 6px; cursor: pointer; display: flex; @@ -1271,3 +1287,19 @@ pre { width: 100%; overflow-x: auto; } + +.markdown-source h1 { + font-size: 1.3rem; +} + +.markdown-source h2 { + font-size: 1.2rem; +} + +.markdown-source h3 { + font-size: 1.1rem; +} + +.markdown-source h4 { + font-size: 1rem; +} diff --git a/community/www/batch/learn.html b/community/www/batch/learn.html index 8cd1a7a7..4135ab0e 100644 --- a/community/www/batch/learn.html +++ b/community/www/batch/learn.html @@ -1,13 +1,8 @@ {% extends "templates/base.html" %} {% from "www/macros/livecode.html" import LiveCodeEditorJS, LiveCodeEditor with context %} -{% block title %}{{ lesson.title }}{% endblock %} +{% block title %} {{ lesson.title }} - {{ course.title }} {% endblock %} {% block head_include %} - - - - @@ -47,7 +42,7 @@
{% if membership or lesson.include_in_preview %} -
{{ lesson.render_html() }}
+
{{ lesson.render_html() }}
{% else %}
This lesson is not available for Preview. Please join the course to access this lesson. Checkout Course Details. diff --git a/community/www/batch/learn.py b/community/www/batch/learn.py index 7cadf7a1..54e96da1 100644 --- a/community/www/batch/learn.py +++ b/community/www/batch/learn.py @@ -25,6 +25,13 @@ def get_context(context): context.next_url = get_learn_url(neighbours["next"], context.course) context.prev_url = get_learn_url(neighbours["prev"], context.course) + meta_info = context.lesson.title + " - " + context.course.title + context.metatags = { + "title": meta_info, + "keywords": meta_info, + "description": meta_info + } + context.page_extensions = get_page_extensions() context.page_context = { "course": context.course.name, diff --git a/community/www/courses/course.html b/community/www/courses/course.html index 78391792..b3d3c5e3 100644 --- a/community/www/courses/course.html +++ b/community/www/courses/course.html @@ -3,8 +3,6 @@ {% block title %}{{ course.title }} {% endblock %} {% block head_include %} - - {% endblock %} {% block content %} @@ -24,12 +22,16 @@ {% macro CourseCardWide(course) %}
-
+
{% for tag in course.get_tags() %}
{{ tag }}
{% endfor %}
+ {% if not course.image %} +
{{ course.title[0] }}
+ {% endif %}
diff --git a/community/www/courses/course.py b/community/www/courses/course.py index 5c102809..f0fb0990 100644 --- a/community/www/courses/course.py +++ b/community/www/courses/course.py @@ -18,3 +18,9 @@ def get_context(context): membership = course.get_membership(frappe.session.user) context.course.query_parameter = "?batch=" + membership.batch if membership and membership.batch else "" context.membership = membership + context.metatags = { + "title": course.title, + "image": course.image, + "description": course.short_introduction, + "keywords": course.title + } diff --git a/community/www/courses/index.html b/community/www/courses/index.html index a41343c3..058dc87f 100644 --- a/community/www/courses/index.html +++ b/community/www/courses/index.html @@ -2,8 +2,6 @@ {% from "www/hackathons/macros/card.html" import null_card %} {% block title %}{{ 'Courses' }}{% endblock %} {% block head_include %} - - {% endblock %} diff --git a/community/www/courses/index.py b/community/www/courses/index.py index f1027177..84343481 100644 --- a/community/www/courses/index.py +++ b/community/www/courses/index.py @@ -3,6 +3,12 @@ import frappe def get_context(context): context.no_cache = 1 context.courses = get_courses() + context.metatags = { + "title": "All Courses", + "image": frappe.db.get_single_value("Website Settings", "banner_image"), + "description": "This page lists all the courses published on our website", + "keywords": "All Courses, Courses, Learn" + } def get_courses(): course_names = frappe.get_all("LMS Course", filters={"is_published": True}, pluck="name")