|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <!--
- # @name: base.html
- # @version: 0.1
- # @creation_date: 2021-10-20
- # @license: The MIT License <https://opensource.org/licenses/MIT>
- # @author: Simon Bowie <ad7588@coventry.ac.uk>
- # @purpose: Basic layout for all pages
- # @acknowledgements:
- # https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3
- # Bootstrap 5.1.3: https://getbootstrap.com/
- # Flask-Moment: https://flask-moment.readthedocs.io/en/latest/
- -->
-
- <!DOCTYPE html>
- <html>
-
- <head>
- {{ moment.include_moment() }}
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>COPIM online toolkit</title>
- <!-- Bootstrap CSS -->
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
- <link href="{{ url_for('static',filename='styles/custom.css') }}" rel="stylesheet">
- <!-- Google font -->
- <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700&display=swap" rel='stylesheet' type='text/css'>
- </head>
-
- <body class="d-flex flex-column min-vh-100">
-
- <header>
- <!-- Fixed navbar -->
- <nav class="navbar navbar-expand-md navbar-dark sticky-top" style="background-color: #F68210;">
- <div class="container-fluid">
- <a class="navbar-brand" href="{{ url_for('main.index')}}">COPIM online toolkit</a>
- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
- <ul class="navbar-nav">
- <li class="nav-item">
- <a href="{{ url_for('main.index') }}" class="nav-link">
- Home
- </a>
- </li>
- <li class="nav-item">
- <a href="{{ url_for('tool.get_tools') }}" class="nav-link">
- Tools
- </a>
- </li>
- <li class="nav-item">
- <a href="{{ url_for('example.get_examples') }}" class="nav-link">
- Examples
- </a>
- </li>
- <li class="nav-item">
- <a href="{{ url_for('practice.get_practices') }}" class="nav-link">
- Practices
- </a>
- </li>
- {% if current_user.is_authenticated %}
- <li class="nav-item">
- <a href="{{ url_for('create.create_resource') }}" class="nav-link">
- Add resource
- </a>
- </li>
- {% endif %}
- {% if current_user.is_authenticated %}
- <li class="nav-item">
- <a href="{{ url_for('main.profile') }}" class="nav-link">
- Profile
- </a>
- </li>
- {% endif %}
- {% if not current_user.is_authenticated %}
- <li class="nav-item">
- <a href="{{ url_for('auth.login') }}" class="nav-link">
- Login
- </a>
- </li>
- <li class="nav-item">
- <a href="{{ url_for('auth.signup') }}" class="nav-link">
- Sign Up
- </a>
- </li>
- {% endif %}
- {% if current_user.is_authenticated %}
- <li class="nav-item">
- <a href="{{ url_for('auth.logout') }}" class="nav-link">
- Logout
- </a>
- </li>
- {% endif %}
- <li class="nav-item">
- <a href="{{ url_for('main.test') }}" class="nav-link">
- Test
- </a>
- </li>
- </ul>
- </div>
- </div>
- </nav>
- </header>
-
- <!-- Begin page content -->
- <main class="flex-shrink-0">
- <div class="container">
- {% with messages = get_flashed_messages() %}
- {% if messages %}
- <div class="alert alert-danger">
- {{ messages[0] }}
- </div>
- {% endif %}
- {% endwith %}
- {% block content %}
- {% endblock %}
- </div>
- </main>
-
- <!-- Sticky footer-->
- <footer class="footer py-3 mt-auto" style="background-color: #fae5c5;">
- <div class="container">
- <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>
- </div>
- </footer>
- <!-- JavaScript -->
- <!-- jQuery first, then Popper JS, then Bootstrap JS -->
- <script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
- <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>
- <script>
- $("#resource_type").change(function() {
- var resource_type = $(this).val();
- $(".resource_type_input").hide("fast", function() {
- $("#resource_type_" + resource_type).show("slow");
- });
- });
- </script>
- <script>
- // Initialize tooltips
- var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
- var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
- return new bootstrap.Tooltip(tooltipTriggerEl)
- })
- </script>
-
- <script>
- var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
- var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
- return new bootstrap.Popover(popoverTriggerEl)
- })
- </script>
- </body>
-
- </html>
|