您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 h-100">
  28. <header>
  29. <!-- Fixed navbar -->
  30. <nav class="navbar navbar-expand-md navbar-dark sticky-top bg-dark">
  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('main.index') }}" class="nav-link">
  40. Home
  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. {% if current_user.is_authenticated %}
  49. <li class="nav-item">
  50. <a href="{{ url_for('create.create_resource') }}" class="nav-link">
  51. Add resource
  52. </a>
  53. </li>
  54. {% endif %}
  55. {% if current_user.is_authenticated %}
  56. <li class="nav-item">
  57. <a href="{{ url_for('main.profile') }}" class="nav-link">
  58. Profile
  59. </a>
  60. </li>
  61. {% endif %}
  62. {% if not current_user.is_authenticated %}
  63. <li class="nav-item">
  64. <a href="{{ url_for('auth.login') }}" class="nav-link">
  65. Login
  66. </a>
  67. </li>
  68. <li class="nav-item">
  69. <a href="{{ url_for('auth.signup') }}" class="nav-link">
  70. Sign Up
  71. </a>
  72. </li>
  73. {% endif %}
  74. {% if current_user.is_authenticated %}
  75. <li class="nav-item">
  76. <a href="{{ url_for('auth.logout') }}" class="nav-link">
  77. Logout
  78. </a>
  79. </li>
  80. {% endif %}
  81. </ul>
  82. </div>
  83. </div>
  84. </nav>
  85. </header>
  86. <!-- Begin page content -->
  87. <main class="flex-shrink-0">
  88. <div class="container">
  89. {% with messages = get_flashed_messages() %}
  90. {% if messages %}
  91. <div class="alert alert-danger">
  92. {{ messages[0] }}
  93. </div>
  94. {% endif %}
  95. {% endwith %}
  96. {% block content %}
  97. {% endblock %}
  98. </div>
  99. </main>
  100. <footer class="footer py-3 bg-light fixed-bottom">
  101. <div class="container">
  102. <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>
  103. </div>
  104. </footer>
  105. <!-- Optional JavaScript -->
  106. <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  107. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  108. <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
  109. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
  110. </body>
  111. </html>