-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_base.html
49 lines (49 loc) · 2.41 KB
/
_base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!-- templates/_base.html -->
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}Bookstore{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no">
<!-- CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411\
NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/base.css' %}">
</head>
<body>
<header>
<!-- Fixed navbar -->
<div class="d-flex flex-column flex-md-row justify-content-sm-between align-items-center p-3 px-md-4
mb-3 bg-white border-bottom shadow-sm">
<a href="{% url 'home' %}" class="navbar-brand my-0 mr-md-auto
font-weight-normal fs-2 fw-bold">Bookstore</a>
<nav class="my-2 my-md-0 mr-md-3">
<a class="p-2 text-dark text-decoration-none fs-6 fw-bolder" href="{% url 'book_list' %}">Books</a>
<a class="p-2 text-dark text-decoration-none fs-6 fw-bolder" href="{% url 'about' %}">About</a>
{% if user.is_authenticated %}
<a class="p-2 text-dark text-decoration-none fs-6 fw-bolder" href="{% url 'account_logout' %}">Log Out</a>
{% else %}
<a class="p-2 text-dark text-decoration-none fs-6 fw-bolder" href="{% url 'account_login' %}">Log In</a>
<a class="btn btn-outline-primary" href="{% url 'account_signup' %}">Sign Up</a>
{% endif %}
</nav>
</div>
</header>
<div class="container">
{% block content %}
{% endblock content %}
</div>
<!-- JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-
VCmXjywReHh4PwowAiWNagnWcLhlEJLA5buUprzK8rxF\
geH0kww/aWY76TfkUoSX" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZ\
H81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/js/\
bootstrap.min.js" integrity="sha384-1CmrxMRARb6aLqgBO7yyAxTOQE2AKb\
9GfXnEo760AUcUmFx3ibVJJAzGytlQcNXd" crossorigin="anonymous"></script>
</body>
</html