feat: lesson edit page
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 1.5rem;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--gray-900);
|
||||
line-height: 160%;
|
||||
@@ -93,7 +93,7 @@
|
||||
}
|
||||
|
||||
.field-group {
|
||||
margin-bottom: 2rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.field-description {
|
||||
@@ -125,9 +125,8 @@ textarea.field-input {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.common-card-style .outline-lesson:last-child {
|
||||
.common-card-style .outline-lesson:last-of-type {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.level {
|
||||
@@ -364,12 +363,12 @@ input[type=checkbox] {
|
||||
}
|
||||
|
||||
.button-links {
|
||||
color: var(--gray-900);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.button-links:hover {
|
||||
text-decoration: none;
|
||||
color: var(--gray-900);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.icon-background {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
frappe.ready(() => {
|
||||
setup_file_size();
|
||||
pin_header();
|
||||
|
||||
$(".join-batch").click((e) => {
|
||||
join_course(e);
|
||||
@@ -57,6 +58,18 @@ frappe.ready(() => {
|
||||
});
|
||||
});
|
||||
|
||||
const pin_header = () => {
|
||||
const el = document.querySelector(".sticky");
|
||||
if (el) {
|
||||
const observer = new IntersectionObserver(
|
||||
([e]) =>
|
||||
e.target.classList.toggle("is-pinned", e.intersectionRatio < 1),
|
||||
{ threshold: [1] }
|
||||
);
|
||||
observer.observe(el);
|
||||
}
|
||||
};
|
||||
|
||||
const setSortable = (el) => {
|
||||
new Sortable(el, {
|
||||
group: {
|
||||
|
||||
@@ -2,9 +2,10 @@ import EditorJS from "@editorjs/editorjs";
|
||||
import Header from "@editorjs/header";
|
||||
import List from "@editorjs/list";
|
||||
|
||||
const create_editor_for_short_description = () => {
|
||||
let editor = new EditorJS({
|
||||
holder: "course-description",
|
||||
let self = this;
|
||||
const create_editor_for_lesson_content = () => {
|
||||
self.editor = new EditorJS({
|
||||
holder: "lesson-content",
|
||||
tools: {
|
||||
header: {
|
||||
class: Header,
|
||||
@@ -13,3 +14,6 @@ const create_editor_for_short_description = () => {
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
create_editor_for_lesson_content();
|
||||
console.log(self.editor);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import "./profile.js";
|
||||
import "./common_functions.js";
|
||||
import "./editor.js";
|
||||
import "../../../../frappe/frappe/public/js/frappe/ui/chart.js";
|
||||
|
||||
Reference in New Issue
Block a user