Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% load static %}
- <!doctype html>
- <html lang="en">
- <head>
- <!-- Required meta tags -->
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- Bootstrap CSS -->
- <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
- <title>{% block title %}Newspaper App{% endblock title %}</title>
- </head>
- <body>
- <nav class="navbar navbar-expand-md navbar-dark bg-dark mb-">
- <a class="navbar-brand" href="{% url 'home' %}">Developers</a>
- <button class="navbar-toggler" type="button" data-toggle="collapse"
- data-target="#navbarCollapse" aria-controls="navbarCollapse"
- aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarCollapse">
- {% if user.is_authenticated %}
- <ul class="navbar-nav ml-auto">
- <li class="nav-item">
- <a class="nav-link dropdown-toggle" data-toggle="dropdown "href="#" id="userMenu"
- aria-expanded="false">
- {{ user.username }}
- </a>
- <div class="dropdown-menu dropdown-menu-right"
- aria-labelledby="userMenu">
- <a class="dropdown-item"
- href="{% url 'password_change'%}">Change password</a>
- <div class="dropdown-divider"></div>
- <a class="dropdown-item" href="{% url 'logout' %}">
- Log Out</a>
- </div>
- </li>
- </ul>
- {% else %}
- <form class="form-inline ml-auto">
- <a href="{% url 'login' %}" class="btn btn-outline-secondary">
- Log In</a>
- <a href="{% url 'signup' %}" class="btn btn-primary ml-">
- Sign up</a>
- </form>
- {% endif %}
- </div>
- </nav>
- <div class="container">
- {% block content %}
- {% load bootstrap4 %}
- {% bootstrap_css %}
- {% bootstrap_javascript jquery='full' %}
- {% endblock content %}
- </div>
- <!-- Optional JavaScript -->
- <!-- <jQuery first, then Popper.js, then Bootstrap JS -->
- <script src="{% static 'js/jQuery.min.js' %}"></script>
- <script src="{% static 'js/popper.min.js' %}"></script>
- <script src="{% static 'js/bootstrap.min.js' %}"></script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment