diff --git a/apps/course/templates/course/lesson.html b/apps/course/templates/course/lesson.html
index 6c9511ae..c1e0bd20 100644
--- a/apps/course/templates/course/lesson.html
+++ b/apps/course/templates/course/lesson.html
@@ -2,6 +2,7 @@
{% load static %}
{% block title %}{{ lesson.title }} - {{ block.super }}{% endblock title %}
+{% block ogimage %}http://{{request.META.HTTP_HOST}}{% if lesson.course.cover %}{{ lesson.course.cover.image.url }}{% else %}{% static 'img/og_courses.jpg' %}{% endif %}{% endblock ogimage %}
{% block content %}
- {% endif %} {% endcomment %}
+ {% endif %}
{% else %}
-
+
{% endif %}
-
-
+
-->
@@ -14,8 +15,8 @@
Вернуться к списку уроков
- {% comment %} {% if next_lesson %}
-
+ {% if next_lesson %}
+
Перейти к следующему уроку
{{ lesson.title }}
@@ -32,7 +33,7 @@
{% if lesson.cover %}
ДАТА
ДОСТУП
@@ -656,11 +656,11 @@
this.course = api.convertCourseJson(response.data);
this.course.live = this.live;
- if (this.live && this.course.date) {
+ /* if (this.live && this.course.date) {
this.course.date = _.find(this.scheduleOptions, (item) => {
return item.value == this.course.date;
})
- }
+ } */
this.$nextTick(() => {
this.courseLoading = false;
@@ -841,11 +841,11 @@
this.course.id = courseData.id;
}
- if(this.live && courseData.date) {
+ /*if(this.live && courseData.date) {
this.course.date = _.find(this.scheduleOptions, function(item){
return item.value == courseData.date;
});
- }
+ }*/
this.$nextTick(() => {
this.courseSyncHook = false;
});
diff --git a/web/src/components/LessonRedactor.vue b/web/src/components/LessonRedactor.vue
index 82faaadb..a0a245e2 100644
--- a/web/src/components/LessonRedactor.vue
+++ b/web/src/components/LessonRedactor.vue
@@ -14,16 +14,22 @@
{{ title }}
-
-
-
-
-
-
-
-
+
@@ -81,6 +87,7 @@
import BlockImages from './blocks/BlockImages'
import BlockImageText from './blocks/BlockImageText'
import BlockVideo from './blocks/BlockVideo'
+ import LilImage from "./blocks/Image"
import {api} from "../js/modules/api";
import Draggable from 'vuedraggable';
import _ from 'lodash'
@@ -105,7 +112,13 @@
if (blockToRemove.data.id) {
api.removeContentBlock(blockToRemove, this.accessToken);
}
- }
+ },
+ onUpdateCoverUrl(newValue) {
+ this.lesson.coverImage = newValue;
+ },
+ onUpdateCoverId(newValue) {
+ this.lesson.coverImageId = newValue;
+ },
},
computed: {
title() {
@@ -120,10 +133,11 @@
'block-images': BlockImages,
'block-video': BlockVideo,
'vue-draggable': Draggable,
+ 'lil-image': LilImage,
}
}
\ No newline at end of file
+
diff --git a/web/src/img/og_blog.jpg b/web/src/img/og_blog.jpg
new file mode 100644
index 00000000..cabead92
Binary files /dev/null and b/web/src/img/og_blog.jpg differ
diff --git a/web/src/img/og_courses.jpg b/web/src/img/og_courses.jpg
new file mode 100644
index 00000000..918718fe
Binary files /dev/null and b/web/src/img/og_courses.jpg differ
diff --git a/web/src/img/og_main.jpg b/web/src/img/og_main.jpg
new file mode 100644
index 00000000..d9c04f59
Binary files /dev/null and b/web/src/img/og_main.jpg differ
diff --git a/web/src/img/og_summer_school.jpg b/web/src/img/og_summer_school.jpg
new file mode 100644
index 00000000..2adc8a7a
Binary files /dev/null and b/web/src/img/og_summer_school.jpg differ
diff --git a/web/src/js/modules/api.js b/web/src/js/modules/api.js
index 59c98939..36dc5f99 100644
--- a/web/src/js/modules/api.js
+++ b/web/src/js/modules/api.js
@@ -204,6 +204,7 @@ export const api = {
const isAdding = (!lessonObject.hasOwnProperty('id') || !lessonObject.hasOwnProperty('id'));
const lessonJson = {
+ cover: lessonObject.coverImageId ? lessonObject.coverImageId : null,
title: lessonObject.title,
short_description: lessonObject.short_description,
course: lessonObject.course_id,
@@ -284,6 +285,8 @@ export const api = {
id: lessonJSON.id,
title: lessonJSON.title,
short_description: lessonJSON.short_description,
+ coverImageId: lessonJSON.cover && lessonJSON.cover.id ? lessonJSON.cover.id : null,
+ coverImage: lessonJSON.cover && lessonJSON.cover.image ? lessonJSON.cover.image : null,
content: api.convertContentResponse(lessonJSON.content)
}
},
diff --git a/web/src/sass/_common.sass b/web/src/sass/_common.sass
index 096e0b1b..0f732fa5 100755
--- a/web/src/sass/_common.sass
+++ b/web/src/sass/_common.sass
@@ -2648,8 +2648,15 @@ a.grey-link
flex: 0 0 140px
+m
display: none
+ &__pic-wrapper
+ width: 130px;
+ height: 130px;
+ border-radius: 50%;
+ overflow: hidden;
&__pic
- display: block
+ top: 50%;
+ position: relative;
+ transform: translateY(-50%);
width: 100%
&__content
flex: 0 0 calc(100% - 165px)
+
+
+
+
+
+
+
+
+
+
+
+