diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 235ee522..d20b16a5 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -860,16 +860,15 @@ pre { } .certificate-ribbon { - background-color: var(--primary-color); - padding: 0.5rem; - border-radius: var(--border-radius-md); + background-color: var(--primary-color); + padding: 0.5rem; + border-radius: var(--border-radius-md); } .certificate-heading { - font-size: 1.5rem; - font-weight: 500; - color: var(--text-color); - margin-top: 0.5rem; + font-size: 2rem; + font-weight: 500; + color: var(--text-color); } .certificate-para { diff --git a/lms/www/courses/certificate.py b/lms/www/courses/certificate.py index aadf6eed..bf0d2ec6 100644 --- a/lms/www/courses/certificate.py +++ b/lms/www/courses/certificate.py @@ -17,7 +17,7 @@ def get_context(context): if context.certificate.course != course_name: redirect_to_course_list() - context.course = frappe.db.get_value("LMS Course", course_name, ["title", "name"], as_dict=True) + context.course = frappe.db.get_value("LMS Course", course_name, ["title", "name", "image"], as_dict=True) context.instructors = (", ").join([x.full_name for x in get_instructors(course_name)]) context.member = frappe.db.get_value("User", context.certificate.member, ["full_name"], as_dict=True) @@ -27,6 +27,12 @@ def get_context(context): context.custom_certificate_template = frappe.db.get_value("Web Template", template_name, "template") context.custom_template = render_template(context.custom_certificate_template, context) + context.metatags = { + "title": f"{member.full_name} - {course.title}", + "image": course.image, + "keywords": course.title, member.full_name + } + def redirect_to_course_list(): frappe.local.flags.redirect_location = "/courses" raise frappe.Redirect