Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

base.html 4.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="de">
  3. {% load static %}
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <title> {% block title %}Seitenname{% endblock %}</title>
  8. <link href="{% static 'css/mysite.css' %}" rel="stylesheet">
  9. <link href="{% static 'bootstrap/css/bootstrap.css' %}" rel="stylesheet">
  10. </head>
  11. <body>
  12. <!-- Navigation -->
  13. <nav id="navbar-efi" class="navbar navbar-expand-lg navbar-light">
  14. <a class="navbar-brand" href="#">
  15. <img src="{% static 'images/efi.jpg' %}" width="35" height="35" alt="efi">
  16. </a>
  17. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
  18. aria-expanded="false" aria-label="Toggle navigation">
  19. <span class="navbar-toggler-icon"></span>
  20. </button>
  21. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  22. <ul class="navbar-nav mr-auto">
  23. {% if user.is_superuser %}
  24. <li class="nav-item">
  25. <a class="nav-link" href="{% url 'admin:index' %}">Administration</a>
  26. </li>
  27. {% endif %} {% if user.is_staff %}
  28. <li class="nav-item">
  29. </li>
  30. {% endif %}
  31. </ul>
  32. <ul class="nav navbar-nav navbar-right">
  33. {% if user.is_authenticated %}
  34. <li class="nav-item">
  35. <a class="nav-link disabled" href="#">{{ user.first_name }} {{ user.last_name }}</a>
  36. </li>
  37. <li class="nav-item">
  38. <a class="nav-link" href="{% url 'logout' %}?next={{ LOGOUT_REDIRECT_URL }}">Abmelden</a>
  39. </li>
  40. {% else %}
  41. <li class="dropdown">
  42. <a id="login-button" href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
  43. Anmelden
  44. <span class="caret"></span>
  45. </a>
  46. <ul id="login-dp" class="dropdown-menu">
  47. <li>
  48. <form class="form" role="form" method="post" action="{% url 'login' %}" accept-charset="UTF-8" id="login-nav">
  49. {% csrf_token %} {% if next %}
  50. <input type="hidden" name="next" value="{{ next }}" /> {% endif %}
  51. <div class="form-group">
  52. <label class="sr-only" for="username">Benutzername</label>
  53. <input type="text" class="form-control" id="username" name="username" placeholder="Benutzername" required>
  54. </div>
  55. <div class="form-group">
  56. <label class="sr-only" for="password">Kennwort</label>
  57. <input type="password" class="form-control" id="password" name="password" placeholder="Kennwort" required>
  58. </div>
  59. <div class="form-group">
  60. <button type="submit" class="btn btn-primary btn-block">Anmelden</button>
  61. </div>
  62. </form>
  63. </li>
  64. </ul>
  65. </li>
  66. {% endif %}
  67. </ul>
  68. </div>
  69. </nav>
  70. {% block content %} {% endblock %}
  71. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  72. <script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
  73. </body>
  74. </html>