Compare commits

..

1 Commits

Author SHA1 Message Date
pateljannat
edddd830c1 fix: added min and max width to container padding 2021-07-20 12:51:14 +05:30
2 changed files with 43 additions and 45 deletions

View File

@@ -10,8 +10,7 @@ class CustomUser(User):
""" """
return frappe.get_all( return frappe.get_all(
'LMS Course', { 'LMS Course', {
'owner': self.name, 'owner': self.name
'is_published': True
}) })
def get_palette(self): def get_palette(self):
@@ -63,16 +62,9 @@ class CustomUser(User):
def get_mentored_courses(self): def get_mentored_courses(self):
""" Returns all courses mentored by this user """ """ Returns all courses mentored by this user """
mentored_courses = [] return frappe.get_all("LMS Course Mentor Mapping",
mapping = frappe.get_all("LMS Course Mentor Mapping",
{ {
"mentor": self.name, "mentor": self.name
}, },
["name", "course"] ["name", "course"]
) )
for map in mapping:
if frappe.db.get_value("LMS Course", map.course, "is_published"):
mentored_courses.append(map)
return mentored_courses

View File

@@ -655,6 +655,7 @@ div.custom-checkbox>label>input:checked+img {
.course-home-outline { .course-home-outline {
margin-top: 3rem; margin-top: 3rem;
flex: 1;
} }
.small-title { .small-title {
@@ -672,7 +673,6 @@ div.custom-checkbox>label>input:checked+img {
.chapter-description { .chapter-description {
height: fit-content; height: fit-content;
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem;
} }
.chapter-icon { .chapter-icon {
@@ -680,39 +680,26 @@ div.custom-checkbox>label>input:checked+img {
} }
.course-outline-instructor-parent { .course-outline-instructor-parent {
display: grid; display: flex;
grid-gap: 2rem; justify-content: space-between;
grid-template-columns: 4fr 1fr;
}
@media (max-width: 768px) {
.course-outline-instructor-parent {
grid-gap: 1rem;
}
} }
@media (max-width: 600px) { @media (max-width: 600px) {
.course-outline-instructor-parent { .course-outline-instructor-parent {
flex-direction: column;
padding: 0px 24px 0px; padding: 0px 24px 0px;
grid-template-columns: none;
} }
} }
.profile-parent-section { .profile-parent-section {
display: grid; display: flex;
grid-gap: 2rem; justify-content: space-between;
grid-template-columns: 4fr 1fr;
}
@media (max-width: 768px) {
.profile-parent-section {
grid-gap: 1rem;
}
} }
@media (max-width: 600px) { @media (max-width: 600px) {
.profile-parent-section { .profile-parent-section {
grid-template-columns: none; flex-direction: column;
} }
} }
@@ -744,6 +731,18 @@ div.custom-checkbox>label>input:checked+img {
margin-top: 3rem; margin-top: 3rem;
} }
@media (min-width: 1024px) {
.course-overview-section {
margin-left: 2rem;
}
}
@media (min-width: 600px) {
.course-overview-section {
margin-left: 1rem;
}
}
.lesson-info { .lesson-info {
font-size: 16px; font-size: 16px;
line-height: 250%; line-height: 250%;
@@ -901,18 +900,14 @@ div.custom-checkbox>label>input:checked+img {
} }
.description-card { .description-card {
padding: 1.5rem; padding: 24px;
flex-direction: column; flex-direction: column;
} }
.overview-card { .overview-card {
padding: 1.5rem; padding: 24px 26px 24px;
width: 256px; width: 256px;
flex-direction: column; flex-direction: column;
display: grid;
-moz-column-gap: 1rem;
column-gap: 1rem;
row-gap: 1rem;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
@@ -945,6 +940,10 @@ div.custom-checkbox>label>input:checked+img {
} }
} }
.overtime-item {
margin: 16px 0px 16px;
}
.view-all-mentors { .view-all-mentors {
width: 100%; width: 100%;
display: flex; display: flex;
@@ -1013,7 +1012,8 @@ div.custom-checkbox>label>input:checked+img {
} }
.course-details-outline { .course-details-outline {
margin-top: 1rem; margin-top: 16px;
flex: 1;
} }
.lesson-content-card { .lesson-content-card {
@@ -1022,15 +1022,14 @@ div.custom-checkbox>label>input:checked+img {
} }
.course-content-parent { .course-content-parent {
display: grid; display: flex;
grid-gap: 2rem; justify-content: space-between;
grid-template-columns: 2fr minmax(600px, 5fr);
} }
@media (max-width: 1024px) { @media (max-width: 768px) {
.course-content-parent { .course-content-parent {
display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
justify-content: center;
} }
} }
@@ -1045,7 +1044,8 @@ div.custom-checkbox>label>input:checked+img {
} }
.lesson-pagination-parent { .lesson-pagination-parent {
margin-top: 1rem; margin: 1rem 0px 0px 2rem;
flex: 3;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
@@ -1216,6 +1216,12 @@ div.custom-checkbox>label>input:checked+img {
flex-direction: column; flex-direction: column;
} }
@media (min-width: 600px) {
.course-creator-progress-parent {
margin-left: 2rem;
}
}
.course-creator-section { .course-creator-section {
margin-top: 3rem; margin-top: 3rem;
} }