diff --git a/apps/course/templates/course/lesson.html b/apps/course/templates/course/lesson.html index 662a4dd5..9fbe5a88 100644 --- a/apps/course/templates/course/lesson.html +++ b/apps/course/templates/course/lesson.html @@ -92,6 +92,14 @@ {% endcomment %} +
+
+
Задавайте вопросы:
+
+ +
+
+
Задавайте вопросы:
@@ -129,4 +137,6 @@ {% include 'templates/blocks/share.html' %}
+ {% endblock content %} diff --git a/web/src/components/Comment.vue b/web/src/components/Comment.vue new file mode 100644 index 00000000..b688c6b7 --- /dev/null +++ b/web/src/components/Comment.vue @@ -0,0 +1,44 @@ + + + + diff --git a/web/src/components/Comments.vue b/web/src/components/Comments.vue new file mode 100644 index 00000000..c89a3924 --- /dev/null +++ b/web/src/components/Comments.vue @@ -0,0 +1,38 @@ + + + diff --git a/web/src/js/modules/comments.js b/web/src/js/modules/comments.js index 30b0a815..084b172f 100644 --- a/web/src/js/modules/comments.js +++ b/web/src/js/modules/comments.js @@ -62,3 +62,4 @@ $(document).ready(function () { form.find('.questions__reply-info').hide(); } }); + diff --git a/web/src/js/modules/comments_vue.js b/web/src/js/modules/comments_vue.js new file mode 100644 index 00000000..f511dac5 --- /dev/null +++ b/web/src/js/modules/comments_vue.js @@ -0,0 +1,59 @@ +import Vue from 'vue'; +import Comments from '../../components/Comments'; +//import $ from 'jquery'; + +if (process.env.NODE_ENV === 'development') { + // Enable vue-devtools + Vue.config.devtools = true; +} + +let app = new Vue({ + el: '#comments_block', + data(){ + return { + userId: 123, + accessToken: 123, + comments: [{ + author: { + get_full_name: 'John Doe', + photo: {url: ''}, + }, + created_at_humanize: '12 07 18', + content: 'content content content content', + id: 1, + is_child_node: false + }, { + author: { + get_full_name: 'Sarah Conor', + photo: {url: ''}, + }, + created_at_humanize: '5 05 18', + content: 'hasta la vista', + id: 2, + is_child_node: false, + children: [{ + author: { + get_full_name: 'John Doe', + photo: {url: ''}, + }, + created_at_humanize: '12 07 18', + content: 'content content content content', + id: 10, + is_child_node: true + }, { + author: { + get_full_name: 'Sarah Conor', + photo: {url: ''}, + }, + created_at_humanize: '5 05 18', + content: 'hasta la vista', + id: 20, + is_child_node: true, + }] + }] + } + }, + components: { + 'comments': Comments, + } +}); diff --git a/web/webpack.config.js b/web/webpack.config.js index 3c6785ab..3d47d057 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -9,6 +9,7 @@ module.exports = { entry: { app: "./src/js/app.js", courseRedactor: "./src/js/course-redactor.js", + comments_vue: "./src/js/modules/comments_vue.js", mixpanel: "./src/js/third_party/mixpanel-2-latest.js", sprite: glob('./src/icons/*.svg'), images: glob('./src/img/*'), @@ -116,6 +117,9 @@ module.exports = { }, watch: NODE_ENV === 'development', + watchOptions: { + poll: true, + }, devtool: NODE_ENV === 'development' ? 'source-map' : false };