Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

158 lines
6.6KB

  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>ExPub Compendium</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. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.14.0-beta2/css/bootstrap-select.min.css" integrity="sha512-mR/b5Y7FRsKqrYZou7uysnOdCIJib/7r5QeJMFvLNHNhtye3xJp1TdJVPLtetkukFn227nKpXD9OjUc09lx97Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  25. </head>
  26. <body class="d-flex flex-column min-vh-100">
  27. <header>
  28. <!-- Fixed navbar -->
  29. <nav class="navbar navbar-expand-md navbar-light sticky-top">
  30. <div class="container-fluid">
  31. <a class="navbar-brand" href="{{ url_for('main.index')}}">ExPub Compendium</a>
  32. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  33. <span class="navbar-toggler-icon"></span>
  34. </button>
  35. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  36. <ul class="navbar-nav">
  37. <li class="nav-item">
  38. <a href="{{ url_for('tool.get_tools') }}" class="nav-link">
  39. Tools
  40. </a>
  41. </li>
  42. <li class="nav-item">
  43. <a href="{{ url_for('practice.get_practices') }}" class="nav-link">
  44. Practices
  45. </a>
  46. </li>
  47. <li class="nav-item">
  48. <a href="{{ url_for('sensitivity.get_sensitivities') }}" class="nav-link">
  49. Sensitivities
  50. </a>
  51. </li>
  52. <li class="nav-item">
  53. <a href="{{ url_for('typology.get_typologies') }}" class="nav-link">
  54. Typologies
  55. </a>
  56. </li>
  57. <li class="nav-item">
  58. <a href="{{ url_for('workflow.get_workflows') }}" class="nav-link">
  59. Workflows
  60. </a>
  61. </li>
  62. <li class="nav-item">
  63. <a href="{{ url_for('publisher.get_publishers') }}" class="nav-link">
  64. Publishers
  65. </a>
  66. </li>
  67. <li class="nav-item">
  68. <a href="{{ url_for('book.get_books') }}" class="nav-link">
  69. Books
  70. </a>
  71. </li>
  72. <li class="nav-item">
  73. <a href="{{ url_for('reference.get_references') }}" class="nav-link">
  74. References
  75. </a>
  76. </li>
  77. {% if current_user.is_authenticated %}
  78. <li class="nav-item">
  79. <a href="{{ url_for('create.create_resource') }}" class="nav-link">
  80. Add resource
  81. </a>
  82. </li>
  83. {% endif %}
  84. {% if current_user.is_authenticated %}
  85. <li class="nav-item">
  86. <a href="{{ url_for('main.profile') }}" class="nav-link">
  87. Profile
  88. </a>
  89. </li>
  90. {% endif %}
  91. {% if not current_user.is_authenticated %}
  92. <li class="nav-item">
  93. <a href="{{ url_for('auth.login') }}" class="nav-link">
  94. Login
  95. </a>
  96. </li>
  97. <li class="nav-item">
  98. <a href="{{ url_for('auth.signup') }}" class="nav-link">
  99. Sign Up
  100. </a>
  101. </li>
  102. {% endif %}
  103. {% if current_user.is_authenticated %}
  104. <li class="nav-item">
  105. <a href="{{ url_for('auth.logout') }}" class="nav-link">
  106. Logout
  107. </a>
  108. </li>
  109. {% endif %}
  110. <li class="nav-item">
  111. <a href="{{ url_for('main.test') }}" class="nav-link">
  112. Test
  113. </a>
  114. </li>
  115. </ul>
  116. </div>
  117. </div>
  118. </nav>
  119. </header>
  120. <!-- Begin page content -->
  121. <main class="flex-shrink-0">
  122. <div class="layer-bg w-100">
  123. <img class="img-fluid w-100" src="{{ url_for('static',filename='images/dots-bg.png') }}" alt="bg-shape">
  124. </div>
  125. <div class="container">
  126. {% with messages = get_flashed_messages() %}
  127. {% if messages %}
  128. <div class="alert alert-danger">
  129. {{ messages[0] }}
  130. </div>
  131. {% endif %}
  132. {% endwith %}
  133. {% block content %}
  134. {% endblock %}
  135. </div>
  136. </main>
  137. <!-- Sticky footer-->
  138. <footer class="footer py-3 mt-auto" style="background-color: #dcddde;">
  139. <div class="container">
  140. <span class="text-muted">© 2022–{{ moment().format('YYYY') }} <a href="https://copim.ac.uk/">COPIM</a> and licensed under a <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License (CC BY 4.0)</a>.</span>
  141. </div>
  142. </footer>
  143. <!-- JavaScript -->
  144. <!-- jQuery first, then Popper JS, then Bootstrap JS -->
  145. <script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
  146. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
  147. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.14.0-beta2/js/bootstrap-select.min.js" integrity="sha512-FHZVRMUW9FsXobt+ONiix6Z0tIkxvQfxtCSirkKc5Sb4TKHmqq1dZa8DphF0XqKb3ldLu/wgMa8mT6uXiLlRlw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  148. <script src="{{ url_for('static',filename='js/main.js') }}"></script>
  149. </body>
  150. </html>