diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 2302327e..e01adfbd 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -58,8 +58,14 @@ .field-input { border: 1px solid var(--gray-300); - border-radius: var(--border-radius-sm); - padding: 0.5rem; + border-radius: var(--border-radius-md); + padding: 0.5rem; + width: 75%; + margin: 0.25rem 0 1rem; +} + +.field-input:focus-visible { + outline: none; } .field-description { @@ -82,6 +88,10 @@ margin-top: 1rem; } +textarea.field-input { + height: 300px; +} + body { background-color: #FFFFFF; } diff --git a/lms/public/js/editor.js b/lms/public/js/editor.js index 3f5aaec8..0d12c157 100644 --- a/lms/public/js/editor.js +++ b/lms/public/js/editor.js @@ -2,8 +2,14 @@ import EditorJS from "@editorjs/editorjs"; import Header from "@editorjs/header"; import List from "@editorjs/list"; -create_editor_for_short_description = () => { +const create_editor_for_short_description = () => { let editor = new EditorJS({ holder: "course-description", + tools: { + header: { + class: Header, + }, + list: List, + }, }); }; diff --git a/lms/www/courses/create.html b/lms/www/courses/create.html index d4884716..72c7493c 100644 --- a/lms/www/courses/create.html +++ b/lms/www/courses/create.html @@ -9,7 +9,7 @@
{{ _("Course Details") }}
-
+
{{ _("Title") }}
@@ -18,11 +18,26 @@
- +
+
-
+
+
+ {{ _("Preview Video") }} +
+
+ {{ _("A feature video that provides a preview of the course") }} +
+
+
+ +
+
+ +
+
{{ _("Short Introduction") }}
@@ -31,11 +46,12 @@
-
+
+
-
+
{{ _("Tags") }}
@@ -44,11 +60,22 @@
+ {% for tag in get_tags(course.name) %} + + {% endfor %}
+
-
+
{{ _("Course Image") }}
@@ -59,11 +86,11 @@
- +
-
+
{{ _("Course Description") }}
@@ -71,9 +98,33 @@ {{ _("Add a detailed description") }}
- +
+
+ + +
+ +
+
+ {{ _("Instructor") }} +
+
+ {{ widgets.Avatar(member=member, avatar_class="avatar-medium") }} {{ member.full_name }} +
+
+ + +
diff --git a/lms/www/courses/create.js b/lms/www/courses/create.js index 0766be2d..13af5328 100644 --- a/lms/www/courses/create.js +++ b/lms/www/courses/create.js @@ -19,6 +19,10 @@ frappe.ready(() => { .addClass("image-preview") .attr("src", URL.createObjectURL(e.target.files[0])); }); + + $(".btn-save-course").click((e) => { + save_course(e); + }); }); const create_tag = (e) => { @@ -28,7 +32,7 @@ const create_tag = (e) => { let tag = `