Solutions for MEIM
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 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <!-- Required meta tags -->
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <!-- Bootstrap CSS -->
  8. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
  9. <title>{% block title %} {% endblock %}</title>
  10. </head>
  11. <body>
  12. <nav class="navbar navbar-expand-lg navbar-light bg-light">
  13. <a class="navbar-brand">MEIM</a>
  14. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
  15. <span class="navbar-toggler-icon"></span>
  16. </button>
  17. <div class="collapse navbar-collapse" id="navbarNav">
  18. <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
  19. <li class="nav-item active">
  20. <a class="nav-link" href="/posts">Posts</a>
  21. </li>
  22. <li class="nav-item">
  23. <a class="nav-link" href="https://www.th-nuernberg.de/fakultaeten/efi/">Efi</a>
  24. </li>
  25. <li class="nav-item">
  26. <a class="nav-link" href="https://www.google.com/">Google</a>
  27. </li>
  28. </ul>
  29. <ul class="navbar-nav">
  30. {% if request.user.is_authenticated %}
  31. <span class="navbar-text"> Willkommen {{ request.user.username }}! </span>
  32. <li class="nav-item">
  33. <a class="nav-link" href="{% url 'logout' %}?next=/posts">Abmelden</a>
  34. </li>
  35. {% else %}
  36. <li class="nav-item">
  37. <a class="nav-link" href="{% url 'login' %}?next=/posts">Anmelden</a>
  38. </li>
  39. {% endif %}
  40. </ul>
  41. </div>
  42. </nav>
  43. {% block content %} {% endblock %}
  44. <!-- Optional JavaScript -->
  45. <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  46. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  47. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
  48. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  49. </body>
  50. </html>