новая главная и мобильная версия

remotes/origin/feature/new-main-page
gzbender 7 years ago
parent b4bf0fb302
commit f0d8d9c213
  1. 3
      apps/user/admin.py
  2. 2
      project/templates/blocks/about.html
  3. 2
      project/templates/blocks/counters.html
  4. 2
      project/templates/blocks/online_school.html
  5. 2
      project/templates/blocks/partners.html
  6. 2
      project/templates/blocks/reviews.html
  7. 2
      project/templates/blocks/students.html
  8. 37
      project/templates/blocks/teachers.html
  9. 2
      project/templates/blocks/video.html
  10. 3
      project/templates/lilcity/home.html
  11. 2
      project/templates/lilcity/layer.html
  12. 5
      project/views.py
  13. 21
      web/src/sass/_common.sass

@ -12,7 +12,8 @@ User = get_user_model()
class UserAdmin(BaseUserAdmin):
fieldsets = (
(None, {'fields': ('username', 'password')}),
(_('Personal info'), {'fields': ('first_name', 'last_name', 'email', 'gender', 'about', 'photo')}),
(_('Personal info'), {'fields': ('first_name', 'last_name', 'email', 'gender', 'about', 'photo',)}),
('Teacher', {'fields': ('show_in_mainpage', 'trial_lesson', 'instagram_hashtag',)}),
('Facebook Auth data', {'fields': ('fb_id', 'fb_data', 'is_email_proved')}),
(_('Permissions'), {'fields': ('role', 'is_active', 'is_staff', 'is_superuser',
'groups', 'user_permissions', 'show_in_mainpage')}),

@ -1,5 +1,5 @@
<div class="anchor" id="about"></div>
<div class="section section_flex section_about">
<div class="section section_main section_flex section_about">
<div class="section__center center">
<div class="section__column section__column_img">
</div>

@ -1,7 +1,7 @@
{% load static %}
{% load ruplural from plural %}
<div class="section section_gray section_counters">
<div class="section section_main section_gray section_counters">
<div class="section__center center">
<div class="text text_only_curve">
<img class="text__curve text__curve_six" src="{% static 'img/curve-2.svg' %}" width="210">

@ -1,4 +1,4 @@
<div class="section section_school">
<div class="section section_main section_school">
<div class="section__center center">
<div class="title title_center">Процесс</div>
<div class="school school_main school_three-col">

@ -1,5 +1,5 @@
{% load static %}
<div class="section section_partners" id="partners">
<div class="section section_main section_partners" id="partners">
<div class="section__center center">
<a name="partners">
<div class="title title_center">Наши партнеры</div>

@ -1,5 +1,5 @@
{% load static %}
<div class="section reviews-section">
<div class="section section_main reviews-section">
<div class="reviews-section__center section__center center center_md">
<div class="reviews-section__title">
<a id="reviews" name="reviews">

@ -1,5 +1,5 @@
<div class="anchor" id="students"></div>
<div class="section section_flex section_students">
<div class="section section_main section_flex section_students">
<div class="section__center center">
<div class="section__column section__column_text">
<div class="title">Наши ученики – многократные призеры международных конкурсов</div>

@ -1,6 +1,6 @@
{% load static %}
<div id="teachers" class="anchor"></div>
<div class="section section_flex">
<div class="section section_main section_flex">
<div class="section__center center">
<div class="section__column section__column_text">
<div class="title">Преподаватели</div>
@ -65,15 +65,10 @@
</div>
<div class="teachers__right-column">
<div class="teachers__title">
<div class="teachers__title-name">
<a href="{{ teacher.url }}">{{ teacher.get_full_name }}</a>{% if teacher.instagram_hashtag %},
<a href='https://www.instagram.com/explore/tags/{{ teacher.instagram_hashtag }}/' target="_blank">
{{ teacher.instagram_hashtag }}
</a>
{% endif %}
</div>
{% if teacher.trial_lesson %}
<a data-video-url="{{ teacher.trial_lesson }}" data-trial-lesson="1" href="#" class="btn btn_light js-video-modal">ПРОБНЫЙ УРОК</a>
<a href="{{ teacher.url }}" style="color: black;">{{ teacher.get_full_name }}</a>{% if teacher.instagram_hashtag %}<br>
<a href='https://www.instagram.com/explore/tags/{{ teacher.instagram_hashtag }}/' target="_blank">
#{{ teacher.instagram_hashtag }}
</a>
{% endif %}
</div>
{% if teacher.about %}
@ -81,16 +76,32 @@
{{ teacher.about }}
</div>
{% endif %}
{% if teacher.trial_lesson %}
<a data-video-url="{{ teacher.trial_lesson }}" data-trial-lesson="1" href="#" class="btn btn_light js-video-modal">ПРОБНЫЙ УРОК</a>
{% endif %}
</div>
</div>
{% cycle '' '</div>' %}
{% if forloop.last and not forloop.counter|divisibleby:'2' %}
<div class="teachers__item">
<div class="teachers__left-column">
<div class="teachers__ava ava">
<img class="ava__pic" src="{% static 'img/user_default.jpg' %}">
</div>
</div>
<div class="teachers__right-column">
<div class="teachers__title">
Хотите в команду Lil School?
</div>
<div class="teachers__content">
Любите развивать детей, развиваться сами и хотите зарабатывать на любимом деле?<br><br>
<a href="{% url 'author_request' %}">Оставьте заявку</a>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="section__center center">
<div class="text text_mb0 text_left">Если хотите к нам в команду, то <a href="{% url 'author_request' %}">отправьте</a> нам заявку</div>
</div>
</div>

@ -1,4 +1,4 @@
<div class="section section_gray section_flex section_video">
<div class="section section_main section_gray section_flex section_video">
<div class="section__center center">
<div class="section__column section__column_text">
<div class="title">Попробуйте бесплатно</div>

@ -10,7 +10,8 @@
{% endif %}
{% endblock ogdescription %}
{% block title %}School LIL.CITY{% endblock title %}
{% block title %}Lil School{% endblock title %}
{% block body_attr %}class="main-page"{% endblock body_attr %}
{% block content %}
{% include "templates/blocks/messages.html" %}
{% include "templates/blocks/about.html" %}

@ -108,7 +108,7 @@
{% include "templates/blocks/mixpanel.html" %}
{% block layer_head %}{% endblock layer_head %}
</head>
<body>
<body {% block body_attr %}{% endblock body_attr %}>
{% block layer_body %}
{% endblock layer_body %}
</body>

@ -98,6 +98,9 @@ class IndexView(TemplateView):
review_images = list(map(str, range(1, 107)))
shuffle(review_images)
teachers = User.objects.filter(role=User.TEACHER_ROLE, show_in_mainpage=True)
if teachers.count() % 2 == 0:
teachers = teachers[:teachers.count() - 1]
context.update({
'banners': Banner.get_for_page(Banner.PAGE_INDEX),
@ -117,7 +120,7 @@ class IndexView(TemplateView):
'min_school_price': SchoolSchedule.objects.aggregate(Min('month_price'))['month_price__min'],
'school_schedules': SchoolSchedule.objects.filter(weekday__in=DrawingCampPayment.WEEKDAYS, is_camp=True),
'school_schedules_purchased': DrawingCampPayment.WEEKDAYS if camp_payment_exists else [],
'teachers': User.objects.filter(role=User.TEACHER_ROLE, show_in_mainpage=True),
'teachers': teachers,
'works_count': Payment.objects.filter(status__in=Payment.PW_PAID_STATUSES).count() * 7,
'subscription_ends': camp_payment.latest('date_end').date_end if camp_payment_exists else None,
'subscription_ends_humanize': camp_payment.latest('date_end').date_end_humanize if camp_payment_exists else None,

@ -996,6 +996,8 @@ a[name]
border-radius: 10px
box-shadow: 0 11px 20px 0 rgba(0, 0, 0, 0.1)
&_main
padding: 80px 0
&_gray
background: $bg
&_pink-light
@ -1718,21 +1720,14 @@ a.grey-link
height: 80px
&__title
margin-bottom: 5px
font-family: 'ProximaNova-Regular', sans-serif
font-size: 20px
letter-spacing: 2px
+fb
font-size: 20px
letter-spacing: 2px
font-family: 'ProximaNova-Regular', sans-serif
letter-spacing: normal
flex: 1
+t
font-size: 12px
letter-spacing: 2px
+m
display: block
&-name
flex: 1
& .btn
margin: 10px 0
&__social
margin-top: 15px
.social__item
@ -1740,10 +1735,12 @@ a.grey-link
font-size: 20px
+fb
&__content
font-size: 15px
font-size: 14px
line-height: (22/16)
&__right-column
flex: 1
& .btn
margin-top: 10px
.toggle
font-size: 14px
@ -1995,7 +1992,7 @@ a.grey-link
flex-wrap: wrap
&__item
margin: 0 10px 20px
flex: 0 0 calc(16.66% - 20px)
flex: 0 0 calc(20% - 20px)
text-align: center
height: 160px
+m

Loading…
Cancel
Save