Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Home Manager</title>
- {% load static %}
- <link rel="stylesheet" href="{% static 'css/style.css' %}">
- <link rel="wesite icon" type="jpg" href="#">
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.2.0/css/all.css">
- </head>
- <body>
- <div class="navbar">
- <a href="{% url 'home page' %}"><i class="fa-solid fa-house-user"></i> Home Manager</a>
- {% if request.user.is_authenticated %}
- <div class="dropdown">
- <button class="dropbtn"><i class="fa-solid fa-user"></i> {{ user.username }} <i
- class="fa fa-caret-down"></i>
- </button>
- <div class="dropdown-content">
- <a href="{% url 'account details' pk=user.pk %}"><i class="fa-solid fa-circle-info"></i> Details</a>
- <a href="{% url 'account edit' pk=user.pk %}"><i class="fa-solid fa-gear"></i> Settings</a>
- <a href="{% url 'account logout' %}"><i class="fa-solid fa-right-from-bracket"></i> exit</a>
- </div>
- </div>
- {% else %}
- <a class="right" href="{% url 'account register' %}"><i class="fa-regular fa-registered"></i> Register</a>
- <a class="right" href="{% url 'account login' %}"><i class="fa-solid fa-right-to-bracket"></i> Log In</a>
- {% endif %}
- {# <div class="building">#}
- {# <button class="building-button"><i class="fa-solid fa-building"></i> Buildings <i class="fa fa-caret-down"></i>#}
- {# </button>#}
- {# <div class="building-content">#}
- {# {% for object in buildings %}#}
- {# <a href="{% url 'building-details' pk=object.pk %}">{{ object.town }}</a>#}
- {# {% endfor %}#}
- {# </div>#}
- {# </div>#}
- <a href="{% url 'buildings' %}">Buildings</a>
- <a href="{% url 'show people' %}">People</a>
- <a href="{% url 'people create' %}">Add People</a>
- <a href="{% url 'building create' %}">Add Building</a>
- <a href="#">Send Message</a>
- </div>
- {% block page_content %}
- {% endblock %}
- </body>
- </html>
- body {
- margin: 0;
- }
- /* Navbar container */
- .navbar {
- overflow: hidden;
- background-color: black;
- font-family: Arial, sans-serif;
- }
- /* Links inside the navbar */
- .navbar a {
- float: left;
- font-size: 20px;
- color: white;
- text-align: center;
- padding: 14px 16px;
- text-decoration: none;
- }
- /* The dropdown container */
- .dropdown {
- float: right;
- overflow: hidden;
- margin-right: 60px;
- }
- /* Dropdown button */
- .dropdown .dropbtn {
- font-size: 20px;
- border: none;
- outline: none;
- color: white;
- padding: 14px 16px;
- background-color: inherit;
- font-family: inherit; /* Important for vertical align on mobile phones */
- margin: 0; /* Important for vertical align on mobile phones */
- }
- /* Add a red background color to navbar links on hover */
- .navbar a:hover, .dropdown:hover .dropbtn {
- background-color: red;
- }
- /* Dropdown content (hidden by default) */
- .dropdown-content {
- display: none;
- position: absolute;
- background-color: #f9f9f9;
- min-width: 160px;
- box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
- z-index: 1;
- }
- /* Links inside the dropdown */
- .dropdown-content a {
- float: none;
- color: black;
- padding: 12px 16px;
- text-decoration: none;
- display: block;
- text-align: left;
- }
- /* Add a grey background color to dropdown links on hover */
- .dropdown-content a:hover {
- background-color: #ddd;
- }
- /* Show the dropdown menu on hover */
- .dropdown:hover .dropdown-content {
- display: block;
- }
- .navbar a.right {
- float: right;
- }
- .building {
- float: left;
- overflow: hidden;
- margin-left: 250px;
- }
- .building .building-button {
- font-size: 20px;
- border: none;
- outline: none;
- color: white;
- padding: 14px 16px;
- background-color: inherit;
- font-family: inherit;
- margin: 0;
- }
- .building-content {
- display: none;
- position: absolute;
- background-color: #f9f9f9;
- min-width: 160px;
- box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
- z-index: 1;
- }
- .building-content a {
- float: none;
- color: black;
- padding: 12px 16px;
- text-decoration: none;
- display: block;
- text-align: left;
- }
- .building-content a:hover {
- background-color: #ddd;
- }
- .building:hover .building-content {
- display: block;
- }
- .building:hover {
- background-color: green;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement