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

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