Moved navbars to base.html and js to bottom of templates
This commit is contained in:
parent
0a105ea7ea
commit
88c1095e51
@ -1,4 +1,5 @@
|
|||||||
{% extends "base/navbar.html" %}
|
{% extends "base/base.html" %}
|
||||||
|
|
||||||
{% block 'navbar-right' %}
|
{% block 'navbar-right' %}
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<ul class="nav navbar-nav ml-auto">
|
<ul class="nav navbar-nav ml-auto">
|
||||||
@ -17,24 +18,33 @@
|
|||||||
<ul class="nav navbar-nav ml-auto">
|
<ul class="nav navbar-nav ml-auto">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="modal" id="registerLink" href="#"><span class="fa fa-user"></span> Register</a>
|
<a class="nav-link" data-toggle="modal" id="registerLink" href="#"><span class="fa fa-user"></span> Register</a>
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
$("#registerLink").modalForm({
|
|
||||||
formURL: "{% url 'signup' %}"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="modal" id="loginLink" href="#"><span class="fa fa-sign-in-alt"></span> Login</a>
|
<a class="nav-link" data-toggle="modal" id="loginLink" href="#"><span class="fa fa-sign-in-alt"></span> Login</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock 'navbar-right' %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
{% endblock main %}
|
||||||
|
|
||||||
|
<!-- Boostrap login and register modals -->
|
||||||
|
{% include "store/modal.html" %}
|
||||||
|
{% endblock body %}
|
||||||
|
|
||||||
|
{% block extra_js %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(function() {
|
||||||
|
$("#registerLink").modalForm({
|
||||||
|
formURL: "{% url 'signup' %}"
|
||||||
|
});
|
||||||
$("#loginLink").modalForm({
|
$("#loginLink").modalForm({
|
||||||
formURL: "{% url 'login' %}"
|
formURL: "{% url 'login' %}"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</li>
|
{% endblock extra_js %}
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock 'navbar-right' %}
|
|
@ -1,11 +1,6 @@
|
|||||||
{% extends "base/base.html" %}
|
{% extends "store/base.html" %}
|
||||||
|
|
||||||
{% block navbar %}
|
|
||||||
{% include "store/store-navbar.html" %}
|
|
||||||
{% endblock navbar %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
<main role="main">
|
<main role="main">
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -80,9 +75,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
{% endblock main %}
|
||||||
<!-- Boostrap login and register modals -->
|
|
||||||
|
|
||||||
{% include "store/modal.html" %}
|
|
||||||
|
|
||||||
{% endblock body %}
|
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
{% extends "base/base.html" %}
|
{% extends "store/base.html" %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% block extra_static %}
|
{% block extra_css %}
|
||||||
<script type="text/javascript" src="{% static 'dropzone-5.7.0/dist/dropzone.js' %}"></script>
|
|
||||||
<link rel="stylesheet" href="{% static 'dropzone-5.7.0/dist/dropzone.css' %}">
|
<link rel="stylesheet" href="{% static 'dropzone-5.7.0/dist/dropzone.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'store/dropzone-style.css' %}">
|
<link rel="stylesheet" href="{% static 'store/dropzone-style.css' %}">
|
||||||
{% endblock extra_static %}
|
{% endblock extra_css %}
|
||||||
{% block navbar %}
|
|
||||||
{% include "store/store-navbar.html" %}
|
|
||||||
{% endblock navbar %}
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<main>
|
<main>
|
||||||
<div class="container pt-5">
|
<div class="container pt-5">
|
||||||
@ -26,6 +23,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
{% endblock body %}
|
||||||
|
|
||||||
|
{% block extra_js %}
|
||||||
|
<script type="text/javascript" src="{% static 'dropzone-5.7.0/dist/dropzone.js' %}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function getCookie(name) {
|
function getCookie(name) {
|
||||||
let cookieValue = null;
|
let cookieValue = null;
|
||||||
@ -79,5 +81,4 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</main>
|
{% endblock extra_js %}
|
||||||
{% endblock body %}
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>{% block title %}PDMI - Python Discord Module Index{% endblock %}</title>
|
<title>{% block title %}PDMI - Python Discord Module Index{% endblock %}</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@ -11,22 +12,43 @@
|
|||||||
<!-- Favicon.ico -->
|
<!-- Favicon.ico -->
|
||||||
<link rel="shortcut icon" href="{% static 'favicon.ico' %}">
|
<link rel="shortcut icon" href="{% static 'favicon.ico' %}">
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
|
||||||
crossorigin="anonymous">
|
|
||||||
<link href="https://use.fontawesome.com/releases/v5.0.4/css/all.css" rel="stylesheet">
|
<link href="https://use.fontawesome.com/releases/v5.0.4/css/all.css" rel="stylesheet">
|
||||||
|
{% block extra_css %}{% endblock extra_css %}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="pt-5">
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||||
|
<a class="navbar-brand" href="{% url 'front_page' %}">P.D.M.I</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||||||
|
<ul class="navbar-nav mr-auto">
|
||||||
|
<li class="nav-item {% if request.path == '/' %}active{% endif %}">
|
||||||
|
<a class="nav-link" href="{% url 'front_page' %}">Home <span class="sr-only">(current)</span></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item {% if request.path == '/store/' %}active{% endif %}">
|
||||||
|
<a class="nav-link" href="{% url 'store_front_page' %}">Store</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item {% if request.path == '/doc/' %}active{% endif %}">
|
||||||
|
<a class="nav-link" href="#">Documentation</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% block 'navbar-right' %}
|
||||||
|
{% endblock 'navbar-right' %}
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
{% block body %}
|
||||||
|
{% endblock %}
|
||||||
|
{% include "base/legal.html" %}
|
||||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
|
||||||
<script src="{% static 'js/jquery.bootstrap.modal.forms.min.js' %}"></script>
|
<script src="{% static 'js/jquery.bootstrap.modal.forms.min.js' %}"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||||
{% block extra_static %}{% endblock extra_static %}
|
{% block extra_js %}{% endblock extra_js %}
|
||||||
</head>
|
|
||||||
<body class="pt-5">
|
|
||||||
{% block navbar %}
|
|
||||||
{% include "base/navbar.html" %}
|
|
||||||
{% endblock navbar %}
|
|
||||||
{% block body %}
|
|
||||||
{% endblock %}
|
|
||||||
{% include "base/legal.html" %}
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
|
||||||
<a class="navbar-brand" href="{% url 'front_page' %}">P.D.M.I</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li class="nav-item {% if request.path == '/' %}active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'front_page' %}">Home <span class="sr-only">(current)</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item {% if request.path == '/store/' %}active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'store_front_page' %}">Store</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item {% if request.path == '/doc/' %}active{% endif %}">
|
|
||||||
<a class="nav-link" href="#">Documentation</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% block 'navbar-right' %}
|
|
||||||
{% endblock 'navbar-right' %}
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
Loading…
Reference in New Issue
Block a user