From a502506f596caeecb49e5dc4dfa970b016cb1d90 Mon Sep 17 00:00:00 2001 From: gzbender Date: Wed, 8 Aug 2018 03:12:16 +0500 Subject: [PATCH] =?UTF-8?q?LIL-601=20=D0=A1=D1=82=D0=B8=D0=BB=D0=B5=D0=B2?= =?UTF-8?q?=D1=8B=D0=B5=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2?= =?UTF-8?q?=D1=81=D0=B5=D0=B3=D0=BE=20=D1=81=D0=B0=D0=B9=D1=82=D0=B0=20?= =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D1=81=D1=81=D1=8B=D0=BB=D0=BE=D0=BA=20=D0=B2=20=D0=BA=D1=80?= =?UTF-8?q?=D0=B0=D1=82=D0=BA=D0=BE=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D1=83=D1=80=D1=81=D0=B0,=20=D1=83?= =?UTF-8?q?=D1=80=D0=BE=D0=BA=D0=BE=D0=B2=20=D0=B8=20=D0=B8=D1=85=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=D0=B5=D0=BD=D1=82=20=D0=92=D0=B5=D1=80=D1=82?= =?UTF-8?q?=D0=B8=D0=BA=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=BE=D1=82?= =?UTF-8?q?=D1=81=D1=82=D1=83=D0=BF=D1=8B=20=D1=83=D0=BC=D0=B5=D0=BD=D1=8C?= =?UTF-8?q?=D1=88=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=B0=2010=20=D0=BF=D0=BA?= =?UTF-8?q?=D1=81=20=D0=9D=D0=B0=20=D0=B3=D0=BB=D0=B0=D0=B2=D0=BD=D0=BE?= =?UTF-8?q?=D0=B9=20=D0=B1=D0=BB=D0=BE=D0=BA=20=D1=81=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=D0=BC=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B8=D0=B6=D0=B5=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B0=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B5=D0=BF=D0=BE=D0=B4=D0=B0=D0=B2=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9=20=D0=9D=D0=B0=20=D0=B3=D0=BB=D0=B0=D0=B2?= =?UTF-8?q?=D0=BD=D0=BE=D0=B9=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=203?= =?UTF-8?q?=20=D0=BA=D1=83=D1=80=D1=81=D0=B0=20=D0=B8=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D0=B0=20=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/course/templates/course/_items.html | 2 +- apps/course/templates/course/course.html | 8 ++--- .../templates/course/course_only_lessons.html | 14 ++++----- apps/course/templates/course/lesson.html | 2 +- project/templates/blocks/last_courses.html | 5 ++-- .../templates/blocks/popup_course_lock.html | 2 +- project/templates/lilcity/main.html | 2 +- project/views.py | 2 +- web/src/components/CourseRedactor.vue | 15 +++++----- web/src/components/LessonRedactor.vue | 5 +++- web/src/components/redactor/VueRedactor.vue | 4 +-- web/src/sass/_common.sass | 29 ++++++++++--------- 12 files changed, 45 insertions(+), 45 deletions(-) diff --git a/apps/course/templates/course/_items.html b/apps/course/templates/course/_items.html index 42757ddc..d2db9c91 100644 --- a/apps/course/templates/course/_items.html +++ b/apps/course/templates/course/_items.html @@ -54,7 +54,7 @@ {% endif %} {{ course.title }} -
{{ course.short_description }} +
{{ course.short_description | safe | linebreaks }}
diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index 53a56abc..aee06faf 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -4,14 +4,14 @@ {% load rupluralize from plural %} {% block title %}{{ course.title }} - {{ block.super }}{% endblock title %} {% comment %} seo tags {% endcomment %} -{% block description %}{{ course.short_description }}{% endblock description%} +{% block description %}{{ course.short_description | striptags }}{% endblock description%} {% block twurl %}{{ request.build_absolute_uri }}{% endblock twurl %} {% block ogtitle %}{{ course.title }} - {{ block.super }}{% endblock ogtitle %} {% block ogurl %}{{ request.build_absolute_uri }}{% endblock ogurl %} {% if course.cover and course.cover.image %} {% block ogimage %}http://{{request.META.HTTP_HOST}}{% if course.cover %}{{ course.cover.image.url }}{% else %}{% static 'img/og_courses.jpg' %}{% endif %}{% endblock ogimage %} {% endif %} -{% block ogdescription %}{{ course.short_description }}{% endblock ogdescription %} +{% block ogdescription %}{{ course.short_description | striptags }}{% endblock ogdescription %} {% block content %}
{{ course.title }}
-
{{ course.short_description | linebreaks }}
+
{{ course.short_description | safe | linebreaks }}
{{ course.title }}
-
{{ course.short_description | linebreaks }}
+
{{ course.short_description | safe | linebreaks }}
{% if course.author.photo %} diff --git a/apps/course/templates/course/course_only_lessons.html b/apps/course/templates/course/course_only_lessons.html index 74a5bf47..59f323d8 100644 --- a/apps/course/templates/course/course_only_lessons.html +++ b/apps/course/templates/course/course_only_lessons.html @@ -4,14 +4,14 @@ {% load rupluralize from plural %} {% block title %}{{ course.title }} - {{ block.super }}{% endblock title %} {% comment %} seo tags {% endcomment %} -{% block description %}{{ course.short_description }}{% endblock description%} +{% block description %}{{ course.short_description | striptags }}{% endblock description%} {% block twurl %}{{ request.build_absolute_uri }}{% endblock twurl %} {% block ogtitle %}{{ course.title }} - {{ block.super }}{% endblock ogtitle %} {% block ogurl %}{{ request.build_absolute_uri }}{% endblock ogurl %} {% if course.cover %} {% block ogimage %}http://{{request.META.HTTP_HOST}}{% if course.cover %}{{ course.cover.image.url }}{% else %}{% static 'img/og_courses.jpg' %}{% endif %}{% endblock ogimage %} {% endif %} -{% block ogdescription %}{{ course.short_description }}{% endblock ogdescription %} +{% block ogdescription %}{{ course.short_description | striptags }}{% endblock ogdescription %} {% block content %}
{{ course.title }}
-
{{ course.short_description }}
+
{{ course.short_description | safe | linebreaks }}
diff --git a/apps/course/templates/course/lesson.html b/apps/course/templates/course/lesson.html index 90e511d5..78037edc 100644 --- a/apps/course/templates/course/lesson.html +++ b/apps/course/templates/course/lesson.html @@ -28,7 +28,7 @@
{{ lesson.title }}
-
{{ lesson.short_description }}
+
{{ lesson.short_description | safe | linebreaks }}
{% comment %} {% if lesson.cover %} diff --git a/project/templates/blocks/last_courses.html b/project/templates/blocks/last_courses.html index 0b080bb8..a84fed73 100644 --- a/project/templates/blocks/last_courses.html +++ b/project/templates/blocks/last_courses.html @@ -3,9 +3,8 @@
Видео-курсы без расписания
Если вам не совсем удобно заниматься с нами в прямом эфире каждый день как в нашей онлайн-школе, специально для вас мы - делаем отдельные уроки в записи, которые вы можете проходить когда вам будем удобно.
-
-
Учите и развивайте креативное мышление когда и где угодно
+ делаем отдельные уроки в записи, которые вы можете проходить когда вам будем удобно.

+ Учите и развивайте креативное мышление когда и где угодно
diff --git a/project/templates/lilcity/main.html b/project/templates/lilcity/main.html index 4227d9ec..06cc2758 100644 --- a/project/templates/lilcity/main.html +++ b/project/templates/lilcity/main.html @@ -9,7 +9,7 @@ {% include "templates/blocks/about.html" %} {% include "templates/blocks/last_courses.html" %} {% include "templates/blocks/gallery.html" %} - {% include "templates/blocks/game.html" %} {% include "templates/blocks/teachers.html" %} + {% include "templates/blocks/game.html" %} {% include "templates/blocks/partners.html" %} {% endblock content %} diff --git a/project/views.py b/project/views.py index c8400f14..37c50c82 100644 --- a/project/views.py +++ b/project/views.py @@ -74,7 +74,7 @@ class IndexView(TemplateView): 'online': online, 'online_coming_soon': online_coming_soon, 'school_schedule': school_schedule, - 'course_items': Course.objects.filter(status=Course.PUBLISHED)[:6], + 'course_items': Course.objects.filter(status=Course.PUBLISHED)[:3], 'is_purchased': school_payment_exists, 'min_school_price': SchoolSchedule.objects.aggregate(Min('month_price'))['month_price__min'], 'school_schedules': SchoolSchedule.objects.all(), diff --git a/web/src/components/CourseRedactor.vue b/web/src/components/CourseRedactor.vue index 28e10243..1e458f33 100644 --- a/web/src/components/CourseRedactor.vue +++ b/web/src/components/CourseRedactor.vue @@ -37,10 +37,8 @@ v-bind:class="{ error: ($v.course.short_description.$dirty || showErrors) && $v.course.short_description.$invalid }">
{{titles.shortDescription}}
- +
@@ -236,7 +234,7 @@
{{ lesson.title }}
-
{{ lesson.short_description | linebreaks }}
+
@@ -274,6 +272,7 @@ import BlockImages from './blocks/BlockImages' import BlockImageText from './blocks/BlockImageText' import BlockVideo from './blocks/BlockVideo' + import VueRedactor from './redactor/VueRedactor'; import LilSelect from "./inputs/LilSelect"; import LessonRedactor from "./LessonRedactor"; import {api} from "../js/modules/api"; @@ -1140,6 +1139,7 @@ 'block-video': BlockVideo, 'lesson-redactor': LessonRedactor, 'vue-draggable': Draggable, + 'vue-redactor': VueRedactor, } } @@ -1240,9 +1240,10 @@ overflow: scroll; } - .field_short_description { + .field_short_description .redactor-box { + overflow-x: visible; + overflow-y: auto; max-height: 200px; - overflow: scroll; } diff --git a/web/src/components/LessonRedactor.vue b/web/src/components/LessonRedactor.vue index a0a245e2..c233d29f 100644 --- a/web/src/components/LessonRedactor.vue +++ b/web/src/components/LessonRedactor.vue @@ -27,7 +27,8 @@
- +
@@ -88,6 +89,7 @@ import BlockImageText from './blocks/BlockImageText' import BlockVideo from './blocks/BlockVideo' import LilImage from "./blocks/Image" + import VueRedactor from './redactor/VueRedactor'; import {api} from "../js/modules/api"; import Draggable from 'vuedraggable'; import _ from 'lodash' @@ -134,6 +136,7 @@ 'block-video': BlockVideo, 'vue-draggable': Draggable, 'lil-image': LilImage, + 'vue-redactor': VueRedactor, } } diff --git a/web/src/components/redactor/VueRedactor.vue b/web/src/components/redactor/VueRedactor.vue index 6f1cebac..63bc4c44 100644 --- a/web/src/components/redactor/VueRedactor.vue +++ b/web/src/components/redactor/VueRedactor.vue @@ -7,7 +7,7 @@ import './redactor-full.js'; export default { - props: ['value', 'placeholder'], + props: ['value', 'placeholder', 'air', 'buttonsHide'], name: "vue-redactor", data() { return { @@ -18,7 +18,7 @@ const me = this; $(me.$refs.input).redactor({ air: true, - buttonsHide: ['image', 'link', 'format'], + buttonsHide: this.buttonsHide || ['image', 'format'], lang: 'ru', placeholder: this.placeholder, callbacks: { diff --git a/web/src/sass/_common.sass b/web/src/sass/_common.sass index f9cee7ff..6db2a88e 100755 --- a/web/src/sass/_common.sass +++ b/web/src/sass/_common.sass @@ -893,11 +893,11 @@ a[name] font-size: 20px .section - padding: 60px 0 + padding: 50px 0 +t - padding: 40px 0 - +m padding: 30px 0 + +m + padding: 20px 0 &_review background: url(../img/bg-elephants.jpg) 0 0 / 100px 102px &_gray @@ -2437,11 +2437,11 @@ a.grey-link .go display: flex - margin-bottom: 50px + margin-bottom: 40px justify-content: space-between align-items: center +t - margin-bottom: 30px + margin-bottom: 20px &__item display: flex max-width: calc(50% - 20px) @@ -2498,11 +2498,11 @@ a.grey-link fill: white .course - margin-bottom: 60px + margin-bottom: 50px &__head display: flex min-height: 40px - margin-bottom: 30px + margin-bottom: 20px align-items: center justify-content: space-between +t @@ -2512,9 +2512,9 @@ a.grey-link +t margin-bottom: 10px &__content - margin-bottom: 40px + margin-bottom: 30px +t - margin-bottom: 25px + margin-bottom: 15px &__about position: relative margin-bottom: 40px @@ -2544,9 +2544,9 @@ a.grey-link &:active color: rgba(white,.4) &__user - margin-bottom: 40px + margin-bottom: 30px +t - margin-bottom: 30px + margin-bottom: 20px &__info display: flex align-items: center @@ -2561,17 +2561,17 @@ a.grey-link margin: 20px 0 0 &__metas display: flex - margin-bottom: 45px + margin-bottom: 35px justify-content: space-between +m display: block - margin-bottom: 25px + margin-bottom: 15px &__metas &__meta +m margin-bottom: 20px &__actions display: flex - margin: 0 -10px 50px + margin: 0 -10px 40px &__action position: relative margin: 0 10px @@ -2639,6 +2639,7 @@ a.grey-link visibility: visible &__subtitle margin-bottom: 20px + text-transform: none &__row display: flex +m