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.2KB

3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. <!-- Google font -->
  25. <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700&display=swap" rel='stylesheet' type='text/css'>
  26. </head>
  27. <body class="d-flex flex-column min-vh-100">
  28. <header>
  29. <!-- Fixed navbar -->
  30. <nav class="navbar navbar-expand-md navbar-light sticky-top">
  31. <div class="container-fluid">
  32. <a class="navbar-brand" href="{{ url_for('main.index')}}">COPIM online toolkit</a>
  33. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  34. <span class="navbar-toggler-icon"></span>
  35. </button>
  36. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  37. <ul class="navbar-nav">
  38. <li class="nav-item">
  39. <a href="{{ url_for('example.get_examples') }}" class="nav-link">
  40. Books
  41. </a>
  42. </li>
  43. <li class="nav-item">
  44. <a href="{{ url_for('tool.get_tools') }}" class="nav-link">
  45. Tools
  46. </a>
  47. </li>
  48. <li class="nav-item">
  49. <a href="{{ url_for('practice.get_practices') }}" class="nav-link">
  50. Practices
  51. </a>
  52. </li>
  53. <li class="nav-item">
  54. <a href="{{ url_for('main.index') }}" class="nav-link">
  55. Sensitivities
  56. </a>
  57. </li>
  58. <li class="nav-item">
  59. <a href="{{ url_for('main.index') }}" class="nav-link">
  60. Publishers
  61. </a>
  62. </li>
  63. {% if current_user.is_authenticated %}
  64. <li class="nav-item">
  65. <a href="{{ url_for('create.create_resource') }}" class="nav-link">
  66. Add resource
  67. </a>
  68. </li>
  69. {% endif %}
  70. {% if current_user.is_authenticated %}
  71. <li class="nav-item">
  72. <a href="{{ url_for('main.profile') }}" class="nav-link">
  73. Profile
  74. </a>
  75. </li>
  76. {% endif %}
  77. {% if not current_user.is_authenticated %}
  78. <li class="nav-item">
  79. <a href="{{ url_for('auth.login') }}" class="nav-link">
  80. Login
  81. </a>
  82. </li>
  83. <li class="nav-item">
  84. <a href="{{ url_for('auth.signup') }}" class="nav-link">
  85. Sign Up
  86. </a>
  87. </li>
  88. {% endif %}
  89. {% if current_user.is_authenticated %}
  90. <li class="nav-item">
  91. <a href="{{ url_for('auth.logout') }}" class="nav-link">
  92. Logout
  93. </a>
  94. </li>
  95. {% endif %}
  96. <li class="nav-item">
  97. <a href="{{ url_for('main.test') }}" class="nav-link">
  98. Test
  99. </a>
  100. </li>
  101. </ul>
  102. </div>
  103. </div>
  104. </nav>
  105. </header>
  106. <!-- Begin page content -->
  107. <main class="flex-shrink-0">
  108. <div class="container">
  109. {% with messages = get_flashed_messages() %}
  110. {% if messages %}
  111. <div class="alert alert-danger">
  112. {{ messages[0] }}
  113. </div>
  114. {% endif %}
  115. {% endwith %}
  116. {% block content %}
  117. {% endblock %}
  118. </div>
  119. </main>
  120. <!-- Sticky footer-->
  121. <footer class="footer py-3 mt-auto" style="background-color: #dcddde;">
  122. <div class="container">
  123. <span class="text-muted">© {{ 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>
  124. </div>
  125. </footer>
  126. <!-- JavaScript -->
  127. <!-- jQuery first, then Popper JS, then Bootstrap JS -->
  128. <script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
  129. <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>
  130. <script>
  131. $("#resource_type").change(function() {
  132. var resource_type = $(this).val();
  133. $(".resource_type_input").hide("fast", function() {
  134. $("#resource_type_" + resource_type).show("slow");
  135. });
  136. });
  137. </script>
  138. <script>
  139. // Initialize tooltips
  140. var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
  141. var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
  142. return new bootstrap.Tooltip(tooltipTriggerEl)
  143. })
  144. </script>
  145. <script>
  146. var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
  147. var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
  148. return new bootstrap.Popover(popoverTriggerEl)
  149. })
  150. </script>
  151. </body>
  152. </html>