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.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. <a class="nav-link" href="{% url 'studis:index' %}">Stammdaten von</a>
  30. </li>
  31. {% endif %}
  32. </ul>
  33. <ul class="nav navbar-nav navbar-right">
  34. {% if user.is_authenticated %}
  35. <li class="nav-item">
  36. <a class="nav-link disabled" href="#">{{ user.first_name }} {{ user.last_name }}</a>
  37. </li>
  38. <li class="nav-item">
  39. <a class="nav-link" href="{% url 'logout' %}?next={{ LOGOUT_REDIRECT_URL }}">Abmelden</a>
  40. </li>
  41. {% else %}
  42. <li class="dropdown">
  43. <a id="login-button" href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
  44. Anmelden
  45. <span class="caret"></span>
  46. </a>
  47. <ul id="login-dp" class="dropdown-menu">
  48. <li>
  49. <form class="form" role="form" method="post" action="{% url 'login' %}" accept-charset="UTF-8" id="login-nav">
  50. {% csrf_token %} {% if next %}
  51. <input type="hidden" name="next" value="{{ next }}" /> {% endif %}
  52. <div class="form-group">
  53. <label class="sr-only" for="username">Benutzername</label>
  54. <input type="text" class="form-control" id="username" name="username" placeholder="Benutzername" required>
  55. </div>
  56. <div class="form-group">
  57. <label class="sr-only" for="password">Kennwort</label>
  58. <input type="password" class="form-control" id="password" name="password" placeholder="Kennwort" required>
  59. </div>
  60. <div class="form-group">
  61. <button type="submit" class="btn btn-primary btn-block">Anmelden</button>
  62. </div>
  63. </form>
  64. </li>
  65. </ul>
  66. </li>
  67. {% endif %}
  68. </ul>
  69. </div>
  70. </nav>
  71. {% block content %} {% endblock %}
  72. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  73. <script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
  74. </body>
  75. </html>