new templates
This commit is contained in:
parent
499f115a7d
commit
9acfc3822c
8 changed files with 56 additions and 116 deletions
|
|
@ -204,6 +204,7 @@ MEDIA_ROOT = BASE_DIR / 'media'
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
|
|
||||||
if DEBUG == True:
|
if DEBUG == True:
|
||||||
STATICFILES_DIRS = (
|
STATICFILES_DIRS = (
|
||||||
BASE_DIR / 'static',
|
BASE_DIR / 'static',
|
||||||
|
|
@ -221,7 +222,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
|
||||||
LOGIN_URL = '/users/login/'
|
LOGIN_URL = '/users/login/'
|
||||||
# LOGIN_REDIRECT_URL = '/'
|
# LOGIN_DEFAULT_REDIRECT_URL = '/'
|
||||||
|
|
||||||
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
|
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
|
||||||
CRISPY_TEMPLATE_PACK = "bootstrap5"
|
CRISPY_TEMPLATE_PACK = "bootstrap5"
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ app_name = "users"
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('login/', OTPLoginView.as_view(), name='login'),
|
path('login/', OTPLoginView.as_view(), name='login'),
|
||||||
path('logout/', LogoutView.as_view(), name='logout'),
|
path('logout/', LogoutView.as_view(), name='logout'),
|
||||||
path('profile/', ProfileDetailView.as_view(), name='profile_detail'),
|
path('account/', ProfileDetailView.as_view(), name='account_detail'),
|
||||||
path('profile/update/', ProfileUpdateView.as_view(), name='profile_update'),
|
path('account/update/', ProfileUpdateView.as_view(), name='account_update'),
|
||||||
path('api/account/', AccountView.as_view(), name='account_api'),
|
path('api/account/', AccountView.as_view(), name='account_api'),
|
||||||
path('api/users/', UserListView.as_view(), name='user_list_api'),
|
path('api/users/', UserListView.as_view(), name='user_list_api'),
|
||||||
path('api/users/<uuid>/', UserDetailView.as_view(), name='user_detail_api'),
|
path('api/users/<uuid>/', UserDetailView.as_view(), name='user_detail_api'),
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,9 @@ class OTPLoginView(LoginView):
|
||||||
"""
|
"""
|
||||||
form_class = OTPAuthenticationForm
|
form_class = OTPAuthenticationForm
|
||||||
|
|
||||||
|
def post(self, request, *args, **kwargs):
|
||||||
|
return super().post(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@method_decorator(login_required, name='dispatch')
|
@method_decorator(login_required, name='dispatch')
|
||||||
class ProfileDetailView(DetailView):
|
class ProfileDetailView(DetailView):
|
||||||
|
|
|
||||||
116
static/main.css
116
static/main.css
|
|
@ -1,12 +1,24 @@
|
||||||
/*------------Fonts-------------*/
|
.bd-placeholder-img {
|
||||||
|
font-size: 1.125rem;
|
||||||
:root {
|
text-anchor: middle;
|
||||||
--bs-dark-rgb: 123, 21, 59;
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body, h1, h2, h3, h4, h5, a, p, ul li, ol li, span, textarea, input {
|
@media (min-width: 768px) {
|
||||||
font-family: 'pelak', serif !important;
|
.bd-placeholder-img-lg {
|
||||||
text-decoration: none;
|
font-size: 3.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.b-example-divider {
|
||||||
|
height: 3rem;
|
||||||
|
background-color: rgba(0, 0, 0, .1);
|
||||||
|
border: solid rgba(0, 0, 0, .15);
|
||||||
|
border-width: 1px 0;
|
||||||
|
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bi {
|
.bi {
|
||||||
|
|
@ -15,88 +27,16 @@ html, body, h1, h2, h3, h4, h5, a, p, ul li, ol li, span, textarea, input {
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
min-height: 100vh;
|
font-family: "Vazirmatn UI FD";
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-family: "pelak";
|
||||||
|
/*font-size: 110%;*/
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-bidi {
|
jdp-container {
|
||||||
direction: rtl;
|
left: unset;
|
||||||
text-align: right;
|
right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
|
||||||
background-color: #7b153b;
|
|
||||||
border-color: #7b153b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:hover {
|
|
||||||
background-color: #99546c;
|
|
||||||
border-color: #7b153b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn.btn-primary:active,
|
|
||||||
.btn.btn-primary:focus{
|
|
||||||
background-color: #7b153b; !important;
|
|
||||||
border-color: #7b153b; !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary.disabled, .btn-primary:disabled {
|
|
||||||
color: #fff;
|
|
||||||
background-color: #99546c;
|
|
||||||
border-color: #7b153b;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.bg-dark {
|
|
||||||
--bs-bg-opacity: 1;
|
|
||||||
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
a, .nav-link, .page-link {
|
|
||||||
color: #7b153b;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover, .nav-link:focus, .nav-link:hover, .page-link:hover, .accordion-button:not(.collapsed) {
|
|
||||||
color: #99546c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.accordion-button:not(.collapsed) {
|
|
||||||
background-color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .ml-auto {
|
|
||||||
left: auto !important;
|
|
||||||
right: 0px;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.rounded-5 {
|
|
||||||
border-radius: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr.white {
|
|
||||||
width: 100%;
|
|
||||||
height: 1px;
|
|
||||||
border: 0;
|
|
||||||
opacity: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-footer.home {
|
|
||||||
background: unset;
|
|
||||||
border-top: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*.rounded-top-home {*/
|
|
||||||
/* border-top-right-radius: 0.75rem;*/
|
|
||||||
/* border-top-left-radius: 0.75rem !important*/
|
|
||||||
/*}*/
|
|
||||||
|
|
||||||
/*.rounded-bottom-home {*/
|
|
||||||
/* border-bottom-right-radius: 0.75rem;*/
|
|
||||||
/* border-bottom-left-radius: 0.75rem !important*/
|
|
||||||
/*}*/
|
|
||||||
|
|
||||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
|
||||||
color: black!important;
|
|
||||||
background-color: white;
|
|
||||||
border-radius: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
@ -96,15 +96,15 @@
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
کلیه حقوق متعلق به
|
کلیه حقوق متعلق به
|
||||||
<a class="text-decoration-none" href="/">گروه وصال</a>
|
<a class="text-decoration-none" href="/">گویال</a>
|
||||||
است.
|
است.
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
توسعه
|
توسعه
|
||||||
{# <a href="https://gooyal.com" class="text-decoration-none" target="_blank"#}
|
<a href="https://gooyal.com" class="text-decoration-none" target="_blank"
|
||||||
{# rel="noopener noreferrer">#}
|
rel="noopener noreferrer">
|
||||||
بوستان
|
گویال
|
||||||
{# <img src="{% static 'image/gooyal_logo_gray.png' %}" width="28" height="21">#}
|
<img src="{% static 'image/gooyal_logo_gray.png' %}" width="28" height="21">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,6 @@
|
||||||
<div class="bi bi-file-spreadsheet p-1"></div>
|
<div class="bi bi-file-spreadsheet p-1"></div>
|
||||||
<div class="p-1"><a class="text-decoration-none" href="{% url 'users:account_detail' %}">account</a></div>
|
<div class="p-1"><a class="text-decoration-none" href="{% url 'users:account_detail' %}">account</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<div class="bi bi-file-spreadsheet p-1"></div>
|
|
||||||
<div class="p-1"><a class="text-decoration-none" href="{% url 'wallet:transaction_list' %}">transactions</a></div>
|
|
||||||
</div>
|
|
||||||
<div class="col d-flex justify-content-center">
|
<div class="col d-flex justify-content-center">
|
||||||
<div class="bi bi-file-spreadsheet p-1"></div>
|
<div class="bi bi-file-spreadsheet p-1"></div>
|
||||||
<div class="p-1"><a class="text-decoration-none" href="{% url 'swagger-ui' %}">API's</a></div>
|
<div class="p-1"><a class="text-decoration-none" href="{% url 'swagger-ui' %}">API's</a></div>
|
||||||
|
|
@ -26,7 +22,7 @@
|
||||||
<div class="col d-flex justify-content-end">
|
<div class="col d-flex justify-content-end">
|
||||||
{% if not user.is_authenticated %}
|
{% if not user.is_authenticated %}
|
||||||
<div class="bi bi-box-arrow-right p-1"></div>
|
<div class="bi bi-box-arrow-right p-1"></div>
|
||||||
<div class="p-1"><a class="text-decoration-none" href="{% url 'users:login_request' %}">ورود</a></div>
|
<div class="p-1"><a class="text-decoration-none" href="{% url 'users:login' %}">ورود</a></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
|
|
@ -42,14 +38,14 @@
|
||||||
<li><a class="dropdown-item" href="{% url 'users:account_detail' %}">پروفایل</a></li>
|
<li><a class="dropdown-item" href="{% url 'users:account_detail' %}">پروفایل</a></li>
|
||||||
{# <li><a class="dropdown-item" href="{% url 'tests:result_list' %}">نتایج آزمونها</a></li>#}
|
{# <li><a class="dropdown-item" href="{% url 'tests:result_list' %}">نتایج آزمونها</a></li>#}
|
||||||
<hr class="dropdown-divider">
|
<hr class="dropdown-divider">
|
||||||
{# <form action="{% url 'users:logout' %}" method="post">#}
|
<form action="{% url 'users:logout' %}" method="post">
|
||||||
{# {% csrf_token %}#}
|
{% csrf_token %}
|
||||||
{# <li>#}
|
<li>
|
||||||
{# <span class="dropdown-item">#}
|
<span class="dropdown-item">
|
||||||
{# <input class="form-control" type="submit" aria-label="logout" value="خروج">#}
|
<input class="form-control" type="submit" aria-label="logout" value="خروج">
|
||||||
{# </span>#}
|
</span>
|
||||||
{# </li>#}
|
</li>
|
||||||
{# </form>#}
|
</form>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base_generic.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
<title>Login</title>
|
<title>Login</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap-5.1.3-dist/css/bootstrap.min.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap-5.3.0-dist/css/bootstrap.min.css' %}">
|
||||||
<link href="{% static 'bootstrap-icons-1.7.2/bootstrap-icons.css' %}" rel="stylesheet">
|
<link href="{% static 'bootstrap-icons-1.11.3/font/bootstrap-icons.css' %}" rel="stylesheet">
|
||||||
<script src="{% static 'jquery-3.6.0.min.js' %}"></script>
|
<script src="{% static 'jquery-3.6.0.min.js' %}"></script>
|
||||||
<script src="{% static 'bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js' %}"></script>
|
<script src="{% static 'bootstrap-5.3.0-dist/js/bootstrap.bundle.min.js' %}"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'login/css/util.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'login/css/util.css' %}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'login/css/main.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'login/css/main.css' %}">
|
||||||
<link href="{% static 'fonts.css' %}" rel="stylesheet">
|
<link href="{% static 'fonts.css' %}" rel="stylesheet">
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
{# </div>#}
|
{# </div>#}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form class="login100-form validate-form flex-sb flex-w" method="post" action="{% url 'users:login' %}">
|
<form class="login100-form validate-form flex-sb flex-w" method="post" action="{{ request.get_full_path }}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue