вкладка бесплатных уроков See merge request lilschool/site!351remotes/origin/hotfix/baner-save-25-07-19
commit
41793c541b
13 changed files with 204 additions and 13 deletions
@ -0,0 +1,23 @@ |
||||
# Generated by Django 2.0.7 on 2019-07-16 20:40 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('config', '0014_auto_20190605_1338'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='config', |
||||
name='FREE_LESSONS_VIDEO_PREVIEW_IMG', |
||||
field=models.ImageField(blank=True, null=True, upload_to=''), |
||||
), |
||||
migrations.AddField( |
||||
model_name='config', |
||||
name='FREE_LESSONS_VIDEO_URL', |
||||
field=models.URLField(blank=True, default='', max_length=126), |
||||
), |
||||
] |
||||
@ -0,0 +1,89 @@ |
||||
{% extends "templates/lilcity/index.html" %} {% load static %} |
||||
{% block title %}Месяц открытых дверей в LilCity{% endblock title%} |
||||
{% block ogimage %}http://{{request.META.HTTP_HOST}}{% static 'img/og_camp.jpg' %}{% endblock %} |
||||
{% block ogsite-name %}Первая образовательная онлайн-платформа креативного мышления для детей{% endblock ogsite-name %} |
||||
|
||||
{% block content %} |
||||
<div class="main main_default" style="background-image: url({% static 'img/bg-2.jpg' %}); padding-top: 150px; min-height: 300px;"> |
||||
<div class="main__center center"> |
||||
<div class="main__title"> |
||||
<span class="main__bold">Месяц открытых дверей!</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="section section_video"> |
||||
<div class="section__center center center_sm" style="text-align: center;"> |
||||
<img class="main-video-preview js-video-modal" data-video-url="{{ config.FREE_LESSONS_VIDEO_URL|safe }}" data-trial-lesson="1" |
||||
src="{% if config.FREE_LESSONS_VIDEO_PREVIEW_IMG %}{{ config.FREE_LESSONS_VIDEO_PREVIEW_IMG.url }}{% endif %}"/> |
||||
<div style="margin-top: 15px;">Приглашай друзей и получай лилики. |
||||
<a href="#" class="btn btn_stroke-black" |
||||
{% if not user.is_authenticated %} |
||||
data-popup=".js-popup-auth" |
||||
data-auth-next-url="{% url 'user-bonuses' %}" |
||||
{% else %} |
||||
data-popup=".js-popup-ref-link" |
||||
{% endif %} |
||||
>Пригласить</a></div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="section section_school"> |
||||
<div class="section__center center"> |
||||
<div class="title title_center">Бесплатно в кругосветку с Lil School!</div> |
||||
<div class="text text_lg text_left"> |
||||
<p>Друзья, в августе мы приглашаем вас в путешествие!<br> |
||||
В тур под названием «Кругосветка с Lil School» по программе «всё включено».</p> |
||||
|
||||
<p>Творчество, креатив и потрясающие идеи!<br> |
||||
В августе 4 раза в неделю наши преподаватели БЕСПЛАТНО приглашают вас посетить одну из стран нашего многообразного Мира!</p> |
||||
|
||||
<p>Когда?<br> |
||||
Со 2 по 19 августа.</p> |
||||
|
||||
<p>Где?<br> |
||||
Здесь на этой странице будут уроки.</p> |
||||
|
||||
<p>Стоимость?<br> |
||||
БЕСПЛАТНО!</p> |
||||
|
||||
<p>Это всё?<br> |
||||
Конечно, НЕТ!<br> |
||||
Мы и наши партнёры приготовили для вас призы! После каждого занятия наши друзья - спонсоры будут выбирать одну работу урока и дарить автору подарок!<br> |
||||
А мы? А мы в конце месяца подарим... та - та - та - там! iPad!</p> |
||||
|
||||
<p>Что делать?<br> |
||||
Регистрируйтесь на платформе, если не делали этого ранее. Готовьте материалы, хорошее настроение, устройство с доступом в Интернет и занимайтесь в своё удовольствие. |
||||
Выкладывайте работы у себя в аккаунте, в конце августа мы разыграем iPad!</p> |
||||
|
||||
<p>Ну что, кто с нами в кругосветку?</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
{% block foot %} |
||||
{% include "templates/blocks/popup_ref_link.html" %} |
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script> |
||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script> |
||||
<script type="text/javascript"> |
||||
$(document).ready(function () { |
||||
$(document).on('popup-opened', (e, popup) => { |
||||
$('#referrer-url').select(); |
||||
}); |
||||
$('#referrer-url').click(function(){ |
||||
$(this).select(); |
||||
}); |
||||
const clipboard = new ClipboardJS('#copy-referrer-url-btn'); |
||||
clipboard.on('success', e => { |
||||
console.log(123); |
||||
//showNotification('success', 'Ссылка скопирована'); |
||||
}); |
||||
clipboard.on('error', function(e) { |
||||
console.error('Action:', e.action); |
||||
console.error('Trigger:', e.trigger); |
||||
}); |
||||
}); |
||||
</script> |
||||
<!--<script type="text/javascript" src="{% static 'freeLessons.js' %}"></script>--> |
||||
{% endblock foot %} |
||||
@ -0,0 +1,27 @@ |
||||
{% load static %} |
||||
<div class="popup js-popup-ref-link"> |
||||
<div class="popup__wrap popup__wrap_sm js-popup-wrap"> |
||||
<button class="popup__close js-popup-close"> |
||||
<svg class="icon icon-close"> |
||||
<use xlink:href="{% static 'img/sprite.svg' %}#icon-close"></use> |
||||
</svg> |
||||
</button> |
||||
<div class="popup__body"> |
||||
<div class="referrer-url" style="padding: 30px; flex-direction: column;"> |
||||
<div class="referrer-url__text-column"> |
||||
<div class="referrer-url__title">Приглашайте друзей в Lil School</div> |
||||
<div class="referrer-url__text"> |
||||
Получайте {{ config.REFERRER_BONUS }}% от суммы их первой покупки. |
||||
<br> |
||||
Просто отправьте эту ссылку, по которой ваши друзья могут присоединиться к нам: |
||||
</div> |
||||
</div> |
||||
<div class="referrer-url__url-column" style="margin-top: 20px;"> |
||||
<input id="referrer-url" class="referrer-url__input field__input" type="text" value="{{ request.user.ref_url }}" readonly="readonly"> |
||||
<!--<button id="copy-referrer-url-btn" class="referrer-url__btn go__btn btn" data-clipboard-target="#referrer-url">Копировать ссылку</button>--> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
@ -0,0 +1,16 @@ |
||||
import $ from 'jquery'; |
||||
import ClipboardJS from 'clipboard'; |
||||
import {showNotification} from '../modules/notification'; |
||||
|
||||
$(document).ready(function () { |
||||
$(document).on('popup-opened', (e, popup) => { |
||||
$('#referrer-url').select(); |
||||
}); |
||||
const clipboard = new ClipboardJS('#copy-referrer-url-btn'); |
||||
clipboard.on('success', e => { |
||||
showNotification('success', 'Ссылка скопирована'); |
||||
}); |
||||
$('#referrer-url').click(function(){ |
||||
$(this).select(); |
||||
}); |
||||
}); |
||||
Loading…
Reference in new issue