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

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