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.

83 lines
3.3KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>COPIM online toolkit</title>
  8. <!-- Bootstrap CSS -->
  9. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  10. </head>
  11. <body>
  12. <nav class="navbar navbar-expand-md navbar-light bg-light">
  13. <a class="navbar-brand" href="{{ url_for('main.index')}}">COPIM online toolkit</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">
  19. <li class="nav-item">
  20. <a href="{{ url_for('main.index') }}" class="nav-link">
  21. Home
  22. </a>
  23. </li>
  24. {% if current_user.is_authenticated %}
  25. <li class="nav-item">
  26. <a href="{{ url_for('tool.create') }}" class="nav-link">
  27. Add tool
  28. </a>
  29. </li>
  30. {% endif %}
  31. {% if current_user.is_authenticated %}
  32. <li class="nav-item">
  33. <a href="{{ url_for('main.profile') }}" class="nav-link">
  34. Profile
  35. </a>
  36. </li>
  37. {% endif %}
  38. {% if not current_user.is_authenticated %}
  39. <li class="nav-item">
  40. <a href="{{ url_for('auth.login') }}" class="nav-link">
  41. Login
  42. </a>
  43. </li>
  44. <li class="nav-item">
  45. <a href="{{ url_for('auth.signup') }}" class="nav-link">
  46. Sign Up
  47. </a>
  48. </li>
  49. {% endif %}
  50. {% if current_user.is_authenticated %}
  51. <li class="nav-item">
  52. <a href="{{ url_for('auth.logout') }}" class="nav-link">
  53. Logout
  54. </a>
  55. </li>
  56. {% endif %}
  57. </ul>
  58. </div>
  59. </nav>
  60. <div class="container">
  61. {% with messages = get_flashed_messages() %}
  62. {% if messages %}
  63. <div class="alert alert-danger">
  64. {{ messages[0] }}
  65. </div>
  66. {% endif %}
  67. {% endwith %}
  68. {% block content %}
  69. {% endblock %}
  70. </div>
  71. <!-- Optional JavaScript -->
  72. <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  73. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  74. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  75. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  76. </body>
  77. </html>