Merge pull request #197 from pateljannat/ui-issues

fix: ui issues
This commit is contained in:
Jannat Patel
2021-08-27 09:58:22 +05:30
committed by GitHub
8 changed files with 48 additions and 60 deletions

View File

@@ -137,14 +137,8 @@ website_route_rules = [
{"from_route": "/courses/<course>/<certificate>", "to_route": "courses/certificate"}, {"from_route": "/courses/<course>/<certificate>", "to_route": "courses/certificate"},
{"from_route": "/hackathons/<hackathon>", "to_route": "hackathons/hackathon"}, {"from_route": "/hackathons/<hackathon>", "to_route": "hackathons/hackathon"},
{"from_route": "/hackathons/<hackathon>/<project>", "to_route": "hackathons/project"}, {"from_route": "/hackathons/<hackathon>/<project>", "to_route": "hackathons/project"},
{"from_route": "/add-a-new-batch", "to_route": "add-a-new-batch"},
{"from_route": "/courses/<course>/home", "to_route": "batch/home"},
{"from_route": "/courses/<course>/learn", "to_route": "batch/learn"}, {"from_route": "/courses/<course>/learn", "to_route": "batch/learn"},
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"}, {"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
{"from_route": "/courses/<course>/schedule", "to_route": "batch/schedule"},
{"from_route": "/courses/<course>/members", "to_route": "batch/members"},
{"from_route": "/courses/<course>/discuss", "to_route": "batch/discuss"},
{"from_route": "/courses/<course>/about", "to_route": "batch/about"},
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"}, {"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
{"from_route": "/courses/<course>/join", "to_route": "batch/join"}, {"from_route": "/courses/<course>/join", "to_route": "batch/join"},
{"from_route": "/discussions/<discussion>", "to_route": "discussions/discussion"}, {"from_route": "/discussions/<discussion>", "to_route": "discussions/discussion"},

View File

@@ -8,7 +8,7 @@ from frappe.model.document import Document
from ...md import markdown_to_html, find_macros from ...md import markdown_to_html, find_macros
class Lesson(Document): class Lesson(Document):
def before_save(self): def on_update(self):
dynamic_documents = ["Exercise", "Quiz"] dynamic_documents = ["Exercise", "Quiz"]
for section in dynamic_documents: for section in dynamic_documents:
self.update_lesson_name_in_document(section) self.update_lesson_name_in_document(section)

View File

@@ -13,6 +13,8 @@
{ {
"fieldname": "quiz", "fieldname": "quiz",
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Quiz", "label": "Quiz",
"options": "LMS Quiz" "options": "LMS Quiz"
}, },
@@ -25,12 +27,13 @@
{ {
"fieldname": "score", "fieldname": "score",
"fieldtype": "Data", "fieldtype": "Data",
"in_list_view": 1,
"label": "Score" "label": "Score"
} }
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2021-06-07 14:19:54.958989", "modified": "2021-08-26 12:24:15.973829",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "LMS", "module": "LMS",
"name": "LMS Quiz Submission", "name": "LMS Quiz Submission",

View File

@@ -57,7 +57,7 @@
frappe.ready(() => { frappe.ready(() => {
expand_the_active_chapter(); expand_the_active_chapter();
$(".chapter-title").click((e) => { $(".chapter-title").unbind().click((e) => {
rotate_chapter_icon(e); rotate_chapter_icon(e);
}); });
@@ -103,7 +103,6 @@
} }
var rotate_chapter_icon = (e) => { var rotate_chapter_icon = (e) => {
e.preventDefault();
var icon = $(e.currentTarget).children(".chapter-icon"); var icon = $(e.currentTarget).children(".chapter-icon");
if (icon.css("transform") == "none") { if (icon.css("transform") == "none") {
icon.css("transform", "rotate(90deg)"); icon.css("transform", "rotate(90deg)");
@@ -111,5 +110,4 @@
icon.css("transform", "none"); icon.css("transform", "none");
} }
} }
</script> </script>

View File

@@ -3,7 +3,7 @@
<div class="course-home-headings"> <div class="course-home-headings">
Course Outline Course Outline
</div> </div>
<div class="coure-outline"> <div class="common-card-style course-outline">
{% for chapter in course.get_chapters() %} {% for chapter in course.get_chapters() %}
{{ widgets.ChapterTeaser(index=loop.index, chapter=chapter, course=course, batch=batch, membership=membership) }} {{ widgets.ChapterTeaser(index=loop.index, chapter=chapter, course=course, batch=batch, membership=membership) }}
{% endfor %} {% endfor %}

View File

@@ -98,7 +98,7 @@ section {
padding: 15px; padding: 15px;
margin: 70px auto; margin: 70px auto;
border: 1px solid #d1d8dd; border: 1px solid #d1d8dd;
border-radius: 4px; border-radius: 8px;
background-color: #fff; background-color: #fff;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1);
} }
@@ -162,8 +162,8 @@ input[type=checkbox] {
.course-tags { .course-tags {
display: flex; display: flex;
position: relative; position: relative;
top: 0.75rem; top: 1rem;
left: 0.75rem; left: 1rem;
} }
.course-card-pills { .course-card-pills {
@@ -184,8 +184,9 @@ input[type=checkbox] {
.common-page-style { .common-page-style {
background: #F4F5F6; background: #F4F5F6;
padding-bottom: 2rem; padding-bottom: 5rem;
min-height: 60vh; min-height: 60vh;
padding-top: 3rem;
} }
.common-card-style { .common-card-style {
@@ -194,7 +195,7 @@ input[type=checkbox] {
border-radius: 8px; border-radius: 8px;
position: relative; position: relative;
border: 1px solid #EEF0F2; 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 { .course-card {
@@ -279,23 +280,13 @@ input[type=checkbox] {
line-height: 135%; line-height: 135%;
color: var(--text-color); 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 { .cards-parent {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
-moz-column-gap: 32px; -moz-column-gap: 40px;
column-gap: 32px; column-gap: 40px;
row-gap: 32px; row-gap: 40px;
align-items: center; align-items: center;
} }
@@ -318,7 +309,8 @@ input[type=checkbox] {
} }
.courses-header { .courses-header {
padding: 50px 20px 20px; margin-bottom: 1.5rem;
padding: 0 1rem;
color: var(--text-color); color: var(--text-color);
font-weight: 600; font-weight: 600;
font-size: 22px; font-size: 22px;
@@ -420,7 +412,7 @@ input[type=checkbox] {
height: 1.5rem; height: 1.5rem;
width: 1.5rem; width: 1.5rem;
border: 1px solid black; border: 1px solid black;
border-radius: 5px; border-radius: 8px;
} }
.custom-checkbox>label>input:checked+.empty-checkbox { .custom-checkbox>label>input:checked+.empty-checkbox {
@@ -438,7 +430,7 @@ input[type=checkbox] {
flex-direction: row; flex-direction: row;
padding: 24px; padding: 24px;
background: #E2E6E9; background: #E2E6E9;
border-radius: 12px; border-radius: 8px;
margin-top: 16px; margin-top: 16px;
} }
@@ -463,7 +455,7 @@ input[type=checkbox] {
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
margin-right: 32px; margin-right: 32px;
border-radius: 5px; border-radius: 8px;
flex: 1; flex: 1;
align-self: center; align-self: center;
} }
@@ -545,7 +537,7 @@ input[type=checkbox] {
.button { .button {
box-shadow: var(--btn-shadow); box-shadow: var(--btn-shadow);
border-radius: 6px; border-radius: 8px;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -736,9 +728,8 @@ input[type=checkbox] {
margin-left: .875rem; margin-left: .875rem;
} }
.coure-outline { .course-outline {
background: #FFFFFF; flex-direction: column;
border-radius: 12px;
padding: 16px 12px 16px; padding: 16px 12px 16px;
} }
@@ -792,7 +783,6 @@ input[type=checkbox] {
font-weight: bold; font-weight: bold;
} }
.member-card-xl .member-card-title { .member-card-xl .member-card-title {
font-weight: bold; font-weight: bold;
} }
@@ -837,6 +827,7 @@ input[type=checkbox] {
letter-spacing: -0.0175em; letter-spacing: -0.0175em;
color: #192734; color: #192734;
margin-bottom: 1rem; margin-bottom: 1rem;
padding: 0 1rem;
} }
.course-detail-headings { .course-detail-headings {
@@ -881,6 +872,14 @@ input[type=checkbox] {
flex-direction: column; flex-direction: column;
} }
.description-card p {
line-height: 1.72;
}
.description-card p:last-child {
margin-bottom: 0;
}
.overview-card { .overview-card {
padding: 1.5rem; padding: 1.5rem;
width: 256px; width: 256px;
@@ -996,7 +995,7 @@ input[type=checkbox] {
} }
.breadcrumb { .breadcrumb {
padding: 1rem 0 0; padding: 0 1rem;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
@@ -1052,7 +1051,7 @@ input[type=checkbox] {
.active-lesson { .active-lesson {
background-color: #EBF5FF; background-color: #EBF5FF;
border-radius: 4px; border-radius: 0.25rem;
} }
.lesson-progress { .lesson-progress {
@@ -1061,7 +1060,7 @@ input[type=checkbox] {
font-size: 10px; font-size: 10px;
line-height: 120%; line-height: 120%;
margin: 0px 10px 20px; margin: 0px 10px 20px;
border-radius: 4px; border-radius: 8px;
font-weight: bold; font-weight: bold;
} }
@@ -1071,7 +1070,7 @@ input[type=checkbox] {
.profile-banner { .profile-banner {
height: 248px; height: 248px;
border-radius: 12px 12px 0px 0px; border-radius: 8px 8px 0px 0px;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
} }
@@ -1090,7 +1089,7 @@ input[type=checkbox] {
.profile-info { .profile-info {
height: 68px; height: 68px;
background: #ffffff; background: #ffffff;
border-radius: 0px 0px 12px 12px; border-radius: 0px 0px 8px 8px;
} }
.profile-avatar { .profile-avatar {
@@ -1337,7 +1336,6 @@ pre {
padding: 20px; padding: 20px;
} }
.drop-down-icon { .drop-down-icon {
padding: 5px 0 0 5px; padding: 5px 0 0 5px;
} }
@@ -1451,20 +1449,16 @@ textarea.form-control {
} }
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.certificate-page .common-card-style { .certificate-page .common-card-style {
width: 50%; width: 50%;
} }
.certificate-content { .certificate-content {
padding: 2rem; padding: 2rem;
} }
.certificate-ribbon { .certificate-ribbon {
margin-right: 1rem; margin-right: 1rem;
} }
.certificate-heading { .certificate-heading {
font-size: 2rem; font-size: 2rem;
} }
@@ -1480,7 +1474,6 @@ textarea.form-control {
.certificate-page .common-card-style { .certificate-page .common-card-style {
width: 90%; width: 90%;
} }
.certificate-heading { .certificate-heading {
font-size: 2rem; font-size: 2rem;
} }

View File

@@ -178,7 +178,7 @@
<div class="course-home-headings"> <div class="course-home-headings">
Course Description Course Description
</div> </div>
<div class="common-card-style description-card small-title"> <div class="common-card-style description-card">
{{ frappe.utils.md_to_html(course.description) }} {{ frappe.utils.md_to_html(course.description) }}
</div> </div>
</div> </div>

View File

@@ -51,7 +51,7 @@
{% endif %} {% endif %}
</span> </span>
{% if frappe.session.user == member.email %} {% if frappe.session.user == member.email %}
<a class="dark-links pull-right" href="edit-profile?name={{ member.email }}">Edit Profile</a> <a class="dark-links pull-right" href="/edit-profile?name={{ member.email }}">Edit Profile</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>