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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. <link href="{% static 'css/signin.css' %}" rel="stylesheet">
  11. </head>
  12. <body>
  13. <!-- Navigation -->
  14. <nav id="navbar-efi" class="navbar navbar-expand-lg navbar-light">
  15. <a class="navbar-brand" href="#">
  16. <img src="{% static 'images/efi.jpg' %}" width="35" height="35" alt="efi">
  17. </a>
  18. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
  19. aria-expanded="false" aria-label="Toggle navigation">
  20. <span class="navbar-toggler-icon"></span>
  21. </button>
  22. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  23. <ul class="navbar-nav mr-auto">
  24. {% if user.is_superuser %}
  25. <li class="nav-item">
  26. <a class="nav-link" href="{% url 'admin:index' %}">Administration</a>
  27. </li>
  28. {% elif user.is_staff %}
  29. <li class="nav-item">
  30. <a class="nav-link" href="{% url 'logout' %}">Administration</a>
  31. </li>
  32. {% else %}
  33. <li class="nav-item">
  34. <a class="nav-link" href="{% url 'student_page' %}">My Page</a>
  35. </li>
  36. {% endif %}
  37. </ul>
  38. <ul class="nav navbar-nav navbar-right">
  39. {% if user.is_authenticated %}
  40. <li class="nav-item">
  41. <a class="nav-link disabled" href="#">{{ user.first_name }} {{ user.last_name }}</a>
  42. </li>
  43. <li class="nav-item">
  44. <a class="nav-link" href="{% url 'logout' %}?next={{ LOGOUT_REDIRECT_URL }}">Abmelden</a>
  45. </li>
  46. {% else %}
  47. <li class="dropdown">
  48. <a id="login-button" href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
  49. Anmelden
  50. <span class="caret"></span>
  51. </a>
  52. <ul id="login-dp" class="dropdown-menu">
  53. <li>
  54. <form class="form" role="form" method="post" action="{% url 'login' %}" accept-charset="UTF-8" id="login-nav">
  55. {% csrf_token %} {% if next %}
  56. <input type="hidden" name="next" value="{{ next }}" /> {% 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/bootstrap.bundle.js' %}"></script>
  85. </body>
  86. </html>