diff --git a/apps/content/templates/content/blocks/video.html b/apps/content/templates/content/blocks/video.html index fc4bd60c..16b13a4b 100644 --- a/apps/content/templates/content/blocks/video.html +++ b/apps/content/templates/content/blocks/video.html @@ -5,10 +5,12 @@
{% if content.is_youtube_video %} - {% elif content.is_vimeo_video %} - {% endif %} diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index fb9c351f..79bab74d 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -394,4 +394,5 @@ {% block foot %} {% include "templates/blocks/popup_course_buy.html" %} + {% endblock foot %} diff --git a/web/src/img/heart.png b/web/src/img/heart.png new file mode 100644 index 00000000..2cfccaed Binary files /dev/null and b/web/src/img/heart.png differ diff --git a/web/src/js/modules/content.js b/web/src/js/modules/content.js index 55997833..3724e6b5 100644 --- a/web/src/js/modules/content.js +++ b/web/src/js/modules/content.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import {loadScript} from '../utils'; -import api from '../modules/api'; +import {api} from '../modules/api'; function getVideoPopup($videoEl){ const $container = $videoEl.parent(); @@ -9,12 +9,13 @@ function getVideoPopup($videoEl){ if(! $popup[0]){ $popup = $('
'); if(courseId){ - $popup.addClass('video-ended-popup_like') + $popup.addClass('video-ended-popup_black'); + /* $popup.find('.video-ended-popup__like-btn').click(() => { api.likeCourse(courseId).then(() => { $popup.addClass('video-ended-popup_black'); }); - }); + });*/ } $container.append($popup); @@ -42,7 +43,7 @@ $(document).ready(function () { player.on('play', function() { const $p = getVideoPopup($iframe) if($p.is(':visible')){ - $p.animate({opacity: 0}, 500).then(() => {$p.hide();}); + $p.animate({opacity: 0}, 800).then(() => {$p.hide();}); } }); } diff --git a/web/src/js/pages/course.js b/web/src/js/pages/course.js new file mode 100644 index 00000000..525f893c --- /dev/null +++ b/web/src/js/pages/course.js @@ -0,0 +1 @@ +import "../modules/content"; diff --git a/web/src/sass/_common.sass b/web/src/sass/_common.sass index 7a91d142..05f69589 100755 --- a/web/src/sass/_common.sass +++ b/web/src/sass/_common.sass @@ -4358,11 +4358,13 @@ a &.pic position: relative width: 100% + &__video + position: relative &__video iframe - height: 360px; - width: 640px; - max-width: 100%; - max-height: 60%; + height: 360px + width: 640px + max-width: 100% + max-height: 60% @media only screen and (max-width: 639px) .content-block__video iframe @@ -4775,7 +4777,7 @@ a .video-ended-popup display: none position: absolute - top: 100px + top: 90px height: 200px background: url(../img/video-ended-popup-ref.jpg) no-repeat center white left: 60px @@ -4789,13 +4791,18 @@ a background-image: url(../img/video-ended-popup-like.jpg) &_black - background: url(../img/video-ended-popup-logo.png) no-repeat center black + background: url(../img/video-ended-popup-logo.png) no-repeat center #151a1e &__like-btn + background: url(../img/heart.png) no-repeat center position: absolute - top: 100px - margin: 0 auto + top: 90px display: none + width: 91px + height: 52px + cursor: pointer + left: 50% + margin-left: -45px &_like &__like-btn display: block diff --git a/web/webpack.config.js b/web/webpack.config.js index bde23572..498b4e3a 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -9,6 +9,7 @@ const SpriteLoaderPlugin = require('svg-sprite-loader/plugin'); module.exports = { entry: { app: "./src/js/app.js", + course: "./src/js/pages/course.js", courseEdit: "./src/js/pages/course-edit.js", contest: "./src/js/pages/contest.js", contestEdit: "./src/js/pages/contest-edit.js",