commit
1b24ae1eb2
49 changed files with 832 additions and 442 deletions
@ -0,0 +1,19 @@ |
||||
# Generated by Django 2.0.3 on 2018-04-06 18:16 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('content', '0015_content_uuid'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='image', |
||||
name='img', |
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='content_images', to='content.ImageObject', verbose_name='Объект изображения'), |
||||
), |
||||
] |
||||
@ -0,0 +1,19 @@ |
||||
# Generated by Django 2.0.3 on 2018-04-06 18:47 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('content', '0016_auto_20180406_1816'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='imagetext', |
||||
name='img', |
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='content_imagetexts', to='content.ImageObject', verbose_name='Объект изображения'), |
||||
), |
||||
] |
||||
@ -1,8 +1,10 @@ |
||||
<div class="content-block title"> |
||||
<div class="section section_border"> |
||||
<div class="section__center center center_sm"> |
||||
<div class="content-block title"> |
||||
{{ content.title }} |
||||
</div> |
||||
<div class="gallery"> |
||||
<a href="{{ content.img.image.url }}"> |
||||
</div> |
||||
<div> |
||||
<img class="content-block pic" src="{{ content.img.image.url }}" alt=""> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
@ -1,11 +1,13 @@ |
||||
<div class="content-block title"> |
||||
{{ content.title }} |
||||
</div> |
||||
<div class="content-block text"> |
||||
{{ content.txt | safe }} |
||||
</div> |
||||
<div class="gallery"> |
||||
<a href="{{ content.img.image.url }}"> |
||||
<img class="content-block pic" src="{{ content.img.image.url }}" alt=""> |
||||
</a> |
||||
</div> |
||||
<div class="section section_border"> |
||||
<div class="section__center center center_sm"> |
||||
<div class="content-block title">{{ content.title }}</div> |
||||
|
||||
<div class="lessons__item"> |
||||
<div class="lessons__row"> |
||||
<div class="lessons__preview"><img class="lessons__pic" style="display: block;border-radius:50%;width:130px;height: 130px" src="{{ content.img.image.url }}"></div> |
||||
<div class="lessons__content">{{ content.txt | safe }}</div> |
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
@ -1,6 +1,10 @@ |
||||
<div class="content-block title"> |
||||
{{ content.title }} |
||||
<div class="section section_border"> |
||||
<div class="section__center center center_sm"> |
||||
<div class="content-block title"> |
||||
{{ content.title }} |
||||
</div> |
||||
<div class="content-block text" style="margin-bottom:0"> |
||||
{{ content.txt | safe }} |
||||
</div> |
||||
<div class="content-block text"> |
||||
{{ content.txt | safe }} |
||||
</div> |
||||
</div> |
||||
@ -1,13 +1,19 @@ |
||||
{% extends "templates/lilcity/edit_index.html" %} |
||||
{% load static %} |
||||
{% block title %}{% if course %}Редактирование курса {{ course.title }}{% else %}Создание курса{% endif %}{% endblock title%} |
||||
{% block title %} |
||||
{% if course %} |
||||
Редактирование {% if not live %}курса{% else %}стрима{% endif %} {{ course.title }} |
||||
{% else %} |
||||
Создание {% if not live %}курса{% else %}стрима{% endif %} |
||||
{% endif %} |
||||
{% endblock title%} |
||||
{% block content %} |
||||
<course-redactor author-picture="{% if request.user.photo %}{{ request.user.photo.url }}{% else %}{% static 'img/user.jpg' %}{% endif %}" |
||||
<course-redactor :live="{{ live }}" author-picture="{% if request.user.photo %}{{ request.user.photo.url }}{% else %}{% static 'img/user.jpg' %}{% endif %}" |
||||
author-name="{{ request.user.first_name }} {{ request.user.last_name }}" |
||||
access-token="{{ request.user.auth_token }}" |
||||
{% if course and course.id %}:course-id="{{ course.id }}"{% endif %}></course-redactor> |
||||
{% endblock content %} |
||||
{% block foot %} |
||||
<script type="text/javascript" src={% static "courseRedactor.js" %}></script> |
||||
<link rel="stylesheet" href={% static "courseRedactor.css" %}/> |
||||
<script type="text/javascript" src="{% static 'courseRedactor.js' %}"></script> |
||||
<link rel="stylesheet" href="{% static 'courseRedactor.css' %}" /> |
||||
{% endblock foot %} |
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 597 B |
@ -0,0 +1,14 @@ |
||||
import $ from 'jquery'; |
||||
import '../../sass/components/notification.scss'; |
||||
|
||||
export function showNotification(style, text) { |
||||
let htmlNode = document.createElement('div'); |
||||
let htmlElement = $(htmlNode).addClass('notification').addClass(`notification--${style}`).text(text).appendTo($('body')); |
||||
|
||||
setTimeout(() => { |
||||
htmlElement.fadeOut(400, () => { |
||||
htmlElement.remove(); |
||||
}) |
||||
}, 3500); |
||||
} |
||||
|
||||
@ -0,0 +1,33 @@ |
||||
.notification { |
||||
min-width: 380px; |
||||
box-sizing: border-box; |
||||
border-radius: 4px; |
||||
border-width: 1px; |
||||
border-style: solid; |
||||
border-color: #ebeef5; |
||||
position: fixed; |
||||
left: 50%; |
||||
top: 20px; |
||||
transform: translateX(-50%); |
||||
background-color: #edf2fc; |
||||
transition: opacity 0.3s, transform .4s; |
||||
overflow: hidden; |
||||
padding: 15px 15px 15px 20px; |
||||
display: flex; |
||||
align-items: center; |
||||
z-index: 1000; |
||||
|
||||
&--success { |
||||
background: #53CF86; |
||||
color: #fff; |
||||
border: none; |
||||
box-shadow: 0 4px 15px rgba(0, 196, 83, 0.31); |
||||
} |
||||
|
||||
&--error { |
||||
background: #D12424; |
||||
color: #fff; |
||||
border: none; |
||||
box-shadow: 0 4px 15px rgba(255, 36, 36, 0.51); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue