diff --git a/forms/login.py b/forms/login.py
index 2d168dc..2ecd8b9 100644
--- a/forms/login.py
+++ b/forms/login.py
@@ -4,7 +4,7 @@ from wtforms.validators import DataRequired
class LoginForm(FlaskForm):
- email = EmailField('Почта', validators=[DataRequired()])
+ login = EmailField('Почта', validators=[DataRequired()])
password = PasswordField('Пароль', validators=[DataRequired()])
remember_me = BooleanField('Запомнить меня')
submit = SubmitField('Войти')
\ No newline at end of file
diff --git a/main.py b/main.py
index 869e31b..a35329a 100644
--- a/main.py
+++ b/main.py
@@ -35,11 +35,11 @@ def load_user(user_id):
def login():
if not current_user.is_authenticated:
message = request.args.get('message') if request.args.get('message') else ''
- email_repeat = request.args.get('email_repeat') if request.args.get('email_repeat') else False
+ danger = request.args.get('danger') if request.args.get('danger') else False
form = LoginForm()
if form.validate_on_submit():
db_sess = db_session.create_session()
- user = db_sess.query(User).filter(User.email == form.email.data).first()
+ user = db_sess.query(User).filter(User.email == form.login.data).first()
if user and user.check_password(form.password.data):
if user.activated:
login_user(user, remember=form.remember_me.data)
@@ -47,11 +47,14 @@ def login():
else:
return render_template('login.html',
message="Ваша почта не подтверждена",
+ danger=True,
form=form)
return render_template('login.html',
message="Неправильный логин или пароль",
+ danger=True,
form=form)
- return render_template('login.html', title='Авторизация', form=form, message=message, email_repeat=email_repeat)
+ return render_template('login.html', title='Авторизация', form=form, message=message,
+ danger=danger)
else:
return redirect('/')
@@ -109,7 +112,7 @@ def confirmation(token):
data_session.close()
return redirect('/login?message=Почта успешно подтверждена')
else:
- return redirect('/login?message=Пользователь не найден')
+ return redirect('/login?message=Пользователь не найден&danger=True')
except SignatureExpired:
data_session = db_session.create_session()
users = data_session.query(User).filter(
@@ -118,7 +121,7 @@ def confirmation(token):
list(map(lambda x: data_session.delete(x), users))
data_session.commit()
data_session.close()
- return redirect('/login?message=Срок действия ссылки истек, данные удалены')
+ return redirect('/login?message=Срок действия ссылки истек, данные удалены&danger=True')
def main():
diff --git a/static/css/base.css b/static/css/base.css
index b3bdc56..4f77715 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -8,6 +8,7 @@ body {
.navbar {
background-color: #dcb495;
display: inline-flex;
+ height: 8vw;
}
.auth_button {
color: #ffffff;
@@ -18,4 +19,27 @@ body {
font-size: 1.55vw;
color: #ffffff;
text-shadow: 0px 0px 20px #ffffff;
+}
+
+.footer {
+ background-color: #171717;
+ height: 15vw;
+}
+.footer_block {
+ height: 100%;
+ width: 90%;
+ margin-left: 5%;
+ display: flex;
+ align-content: center;
+ align-items: center;
+}
+.footer_logo {
+ width: 7vw;
+ height: 7vw;
+}
+.footer_rights {
+ color: #ffffff;
+ font-size: 1.5vw;
+ width: 85%;
+ text-align: center;
}
\ No newline at end of file
diff --git a/static/css/login.css b/static/css/login.css
index 42cc7ac..3d37ad6 100644
--- a/static/css/login.css
+++ b/static/css/login.css
@@ -66,4 +66,16 @@ body {
width: 100%;
height: 100%;
text-align: center;
+}
+.message_block {
+ width: 100%;
+ display: inline-flex;
+ justify-content: center;
+}
+.message {
+ margin-top: 7px;
+ height: 50px !important;
+ border-radius: 22px !important;
+ width: 50%;
+ text-align: center;
}
\ No newline at end of file
diff --git a/static/css/main.css b/static/css/main.css
index 4ba80a4..3268e3c 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -1,28 +1,29 @@
+main, html {
+ background-color: #dcb495;
+}
.header_block {
- background-image: url(../images/back_main_one.jpg);
- background-repeat: no-repeat;
width: 100%;
- height: 50%;
+ height: 75vw;
background-position: center;
display: flex;
justify-content: center;
- align-items: center;
flex-direction: column;
+ background: linear-gradient( rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85) ), url(../images/back_main_one.jpg);background-repeat: repeat; background-position: center;
}
.header_title {
+ margin-left: 10%;
color: #ffffff;
- -webkit-text-stroke: 1px rgba(0, 0, 0, 0.486);
font: bold;
- font-size: 3.5vw;
+ font-size: 4vw;
transition: font-size 0.5s ease-in, text-shadow 1s ease-in;
}
.header_title:hover {
- font-size: 3.55vw;
+ font-size: 4.05vw;
text-shadow: 0px 0px 20px #ffffff;
}
.header_title_2 {
- color: #ffffff;
- -webkit-text-stroke: 1px rgba(0, 0, 0, 0.486);
+ margin-left: 10%;
+ color: #afafaf;
font: bold;
font-size: 2vw;
transition: font-size 0.5s ease-in, text-shadow 1s ease-in;
@@ -30,4 +31,209 @@
.header_title_2:hover {
font-size: 2.05vw;
text-shadow: 0px 0px 20px #ffffff;
+}
+.header_buttons {
+ margin-top: 5%;
+ margin-left: 10%;
+ width: 90%;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+}
+.header_button {
+ background-color: #f5c99f;
+ width: 20vw;
+ height: 5vw;
+ color: #000000;
+ border-radius: 30px;
+ vertical-align: middle;
+}
+#link_to_about {
+ margin-left: 40px;
+ background-color: #000000;
+ color: #ffffff;
+ border: 2px solid #ffffff;
+}
+.header_button_text {
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ font-size: 1.5vw;
+ margin-top: 5%;
+}
+.body_block {
+ background-color: #dcb495;
+}
+.about_block {
+ margin-top: 10%;
+ margin-left: 5%;
+ width: 90%;
+}
+.about_title {
+ color: #000000;
+ font-size: 4vw;
+}
+.about_info_block {
+ margin-top: 50px;
+ width: 100%;
+ display: inline-flex;
+ justify-content: space-between;
+}
+.about_article_block {
+ display: flex;
+ flex-direction: column;
+ align-content: space-around;
+}
+.about_article {
+ display: inline-flex;
+ justify-content: flex-start;
+ align-items: center;
+}
+.article_image {
+ width: 10vw;
+ height: 10vw;
+}
+.main_image {
+ width: 40vw;
+ height: 26vw;
+}
+.article_text {
+ max-width: 70%;
+ margin-left: 10px;
+ font-size: 1.3vw;
+}
+.how_work_block {
+ margin-top: 20%;
+ margin-left: 5%;
+ width: 90%;
+}
+.how_work_title {
+ text-align: center;
+ color: #000000;
+ font-size: 4vw;
+}
+.how_work_info_block {
+ display: inline-flex;
+ justify-content: space-evenly;
+ margin-top: 100px;
+}
+.how_work_image {
+ width: 10vw;
+ height: 10vw;
+}
+.how_work_info, .how_work_article {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+.how_work_article_title {
+ text-align: center;
+ font-size: 1.5vw;
+}
+.how_work_article_text {
+ text-align: center;
+ margin-top: 1vw;
+ font-size: 1.1vw;
+}
+.reg_block {
+ margin-top: 20%;
+ margin-left: 5%;
+ width: 90%;
+ height: 50vw;
+}
+.reg_content_block {
+ margin-top: 100px;
+ width: 100%;
+ display: inline-flex;
+ justify-content: space-between;
+ flex-wrap: nowrap;
+ align-content: center;
+}
+.reg_title {
+ text-align: center;
+ color: #000000;
+ font-size: 4vw;
+}
+.reg_content {
+ display: flex;
+ flex-direction: column;
+ align-self: center;
+ align-content: space-evenly;
+}
+.reg_button_group {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+}
+.reg_button_title {
+ margin-bottom: 10%;
+ color: #000000;
+ font-size: 2.5vw;
+ text-align: left;
+}
+.reg_button_info {
+ margin-top: 8%;
+}
+.reg_button_group {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.reg_button {
+ background-color: #a8886f;
+ width: 18vw;
+ height: 5vw;
+ color: #ffffff;
+ border-radius: 30px;
+ vertical-align: middle;
+}
+.reg_button_text {
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ font-size: 1.5vw;
+ margin-top: 6%;
+}
+#link_to_start{
+ background-color:#f5d3b8;
+}
+#link_to_start_text {
+ color: #000000;
+}
+.feedback_block {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 75vw;
+ background: linear-gradient( rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85) ), url(../images/back_main_two.jpg);background-repeat: repeat; background-position: center;
+}
+.feedback {
+ width: 50%;
+ height: 80%;
+ margin-left: 25%;
+ margin-right: 25%;
+ background-color: #dcb495;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ align-content: space-around;
+}
+.feedback_title {
+ width: 80%;
+ margin-bottom: 20%;
+ text-align: center;
+ color: #000000;
+ font-size: 3vw;
+}
+.feedback_logo {
+ margin-bottom: 20%;
+ width: 10vw;
+ height: 10vw;
+}
+.feedback_mail {
+ font-size: 1.5vw;
+ color: #000000;
}
\ No newline at end of file
diff --git a/static/css/register.css b/static/css/register.css
index c84aa26..4815f94 100644
--- a/static/css/register.css
+++ b/static/css/register.css
@@ -66,4 +66,16 @@ body {
width: 100%;
height: 100%;
text-align: center;
+}
+.message_block {
+ width: 100%;
+ display: inline-flex;
+ justify-content: center;
+}
+.message {
+ margin-top: 7px;
+ height: 50px !important;
+ border-radius: 22px !important;
+ width: 50%;
+ text-align: center;
}
\ No newline at end of file
diff --git a/static/images/back_main_one.jpg b/static/images/back_main_one.jpg
index f8e0afc..7621181 100644
Binary files a/static/images/back_main_one.jpg and b/static/images/back_main_one.jpg differ
diff --git a/static/images/back_main_two.jpg b/static/images/back_main_two.jpg
new file mode 100644
index 0000000..496a7b8
Binary files /dev/null and b/static/images/back_main_two.jpg differ
diff --git a/static/images/main_image_1.jpg b/static/images/main_image_1.jpg
new file mode 100644
index 0000000..0619403
Binary files /dev/null and b/static/images/main_image_1.jpg differ
diff --git a/static/images/main_image_2.png b/static/images/main_image_2.png
new file mode 100644
index 0000000..589a0c9
Binary files /dev/null and b/static/images/main_image_2.png differ
diff --git a/static/images/main_image_3.png b/static/images/main_image_3.png
new file mode 100644
index 0000000..947c5c7
Binary files /dev/null and b/static/images/main_image_3.png differ
diff --git a/static/images/main_image_4.png b/static/images/main_image_4.png
new file mode 100644
index 0000000..b8b1cab
Binary files /dev/null and b/static/images/main_image_4.png differ
diff --git a/static/images/main_image_5.png b/static/images/main_image_5.png
new file mode 100644
index 0000000..4787f8a
Binary files /dev/null and b/static/images/main_image_5.png differ
diff --git a/static/images/main_image_6.jpg b/static/images/main_image_6.jpg
new file mode 100644
index 0000000..e0ad3fe
Binary files /dev/null and b/static/images/main_image_6.jpg differ
diff --git a/static/images/yellow_cup.svg b/static/images/yellow_cup.svg
new file mode 100644
index 0000000..aeb03c0
--- /dev/null
+++ b/static/images/yellow_cup.svg
@@ -0,0 +1,16 @@
+
+
+
diff --git a/static/images/yellow_like.svg b/static/images/yellow_like.svg
new file mode 100644
index 0000000..a619b71
--- /dev/null
+++ b/static/images/yellow_like.svg
@@ -0,0 +1,15 @@
+
+
+
diff --git a/static/images/yellow_man.svg b/static/images/yellow_man.svg
new file mode 100644
index 0000000..6438d81
--- /dev/null
+++ b/static/images/yellow_man.svg
@@ -0,0 +1,14 @@
+
+
+
diff --git a/templates/base.html b/templates/base.html
index 727d288..65b16d4 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -38,5 +38,11 @@
{% block content %}{% endblock %}
+