fix: some minor improvements
This commit is contained in:
@@ -31,11 +31,11 @@
|
||||
</div>
|
||||
{% if not session["id"] %}
|
||||
<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>
|
||||
{% else %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -52,6 +52,23 @@
|
||||
{% block footer %}
|
||||
© Copyright 2010 by <a href="http://domain.invalid/">you</a>.
|
||||
{% 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>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ROUTES['contact-us']}}">Contact Us</a>
|
||||
</li>
|
||||
{% if not session["id"] %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ROUTES['users']['register']}}">Register</a>
|
||||
</li>
|
||||
{% if not session["id"] %}
|
||||
<li class="nav-item">
|
||||
<li class="nav-item d-block d-lg-none">
|
||||
<a class="nav-link" href="{{ROUTES['users']['login']}}">Log In</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user