mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Navbar works properly again
This commit is contained in:
BIN
RIGS/static/imgs/wof2014-1-small.jpg
Normal file
BIN
RIGS/static/imgs/wof2014-1-small.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 164 KiB |
@@ -4,7 +4,7 @@
|
|||||||
{% load invoices_waiting from filters %}
|
{% load invoices_waiting from filters %}
|
||||||
|
|
||||||
{% block titleheader %}
|
{% block titleheader %}
|
||||||
<a class="navbar-brand" href="/">RIGS</a>
|
<a class="navbar-brand" style="margin-left: auto; margin-right: auto;" href="/">RIGS</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block titleelements %}
|
{% block titleelements %}
|
||||||
|
|||||||
@@ -31,28 +31,26 @@
|
|||||||
<a class="skip-link" href='#main'>Skip to content</a>
|
<a class="skip-link" href='#main'>Skip to content</a>
|
||||||
{% include "analytics.html" %}
|
{% include "analytics.html" %}
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark flex-nowrap text-nowrap" role="navigation">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" role="navigation">
|
||||||
<a class="navbar-brand" href="{% if request.user.is_authenticated %}https://members.nottinghamtec.co.uk{%else%}https://nottinghamtec.co.uk{%endif%}">
|
<div class="container">
|
||||||
|
<a class="navbar-brand" style="position: absolute; left:0.5em; top: 2px;" href="{% if request.user.is_authenticated %}https://members.nottinghamtec.co.uk{%else%}https://nottinghamtec.co.uk{%endif%}">
|
||||||
<img src="{% static 'imgs/logo.webp' %}" width="40" height="40" alt="TEC's Logo: Serif 'TEC' vertically next to a blue box with the words 'PA and Lighting', surrounded by graduated rings" id="logo">
|
<img src="{% static 'imgs/logo.webp' %}" width="40" height="40" alt="TEC's Logo: Serif 'TEC' vertically next to a blue box with the words 'PA and Lighting', surrounded by graduated rings" id="logo">
|
||||||
</a>
|
</a>
|
||||||
<div class="container" style="padding-left: 0; padding-right: 0;">
|
{% block titleheader %}
|
||||||
<div class="row">
|
{% endblock %}
|
||||||
{% block titleheader %}
|
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation" onclick="document.getElementById('logo').classList.toggle('d-none');">
|
||||||
{% endblock %}
|
<span class="navbar-toggler-icon"></span>
|
||||||
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation" onclick="document.getElementById('logo').classList.toggle('d-none');">
|
</button>
|
||||||
<span class="navbar-toggler-icon"></span>
|
<div class="collapse navbar-collapse justify-content-between" id="navbarSupportedContent">
|
||||||
</button>
|
<ul class="navbar-nav">
|
||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
{% block titleelements %}
|
||||||
<ul class="navbar-nav">
|
{% endblock %}
|
||||||
{% block titleelements %}
|
</ul>
|
||||||
{% endblock %}
|
<ul class="navbar-nav align-self-end">
|
||||||
</ul>
|
{% block titleelements_right %}
|
||||||
<ul class="navbar-nav ml-auto">
|
{% endblock %}
|
||||||
{% block titleelements_right %}
|
</ul>
|
||||||
{% endblock %}
|
</div>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from captcha.fields import ReCaptchaField
|
from hcaptcha.fields import hCaptchaField
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.auth.forms import (AuthenticationForm, PasswordResetForm,
|
from django.contrib.auth.forms import (AuthenticationForm, PasswordResetForm,
|
||||||
UserChangeForm, UserCreationForm)
|
UserChangeForm, UserCreationForm)
|
||||||
@@ -9,7 +9,7 @@ from RIGS import models
|
|||||||
|
|
||||||
# Registration
|
# Registration
|
||||||
class ProfileRegistrationFormUniqueEmail(RegistrationFormUniqueEmail):
|
class ProfileRegistrationFormUniqueEmail(RegistrationFormUniqueEmail):
|
||||||
captcha = ReCaptchaField()
|
hcaptcha = hCaptchaField()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.Profile
|
model = models.Profile
|
||||||
@@ -41,7 +41,7 @@ class EmbeddedAuthenticationForm(CheckApprovedForm):
|
|||||||
|
|
||||||
|
|
||||||
class PasswordReset(PasswordResetForm):
|
class PasswordReset(PasswordResetForm):
|
||||||
captcha = ReCaptchaField(label='Captcha')
|
hcaptcha = hCaptchaField()
|
||||||
|
|
||||||
|
|
||||||
class ProfileCreationForm(UserCreationForm):
|
class ProfileCreationForm(UserCreationForm):
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<li class="nav-item dropdown" id="user">
|
<li class="nav-item dropdown align-self-end" id="user">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
Hi {{ user.first_name }}
|
Hi {{ user.first_name }}
|
||||||
|
|||||||
Reference in New Issue
Block a user