Merge branch 'features/course-search-16-08-19' into 'master'

Features/course search 16 08 19

See merge request lilschool/site!377
remotes/origin/hotfix/bonuses-text
Danil 6 years ago
commit 34e8c01c36
  1. 2
      apps/content/models.py
  2. 10
      apps/course/templates/course/course.html
  3. 8
      apps/course/templates/course/course_only_lessons.html
  4. 2
      apps/course/templates/course/courses.html
  5. 5
      apps/course/views.py
  6. 2
      project/templates/blocks/about.html
  7. 1
      project/templates/blocks/footer.html
  8. 4
      project/templates/blocks/header.html
  9. 6
      project/templates/blocks/online_school.html
  10. 11
      web/src/sass/_common.sass

@ -184,7 +184,7 @@ class Banner(models.Model):
def is_video_url(self):
return self.url and ('vimeo.com' in self.url
or 'youtube.com' in self.url and 'watch' in self.url
or 'youto.be' in self.url)
or 'youtu.be' in self.url)
class Contest(models.Model):

@ -166,25 +166,25 @@
</div>
</div>
<div class="course__actions">
<a href="{{ course.url }}" class="course__action btn btn_lg{% if not only_lessons %} btn_stroke{% else %} btn_gray{% endif %}">Описание курса</a>
<a href="{{ course.url }}" class="course__action btn btn_lg{% if not only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}">Описание курса</a>
{% if request.user.is_authenticated %}
{% if course.author == request.user and request.user.role >= request.user.AUTHOR_ROLE %}
<a
href="{% url 'course-only-lessons' course.id %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}"
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %}
>УРОКИ
</a>
{% elif request.user.role == request.user.ADMIN_ROLE %}
<a
href="{% url 'course-only-lessons' course.id %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}"
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %}
>УРОКИ
</a>
{% else %}
<a
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}"
{% if paid or not course.price %}
href="{% url 'course-only-lessons' course.id %}"
{% else %}
@ -203,7 +203,7 @@
{% endif %}
{% else %}
<a
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}"
data-popup=".js-popup-auth">УРОКИ
<svg class="icon icon-lock">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-lock"></use>

@ -150,25 +150,25 @@
</div>
</div>
<div class="course__actions">
<a href="{{ course.url }}" class="course__action btn btn_lg{% if not only_lessons %} btn_stroke{% else %} btn_gray{% endif %}">Описание курса</a>
<a href="{{ course.url }}" class="course__action btn btn_lg{% if not only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}">Описание курса</a>
{% if course.author == request.user and request.user.role >= request.user.AUTHOR_ROLE %}
<a
href="{% url 'course-only-lessons' course.id %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}"
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %}
>УРОКИ
</a>
{% elif request.user.role == request.user.ADMIN_ROLE %}
<a
href="{% url 'course-only-lessons' course.id %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}"
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %}
>УРОКИ
</a>
{% else %}
<a
href="{% if paid or not course.price %}{% url 'course-only-lessons' course.id %}{% else %}#{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}"
class="course__action btn btn_lg{% if only_lessons %} btn_stroke-green{% else %} btn_gray{% endif %}"
>УРОКИ
{% if not paid and course.price %}
<svg class="icon icon-lock">

@ -20,7 +20,7 @@
{% endif %}
<input type="hidden" name="age" value="{{ age.0|default:'' }}" />
<input name="q" class="course-search__query" type="text" value="{{ search_query|default:'' }}" />
<button class="btn course-search__search" type="submit">
<button class="btn course-search__search" type="submit" style="border-radius: 20px;">
<svg class="icon icon-search">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-search"></use>
</svg>

@ -230,7 +230,6 @@ class CourseView(DetailView):
except queryset.model.DoesNotExist:
raise Http404(_("No %(verbose_name)s found matching the query") %
{'verbose_name': queryset.model._meta.verbose_name})
obj.cover = None
return obj
def get_context_data(self, **kwargs):
@ -360,10 +359,6 @@ class CoursesView(ListView):
for course in context['course_items']:
if course.id in can_buy_again_courses:
course.buy_again_price = course.price / 2
for course in context['course_items']:
course.cover = None
for course in context['new_courses']:
course.cover = None
return context
def get_template_names(self):

@ -10,7 +10,7 @@
<p>Вы житель мегаполиса и&nbsp;у&nbsp;вас нет времени дополнительно развивать своего ребенка?
Или&nbsp;вы&nbsp;живете в&nbsp;маленьком городе,
где&nbsp;нет&nbsp;качественных школ и&nbsp;секций для&nbsp;детей?</p>
<p><b>Lil-School</b>&nbsp;это решение для&nbsp;тех&nbsp;родителей, кто&nbsp;стремится дать лучшее своему ребенку.
<p><b>Lil School</b> -&nbsp;это решение для&nbsp;тех&nbsp;родителей, кто&nbsp;стремится дать лучшее своему ребенку.
Учитесь, не&nbsp;выходя из&nbsp;дома!</p>
</div>
<div class="section__buttons">

@ -24,6 +24,7 @@
<!-- <a class="footer__link" href="{% url 'school:school' %}">Онлайн-школа</a> -->
<a class="footer__link" href="{% url 'school:drawing-camp' %}">Рисовальный лагерь</a>
<a class="footer__link" href="{% url 'courses' %}">Видео-курсы</a>
<a class="footer__link" href="{% url 'gift-certificates' %}">Сертификаты</a>
<a class="footer__link" href="https://blog.lil.school">Блог</a>
</div>
<div>

@ -64,10 +64,6 @@
<div class="header__group">
<a class="header__section" href="https://blog.lil.school">БЛОГ</a>
</div>
<div class="header__group">
<a class="header__section {% active_link 'gift-certificates' %}"
href="{% url 'gift-certificates' %}">СЕРТИФИКАТЫ</a>
</div>
</nav>
</div>
{% include 'templates/blocks/user_menu.html' %}

@ -5,15 +5,15 @@
<div class="school school_main school_three-col">
<div class="school__col">
<div class="school__preview">Видеоуроки</div>
<div class="school__text">Каждый день!</div>
<div class="school__text">каждый день!</div>
</div>
<div class="school__col">
<div class="school__preview">5 дисциплин</div>
<div class="school__text">В разных техниках</div>
<div class="school__text">в разных техниках</div>
</div>
<div class="school__col">
<div class="school__preview">Запись эфира</div>
<div class="school__text">Хранится 7 дней</div>
<div class="school__text">хранится 7 дней</div>
</div>
</div>
<div style="margin: 50px 0px 15px; text-align: center;">

@ -217,6 +217,9 @@ button
background: none
border: 1px solid $cl
color: $cl
&_stroke-green
border: solid 1px #7ed321
background: none
&_pink-blue
background-image: linear-gradient(100deg, #8febff, #ffa2cb)
&_disabled
@ -443,8 +446,8 @@ a.btn
visibility: visible
&__section
display: block
height: 100px
margin: 0 15px
height: 90px
margin: -10px 15px 0
border-bottom: 1px solid transparent
+fb
font-size: 12px
@ -4650,7 +4653,7 @@ a
height: 260px
flex-direction: column
&__text
font-size: 30px
font-size: 28px
text-shadow: none
color: black
+t
@ -4664,7 +4667,7 @@ a
text-shadow: none
background: white
padding: 12px 22px
border-radius: 25px
border-radius: 10px
border: 1px solid #ddd
text-align: center
margin-top: 50px

Loading…
Cancel
Save