|
- <!--
- # @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 bg-dark">
- <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>
- {% 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 %}
- </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 bg-light mt-auto">
- <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/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
- <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>
- <script>
- $("#resource_type").change(function() {
- var resource_type = $(this).val();
- $(".resource_type_input").hide("fast", function() {
- $("#resource_type_" + resource_type).show("slow");
- });
- });
- </script>
- </body>
-
- </html>
|