fix: removed unused styles and folders
This commit is contained in:
@@ -397,25 +397,6 @@ input[type=checkbox] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-top-section {
|
|
||||||
float: none;
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 1150px;
|
|
||||||
padding-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.course-top-section {
|
|
||||||
max-width: 720px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
.course-top-section {
|
|
||||||
max-width: 342px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-links:hover {
|
.button-links:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
@@ -1077,28 +1058,6 @@ div.custom-checkbox>label>input:checked+img {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-details-page {
|
|
||||||
padding: 0px 0px 80px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
max-width: 1120px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1025px) {
|
|
||||||
.course-details-page {
|
|
||||||
padding: 24px 0px 24px;
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.course-details-page {
|
|
||||||
padding: 24px 0px 24px;
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.active-lesson {
|
.active-lesson {
|
||||||
background-color: #EBF5FF;
|
background-color: #EBF5FF;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="common-page-style">
|
<div class="common-page-style">
|
||||||
<div class="container">
|
<div class="container course-details-page">
|
||||||
{{ widgets.BreadCrumb(course=course, lesson=lesson) }}
|
{{ widgets.BreadCrumb(course=course, lesson=lesson) }}
|
||||||
<div class="course-content-parent">
|
<div class="course-content-parent">
|
||||||
<div class="course-details-outline">
|
<div class="course-details-outline">
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
{% extends "templates/base.html" %}
|
|
||||||
{% from "www/hackathons/macros/card.html" import null_card %}
|
|
||||||
|
|
||||||
{% block title %}{{ 'My Courses' }}{% endblock %}
|
|
||||||
{% block head_include %}
|
|
||||||
<meta name="description" content="My Courses" />
|
|
||||||
<meta name="keywords" content="" />
|
|
||||||
<style>
|
|
||||||
div.card-hero-img {
|
|
||||||
height: 220px;
|
|
||||||
background-size: cover;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
background-color: rgb(250, 251, 252);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-image-wrapper {
|
|
||||||
display: flex;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 220px;
|
|
||||||
background-color: rgb(250, 251, 252);
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-body {
|
|
||||||
align-self: center;
|
|
||||||
color: #d1d8dd;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-courses {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
padding: 5rem 0 5rem 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% macro card(course) %}
|
|
||||||
<div class="col-sm-4 mb-4 text-left">
|
|
||||||
<a href="//courses/course?course={{course.name}}" class="no-decoration no-underline">
|
|
||||||
<div class="card h-100">
|
|
||||||
<div class='card-body'>
|
|
||||||
<h5 class='card-title'>{{ course.title }}</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class='container'>
|
|
||||||
{% if frappe.session.user != "Guest" %}
|
|
||||||
{% for course in my_courses %}
|
|
||||||
{{ card(course) }}
|
|
||||||
{% endfor %}
|
|
||||||
{% if my_courses %}
|
|
||||||
{% for n in range( (3 - (my_courses|length)) %3) %}
|
|
||||||
{{ null_card() }}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<div class="no-courses">You haven't enrolled in any Course yet. <a href="/courses">Check out the availabe
|
|
||||||
courses.</a></div>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<div class="no-courses">
|
|
||||||
<p>Please sign up to access this page.</p>
|
|
||||||
<a id="signup" class="btn btn-primary btn-lg" href="/login#signup">{{_('Sign Up')}}</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import frappe
|
|
||||||
|
|
||||||
def get_context(context):
|
|
||||||
context.no_cache = 1
|
|
||||||
context.my_courses = get_my_courses()
|
|
||||||
|
|
||||||
def get_my_courses():
|
|
||||||
my_courses = []
|
|
||||||
courses = frappe.get_all("LMS Course Enrollment", {"owner": frappe.session.user}, ["course"])
|
|
||||||
for course in courses:
|
|
||||||
my_courses.append({
|
|
||||||
"name": course.course,
|
|
||||||
"title": frappe.db.get_value("LMS Course", course.course, ["title"])
|
|
||||||
})
|
|
||||||
return my_courses
|
|
||||||
Reference in New Issue
Block a user