fix: some minor improvements
This commit is contained in:
@@ -31,11 +31,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{% if not session["id"] %}
|
{% if not session["id"] %}
|
||||||
<div class="col-md-2 d-none d-lg-flex align-items-center justify-content-center">
|
<div class="col-md-2 d-none d-lg-flex align-items-center justify-content-center">
|
||||||
<a type="button" class="btn btn-primary w-75" href="{{ROUTES['users']['login']}}" >Log In</a>
|
<a class="btn btn-primary w-75" href="{{ROUTES['users']['login']}}" >Log In</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="col-md-2 d-none d-lg-flex align-items-center justify-content-center">
|
<div class="col-md-2 d-none d-lg-flex align-items-center justify-content-center">
|
||||||
<a type="button" class="btn btn-danger w-75" href="{{ROUTES['users']['logout']}}" >Log Out</a>
|
<a class="btn btn-danger w-75" href="{{ROUTES['users']['logout']}}" >Log Out</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@@ -52,6 +52,23 @@
|
|||||||
{% block footer %}
|
{% block footer %}
|
||||||
© Copyright 2010 by <a href="http://domain.invalid/">you</a>.
|
© Copyright 2010 by <a href="http://domain.invalid/">you</a>.
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
<form action="https://validator.w3.org/check" class="text-center" enctype="multipart/form-data" method="post" target="_blank">
|
||||||
|
<input name="doctype" type="hidden" value="HTML5">
|
||||||
|
<input name="fragment" type="hidden">
|
||||||
|
<input alt="Validate" src="/static/I_heart_validator.png" type="image"> <!-- https://validator.w3.org/ -->
|
||||||
|
</form>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// Adapted from https://stackoverflow.com/a/10162353
|
||||||
|
const html = '<!DOCTYPE ' +
|
||||||
|
document.doctype.name +
|
||||||
|
(document.doctype.publicId ? ' PUBLIC "' + document.doctype.publicId + '"' : '') +
|
||||||
|
(!document.doctype.publicId && document.doctype.systemId ? ' SYSTEM' : '') +
|
||||||
|
(document.doctype.systemId ? ' "' + document.doctype.systemId + '"' : '') +
|
||||||
|
'>\n' + document.documentElement.outerHTML;
|
||||||
|
document.querySelector('form[action="https://validator.w3.org/check"] > input[name="fragment"]').value = html;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -25,11 +25,11 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ROUTES['contact-us']}}">Contact Us</a>
|
<a class="nav-link" href="{{ROUTES['contact-us']}}">Contact Us</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% if not session["id"] %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ROUTES['users']['register']}}">Register</a>
|
<a class="nav-link" href="{{ROUTES['users']['register']}}">Register</a>
|
||||||
</li>
|
</li>
|
||||||
{% if not session["id"] %}
|
<li class="nav-item d-block d-lg-none">
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{{ROUTES['users']['login']}}">Log In</a>
|
<a class="nav-link" href="{{ROUTES['users']['login']}}">Log In</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user