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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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/application.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. {% elif user.is_staff %}
  28. <li class="nav-item">
  29. <a class="nav-link" href="{% url 'logout' %}">Administration</a>
  30. </li>
  31. {% else %}
  32. <li class="nav-item">
  33. <a class="nav-link" href="{% url 'student_page' %}">{{user.get_username}}'s Dashboard</a>
  34. </li>
  35. {% endif %}
  36. </ul>
  37. <ul class="nav navbar-nav navbar-right">
  38. {% if user.is_authenticated %}
  39. <li class="nav-item">
  40. <a class="nav-link disabled" href="#"></a>
  41. </li>
  42. <li class="nav-item">
  43. <a class="nav-link" href="{% url 'logout' %}?next={{ LOGOUT_REDIRECT_URL }}">Abmelden</a>
  44. </li>
  45. {% else %}
  46. <li class="dropdown">
  47. <a id="login-button" href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
  48. Anmelden
  49. <span class="caret"></span>
  50. </a>
  51. <ul id="login-dp" class="dropdown-menu">
  52. <li>
  53. <form class="form" role="form" method="post" action="{% url 'login' %}" accept-charset="UTF-8" id="login-nav">
  54. {% csrf_token %} {% if next %}
  55. <input type="hidden" name="next" value="{{ next }}" />
  56. {% endif %}
  57. <div class="form-group">
  58. <label class="sr-only" for="username">Benutzername</label>
  59. <input type="text" class="form-control" id="username" name="username" placeholder="Benutzername" required>
  60. </div>
  61. <div class="form-group">
  62. <label class="sr-only" for="password">Kennwort</label>
  63. <input type="password" class="form-control" id="password" name="password" placeholder="Kennwort" required>
  64. </div>
  65. <div class="form-group">
  66. <button type="submit" class="btn btn-primary btn-block">Anmelden</button>
  67. </div>
  68. </form>
  69. </li>
  70. </ul>
  71. </li>
  72. {% endif %}
  73. </ul>
  74. </div>
  75. </nav>
  76. <div class="content container">
  77. <div class="row">
  78. <div class="col-md-8">
  79. {% block content %} {% endblock %}
  80. </div>
  81. </div>
  82. </div>
  83. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  84. <script src="{% static 'bootstrap/js/jquery-1.11.1.js' %} "></script>
  85. <script src="{% static 'bootstrap/jsjquery.tagcanvas.min.js' %} " type="text/javascript"></script>
  86. <script src="{% static 'js/app.js' %}"></script>
  87. <script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
  88. </body>
  89. </html>