Merge branch 'master' of https://git.wmi.amu.edu.pl/s442783/HighNeed_projekt_inz
This commit is contained in:
commit
92608b8abb
@ -39,13 +39,13 @@ function NavBar() {
|
||||
</svg>
|
||||
</Link>
|
||||
|
||||
<Link className='log-in icons' to='/login'>
|
||||
<a className='log-in icons' href='/profil/'>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.6805 8.1121C19.6805 10.4926 17.6606 12.4224 15.1692 12.4224C12.6777 12.4224 10.6579 10.4926 10.6579 8.1121C10.6579 5.73156 12.6777 3.80176 15.1692 3.80176C17.6606 3.80176 19.6805 5.73156 19.6805 8.1121ZM17.4248 8.1121C17.4248 9.30237 16.415 10.2673 15.1692 10.2673C13.9234 10.2673 12.9135 9.30237 12.9135 8.1121C12.9135 6.92183 13.9234 5.95693 15.1692 5.95693C16.415 5.95693 17.4248 6.92183 17.4248 8.1121Z" fill="white" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 24.6724V17.1724C7.5 15.1012 8.93909 13.4224 10.7143 13.4224H19.2857C21.061 13.4224 22.5 15.1012 22.5 17.1724V24.6724H7.5ZM19.2857 15.9224C19.8775 15.9224 20.3571 16.482 20.3571 17.1724V22.3448H9.64286V17.1724C9.64286 16.482 10.1226 15.9224 10.7143 15.9224H19.2857Z" fill="white" />
|
||||
</svg>
|
||||
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -67,7 +67,8 @@ function NavBar() {
|
||||
|
||||
<div className='sidebar-text'>
|
||||
|
||||
<Link className='nav-links' to='/login' onClick={closeMobileMenu} >Zaloguj się</Link>
|
||||
<a href="../accounts/login"> Zaloguj się</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
14
highneed/events/highneed_react/src/components/navbar.html
Normal file
14
highneed/events/highneed_react/src/components/navbar.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% load staticfiles %}
|
||||
<html lang="en">
|
||||
<head><title>Hello World</title></head>
|
||||
<body>
|
||||
<div id="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{% static 'navbar.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
10
highneed/events/highneed_react/src/components/profil.html
Normal file
10
highneed/events/highneed_react/src/components/profil.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Profil</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hi</h1>
|
||||
</body>
|
||||
</html>
|
@ -12,9 +12,9 @@
|
||||
<form method="post" action="{% url 'account_logout' %}">
|
||||
{% csrf_token %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
|
||||
{% endif %}
|
||||
<button type="submit">{% trans 'Sign Out' %}</button>
|
||||
<button type="submit" >{% trans 'Sign Out' %}</button>
|
||||
</form>
|
||||
|
||||
|
||||
|
23
highneed/events/templates/profil.html
Normal file
23
highneed/events/templates/profil.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Profil</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
{% block title %}Home{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
Hi {{ user.username }}!
|
||||
<p><a href="{% url 'account_logout' %}">Log Out</a></p>
|
||||
{% else %}
|
||||
<p>You are not logged in</p>
|
||||
<a href="{% url 'account_login' %}">Log In</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Binary file not shown.
@ -141,8 +141,8 @@ if DEBUG:
|
||||
|
||||
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
|
||||
STATIC_URL = '/static/'
|
||||
LOGIN_REDIRECT_URL = 'events'
|
||||
LOGOUT_REDIRECT_URL = 'events'
|
||||
LOGIN_REDIRECT_URL = '../../events/'
|
||||
LOGOUT_REDIRECT_URL = '../../events/'
|
||||
SESSION_COOKIE_SECURE = False
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, 'events/highneed_react/build/static'),
|
||||
|
@ -23,4 +23,5 @@ urlpatterns = [
|
||||
path('events/', TemplateView.as_view(template_name='index.html')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('accounts/', include('allauth.urls')),
|
||||
path('profil/', TemplateView.as_view(template_name='profil.html')),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user