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.

пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!--
  2. # @name: base.html
  3. # @version: 0.1
  4. # @creation_date: 2021-10-20
  5. # @license: The MIT License <https://opensource.org/licenses/MIT>
  6. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  7. # @purpose: Basic layout for all pages
  8. # @acknowledgements:
  9. # https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3
  10. # Bootstrap 5.1.3: https://getbootstrap.com/
  11. # Flask-Moment: https://flask-moment.readthedocs.io/en/latest/
  12. -->
  13. <!DOCTYPE html>
  14. <html>
  15. <head>
  16. {{ moment.include_moment() }}
  17. <meta charset="utf-8">
  18. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  19. <meta name="viewport" content="width=device-width, initial-scale=1">
  20. <title>COPIM online toolkit</title>
  21. <!-- Bootstrap CSS -->
  22. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  23. <link href="{{ url_for('static',filename='styles/custom.css') }}" rel="stylesheet">
  24. </head>
  25. <body class="d-flex flex-column h-100">
  26. <header>
  27. <!-- Fixed navbar -->
  28. <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
  29. <div class="container-fluid">
  30. <a class="navbar-brand" href="{{ url_for('main.index')}}">COPIM online toolkit</a>
  31. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
  32. <span class="navbar-toggler-icon"></span>
  33. </button>
  34. <div class="collapse navbar-collapse" id="navbarNav">
  35. <ul class="navbar-nav">
  36. <li class="nav-item">
  37. <a href="{{ url_for('main.index') }}" class="nav-link">
  38. Home
  39. </a>
  40. </li>
  41. <li class="nav-item">
  42. <a href="{{ url_for('tool.get_tools') }}" class="nav-link">
  43. Tools
  44. </a>
  45. </li>
  46. {% if current_user.is_authenticated %}
  47. <li class="nav-item">
  48. <a href="{{ url_for('create.create_resource') }}" class="nav-link">
  49. Add resource
  50. </a>
  51. </li>
  52. {% endif %}
  53. {% if current_user.is_authenticated %}
  54. <li class="nav-item">
  55. <a href="{{ url_for('main.profile') }}" class="nav-link">
  56. Profile
  57. </a>
  58. </li>
  59. {% endif %}
  60. {% if not current_user.is_authenticated %}
  61. <li class="nav-item">
  62. <a href="{{ url_for('auth.login') }}" class="nav-link">
  63. Login
  64. </a>
  65. </li>
  66. <li class="nav-item">
  67. <a href="{{ url_for('auth.signup') }}" class="nav-link">
  68. Sign Up
  69. </a>
  70. </li>
  71. {% endif %}
  72. {% if current_user.is_authenticated %}
  73. <li class="nav-item">
  74. <a href="{{ url_for('auth.logout') }}" class="nav-link">
  75. Logout
  76. </a>
  77. </li>
  78. {% endif %}
  79. </ul>
  80. </div>
  81. </div>
  82. </nav>
  83. </header>
  84. <!-- Begin page content -->
  85. <main class="flex-shrink-0">
  86. <div class="container">
  87. {% with messages = get_flashed_messages() %}
  88. {% if messages %}
  89. <div class="alert alert-danger">
  90. {{ messages[0] }}
  91. </div>
  92. {% endif %}
  93. {% endwith %}
  94. {% block content %}
  95. {% endblock %}
  96. </div>
  97. </main>
  98. <footer class="footer mt-auto py-3 bg-light fixed-bottom">
  99. <div class="container">
  100. <span class="text-muted">© {{ moment().format('YYYY') }} COPIM and licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0).</span>
  101. </div>
  102. </footer>
  103. <!-- Optional JavaScript -->
  104. <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  105. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  106. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  107. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  108. </body>
  109. </html>