-
+
{% endblock %}
diff --git a/app/templates/role.html b/app/templates/role.html
index c9eaed7..e15951e 100644
--- a/app/templates/role.html
+++ b/app/templates/role.html
@@ -1,10 +1,37 @@
{% extends "base.html" %}
+{% load static %}
{% block content %}
-
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/app/templates/signup.html b/app/templates/signup.html
index 13cbe60..815cb5a 100644
--- a/app/templates/signup.html
+++ b/app/templates/signup.html
@@ -1,9 +1,21 @@
{% extends "base.html" %}
{% block content %}
-
{% endblock %}
diff --git a/app/templates/ward_add.html b/app/templates/ward_add.html
index e310894..2e368f2 100644
--- a/app/templates/ward_add.html
+++ b/app/templates/ward_add.html
@@ -1,9 +1,21 @@
{% extends "base.html" %}
{% block content %}
-
{% endblock %}
diff --git a/app/views.py b/app/views.py
index 54d8918..480d831 100644
--- a/app/views.py
+++ b/app/views.py
@@ -1,3 +1,4 @@
+from django import forms
from django.views.generic import TemplateView
from django.views.generic.edit import CreateView, UpdateView, FormView
from django.views.generic.detail import DetailView
@@ -6,10 +7,10 @@
from django.contrib.auth.views import LoginView as ContribLoginView
from django.contrib.auth.mixins import LoginRequiredMixin
-from app import models, forms
+from app import models, forms as app_forms
-class IndexView(LoginRequiredMixin, TemplateView):
+class IndexView(TemplateView):
template_name = "index.html"
def get_context_data(self, **kwargs):
@@ -34,6 +35,19 @@ class WardAddView(LoginRequiredMixin, CreateView):
fields = ['first_name', 'middle_name', 'last_name', 'birthday', 'sex', 'address', 'phone', 'status', 'disease']
success_url = '/events/'
+ def get_form(self, form_class=None):
+ if form_class is None:
+ form_class = self.get_form_class()
+
+ form = super().get_form(form_class)
+ form.fields['first_name'].widget = forms.TextInput(attrs={'placeholder': 'Имя подопечного'})
+ form.fields['middle_name'].widget = forms.TextInput(attrs={'placeholder': 'Отчество подопечного'})
+ form.fields['last_name'].widget = forms.TextInput(attrs={'placeholder': 'Фамилия подопечного'})
+ form.fields['birthday'].widget = forms.TextInput(attrs={'placeholder': 'Дата рождения'})
+ form.fields['address'].widget = forms.TextInput(attrs={'placeholder': 'Адрес'})
+ form.fields['phone'].widget = forms.TextInput(attrs={'placeholder': 'Телефон'})
+ return form
+
def form_valid(self, form):
form.instance.nurse = self.request.user
return super().form_valid(form)
@@ -66,7 +80,7 @@ def get_object(self, **kwargs):
class ArticlesView(LoginRequiredMixin, ListView):
template_name = "articles.html"
model = models.Article
- paginate_by = 100
+ paginate_by = 3
def get_queryset(self):
return models.Article.objects.recommend(nurse=self.request.user)
@@ -110,10 +124,19 @@ def get_context_data(self, **kwargs):
class LoginView(ContribLoginView):
template_name = "login.html"
+ def get_form(self, form_class=None):
+ if form_class is None:
+ form_class = self.get_form_class()
+
+ form = super().get_form(form_class)
+ form.fields['username'].widget = forms.TextInput(attrs={'placeholder': 'Логин'})
+ form.fields['password'].widget = forms.PasswordInput(attrs={'placeholder': 'Пароль'})
+ return form
+
class SignupView(FormView):
template_name = "signup.html"
- form_class = forms.SignupForm
+ form_class = app_forms.SignupForm
success_url = '/role/'
def form_valid(self, form):
@@ -139,4 +162,3 @@ def get_object(self):
def form_valid(self, form):
form.instance.nurse = self.request.user
return super().form_valid(form)
-
diff --git a/static/css/vera.css b/static/css/vera.css
index 053fb38..5d76fb2 100644
--- a/static/css/vera.css
+++ b/static/css/vera.css
@@ -1,5 +1,7 @@
body {
font-family: 'OpenSans-Light';
+ background: linear-gradient(180deg, #F5F6FA 0%, #FFFFFF 100%);
+ background-repeat: no-repeat;
}
h1.main-head {
@@ -24,7 +26,7 @@ h1.main-head:first-letter {
margin-bottom: 50px;
}
-a.btn.btn-vera {
+.btn.btn-vera {
background-color: #8276F4;
border-radius: 8px;
width: 300px;
@@ -35,6 +37,7 @@ a.btn.btn-vera {
.main-img {
text-align: center;
+ mix-blend-mode: multiply;
}
.main-icon {
@@ -46,18 +49,223 @@ a.btn.btn-vera {
left: 30px;
}
-/*img.zabota-img{*/
-/* position:absolute;*/
-/* bottom: 0px;*/
-/* left: 300px;*/
-/*}*/
+.articles-container {
+ background-color: rgba(217, 205, 241, 0.3);
+ border-radius: 15px;
+ margin-bottom: 21px;
+ padding: 25px 48px;
+}
+
+.articles-container:nth-child(3n+1) {
+ background-color: rgba(217, 205, 241, 0.3);
+}
+
+.articles-container:nth-child(3n+2) {
+ background-color: rgba(144, 172, 254, 0.3);
+}
+
+.articles-container:nth-child(3n) {
+ background-color: rgba(226, 179, 255, 0.3);
+}
+
+.article-tag {
+ padding-right: 10px;
+ color: #B8B8B8;
+}
+
+.article-title {
+ margin-bottom: 10px;
+}
+
+.article-title a {
+ color:#000000;
+ font-weight: 600;
+ font-size: 36px
+}
+
+.article-text {
+ margin-bottom: 10px;
+ font-weight: normal;
+ font-size: 19px;
+}
+
+.articles-pagination {
+ margin-top: 30px;
+}
+
+.progress {
+ width: 290px;
+ height: 20px;
+ border-radius: 5px;
+}
+
+div.progress.vera {
+ border-radius: 10px;
+}
+
+div.progress-bar.vera{
+ background-color:#605EFE;
+ border-radius: 10px;
+}
+
+h3.signup{
+ font-style: normal;
+ font-weight: 600;
+ font-size: 22px;
+ line-height: 30px;
+ color: #605EFE;
+}
+
+.vera-form {
+ margin-top: 87px;
+}
+
+.vera-form .signup {
+ margin-top: 30px;
+ margin-bottom: 50px;
+}
+
+.vera-form .row {
+ position: relative;
+}
+
+.vera-form .form-error {
+ margin-top: .25rem;
+ color: #dc3545;
+ position: absolute;
+ top: 76px;
+}
+
+.vera-form ::placeholder {
+ color: #b8b8b8;
+}
+
+.vera-form input {
+ width:410px;
+ height: 70px;
+ margin-bottom: 40px;
+ background: #E9ECEF;
+ border-radius:15px;
+ color: #777;
+ opacity:0.6;
+ padding-left: 20px;
+ border: 0px;
+ font-style: normal;
+ font-weight: 300;
+ font-size: 31px;
+ line-height: 42px;
+}
+
+.vera-form select {
+ width:410px;
+ height: 70px;
+ margin-bottom: 40px;
+ background: #E9ECEF;
+ border-radius:15px;
+ color: #777;
+ opacity:0.6;
+ padding-left: 20px;
+ border: 0px;
+ font-style: normal;
+ font-weight: 300;
+ font-size: 31px;
+ line-height: 42px;
+}
+
+.vera-form select[multiple] {
+ height: 150px;
+}
+
+
+.btn.btn-vera.signup {
+ left: 39.5%;
+ top: 420px;
+ padding: 10px 25px;
+}
+
+h2.role-text {
+ font-size: 36px;
+ font-family: 'OpenSans-Bold';
+ margin-bottom: 40px;
+}
+
+div.roles {
+ text-align:center;
+}
+
+div.roles button {
+ border: 0;
+ margin: 0 15px;
+}
+
+div.role {
+ position: relative;
+ width: 260px;
+ height: 370px;
+ border-radius: 15px;
+ display:inline-block;
+ color: #FFFFFF;
+}
+
+.relative{
+ background: #90ACFF;
+}
+
+.nurse{
+ background: #AF8EFF;
+}
+
+
+div.role h2{
+ position: relative;
+ top:280px;
+ font-size: 31px;
+}
+
+div.role h6{
+ position: relative;
+ top:285px;
+ font-size: 15px;
+}
+
+div.role img{
+ position:absolute;
+ left: 30px;
+ bottom: 120px;
+}
+
+div.sex{
+ height: 70px;
+ width: 420px;
+}
+
+div.sex input{
+ text-align:center;
+ width: 200px;
+ float: left;
+ padding-right: 20px;
+ margin-right: 10px;
+}
+
+button.ward{
+ position: relative;
+ top: 500px;
+ left: 590px;
+ font-size: 18px !important;
+ padding: 7px 50px;
+}
@font-face {
- font-family: 'OpenSans-Semibold'; /* Гарнитура шрифта */
- src: url(/static/fonts/OpenSans-Semibold.ttf); /* Путь к файлу со шрифтом */
+ font-family: 'OpenSans-Semibold';
+ src: url(/static/fonts/OpenSans-Semibold.ttf);
+}
+
+@font-face {
+ font-family: 'OpenSans-Light';
+ src: url(/static/fonts/OpenSans-Light.ttf);
}
@font-face {
- font-family: 'OpenSans-Light'; /* Гарнитура шрифта */
- src: url(/static/fonts/OpenSans-Light.ttf); /* Путь к файлу со шрифтом */
+ font-family: 'OpenSans-Bold';
+ src: url(/static/fonts/OpenSans-Bold.ttf);
}
diff --git a/static/fonts/OpenSans-Bold.ttf b/static/fonts/OpenSans-Bold.ttf
new file mode 100644
index 0000000..7b52945
Binary files /dev/null and b/static/fonts/OpenSans-Bold.ttf differ
diff --git a/static/img/pro.svg b/static/img/pro.svg
new file mode 100644
index 0000000..5c840a7
--- /dev/null
+++ b/static/img/pro.svg
@@ -0,0 +1,6 @@
+
diff --git a/static/img/relative.svg b/static/img/relative.svg
new file mode 100644
index 0000000..262e2dd
--- /dev/null
+++ b/static/img/relative.svg
@@ -0,0 +1,6 @@
+
diff --git a/vera/settings.py b/vera/settings.py
index c7c01c3..dc87634 100644
--- a/vera/settings.py
+++ b/vera/settings.py
@@ -126,7 +126,7 @@
]
LOGIN_URL = '/login/'
-LOGIN_REDIRECT_URL = '/'
+LOGIN_REDIRECT_URL = '/events/'
INCLUDE_SETTING_DEBUG = os.path.join(BASE_DIR, 'vera/local_settings.py')
INCLUDE_SETTING_PRODUCTION = '/etc/vera/settings.py'