Compare commits

..

7 Commits

Author SHA1 Message Date
pateljannat
86596d0cfe fix: minor issues 2021-07-20 17:19:18 +05:30
Jannat Patel
9323cfd748 Merge pull request #159 from rmehta/fix-global-container
fix(style): max-width on container padding
2021-07-20 13:06:36 +05:30
Jannat Patel
d125b02cec fix: added max width to container padding 2021-07-20 13:05:15 +05:30
Rushabh Mehta
276d64a66a fix(style): don't mess with global container styles 2021-07-20 09:30:58 +05:30
Rushabh Mehta
79eb381a41 Merge pull request #157 from rmehta/remove-old-styles
fix(cleanup): remove old styles
2021-07-19 17:19:54 +05:30
Rushabh Mehta
44f9c0dfd3 fix(minor): remove old styles 2021-07-19 17:14:52 +05:30
Jannat Patel
0ca4cd724e Merge pull request #156 from fossunited/fix-only-show-published-courses
fix: only show the published courses on All Courses page
2021-07-19 17:11:03 +05:30
4 changed files with 46 additions and 352 deletions

View File

@@ -10,7 +10,8 @@ class CustomUser(User):
"""
return frappe.get_all(
'LMS Course', {
'owner': self.name
'owner': self.name,
'is_published': True
})
def get_palette(self):
@@ -62,9 +63,16 @@ class CustomUser(User):
def get_mentored_courses(self):
""" Returns all courses mentored by this user """
return frappe.get_all("LMS Course Mentor Mapping",
mentored_courses = []
mapping = frappe.get_all("LMS Course Mentor Mapping",
{
"mentor": self.name
"mentor": self.name,
},
["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

@@ -1,4 +1,3 @@
@import "./style.css";
@import "./vars.css";
@import "./style.less";

View File

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

View File

@@ -1,307 +0,0 @@
h2 {
margin: 20px 0px;
color: black;
}
.teaser {
background: white;
border-radius: 9px;
border: 1px solid #C4C4C4;
.teaser-body {
padding: 20px;
box-shadow: 0px 5px 10px rgb(0 0 0 / 10%)
}
.teaser-footer {
padding: 20px;
}
}
.sketch-teaser {
.teaser();
width: 220px;
margin-bottom: 30px;
margin-top: 30px;
svg {
width: 200px;
height: 200px;
}
.sketch-image {
padding: 10px;
}
.sketch-footer {
border-top: 1px solid#C4C4C4;
padding: 10px;
background: #F6F6F6;
border-radius: 0px 0px 10px 10px;
}
}
.course-teaser {
.teaser();
color: #444;
margin-bottom: 20px;
margin-top: 20px;
h3, h4 {
color: black;
font-weight: bold;
}
.course-body, .course-footer {
padding: 20px;
}
.course-body {
min-height: 8em;
}
.course-footer {
border-top: 1px solid #ddd;
}
a, a:hover {
color: inherit;
text-decoration: none;
}
}
.anchor_style {
color: inherit;
}
.anchor_style:hover {
text-decoration: none
}
section {
padding: 60px 0px;
}
section h2 {
margin-bottom: 40px;
font-size: 48px;
line-height: 58px;
font-weight: bold;
}
section.lightgray {
background: #F6F6F6;
}
#hero .jumbotron {
background: inherit;
}
.chapter-teaser {
.teaser();
color: #444;
margin: 20px 0px;
h3, h4 {
color: black;
font-weight: bold;
}
}
.field-width {
width: 40%;
display: inline-block;
}
.footer-grouped-links {
display: none;
}
.footer-info {
border-top: 0px;
margin-top: 0px;
.footer-col-right {
padding-top: 1.8rem;
}
}
.web-footer {
border-top: 1px solid #E2E6E9;
padding: 0px;
padding: 2rem 0px;
margin-top: 2rem;
}
.course-type {
text-transform: uppercase;
font-size: 1.0em;
font-weight: bold;
color: var(--tag-color);
}
.instructor-title {
color: black;
}
.instructor-subtitle {
font-size: 0.8em;
color: var(--text-color);
}
// .mentors-wrapper {
// .gray-section();
// }
.chapter-number {
background: var(--text-color);
color: white;
height: 24px;
min-width: 24px;
margin-right: 5px;
}
.sidebar {
background: var(--sidebar-bg);
border: 1px solid var(--sidebar-border);
margin: 20px 0px;
border-radius: 10px;
padding: 1px 20px 20px 20px;
}
.sidebar h3 {
margin-top: 20px;
color: black;
}
.sidebar-batch {
background: var(--sidebar-bg);
color: var(--text-color);
position: fixed;
left: 0;
height: 100%;
}
.sidebar-batch a {
padding: 16px 8px 8px 16px;
display: block;
}
.sidebar .notice {
margin-top: 10px;
padding: 10px;
border-radius: 10px;
border: 1px dashed var(--text-color);
}
.sidebar .notice a {
color: inherit;
text-decoration: underline;
}
// LiveCode editor
.livecode-editor {
.CodeMirror {
border: 1px solid #ddd;
background: #ffe;
height: auto;
}
.CodeMirror-scroll {
max-height: 310px;
min-height: 310px;
}
.controls {
padding: 10px 0px;
}
canvas {
border: 5px solid #ddd;
position: relative;
z-index: 0;
}
.output {
position: absolute;
z-index: 1;
width: 300px;
left: 0px;
top: 0px;
background-color: rgba(255, 255, 255, 0);
max-height: 300px;
white-space: pre-wrap;
word-wrap: break-word;
margin: 0px;
margin-left: 20px;
padding: 4px;
color: #888;
}
@media (max-width: 768px) {
.canvas-wrapper {
padding-top: 10px;
}
.code-wrapper {
min-height: 50px;
}
.CodeMirror {
min-height: 50px;
}
}
}
.sketch-header {
input#sketch-title {
font-weight: bold;
}
}
.lesson-teaser {
line-height: 40px;
}
#hero h1 {
color: black !important;
}
.lesson-page {
margin: 20px 0px;
}
.exercise-image svg {
width: 200px;
height: 200px;
border: 1px solid #ddd;
margin-bottom: 20px;
}
.svg-200 svg {
width: 200px;
height: 200px;
}
.livecode-editor-small .livecode-editor {
.CodeMirror-scroll {
max-height: 160px;
min-height: 160px;
}
canvas {
width: 150px;
height: 150px;
}
}
.mentor-dashboard {
margin-top: 20px;
.submission {
margin: 40px 0px 0px 20px;
}
}
.no-preview-message {
width: fit-content;
margin: 50px 0px 50px;
color: black;
}