<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
    <link id="favicon" rel="icon" type="image/x-icon" href="{{ web_root }}/static/favicon.ico">
    <link rel="apple-touch-icon" sizes="1024x1024" href="{{ web_root }}/static/apple-touch-icon.png">
    <link rel="shortcut icon" href="{{web_root}}/static/favicon.ico">
    <title>Simons Observatory Post Office</title>
  </head>
  <style>
    h1 {
      font-size: 1.7rem;
    }
    h2 {
      font-size: 1.4rem;
    }
    h3 {
      font-size: 1.25rem;
    }
    h4 {
      font-size: 1.125rem;
    }
    h5 {
      font-size: 1rem;
    }
    h6 {
      font-size: 0.9rem;
    }
    .jump-to-top {
      display: none;
      opacity: 0.3;
    }
    .jump-to-top:hover {
      opacity: 0.6;
    }
    html {
      height: 100%;
    }
  </style>
  <script>
    function debounce(method, delay) {
      clearTimeout(method._tId);
      method._tId = setTimeout(function(){
          method();
      }, delay);
    }
    function jumpToTop() {
      window.scroll(window.scrollX, 0);
    }
    function onScroll() {
      if (window.scrollY > 100) {
        document.querySelector('.jump-to-top').style.display = 'block';
      } else {
        document.querySelector('.jump-to-top').style.display = 'none';
      }
    }
    function noop(e) {
        e.preventDefault()
    }
  </script>
  <body class="position-relative small h-100 bg-light" onscroll="debounce(onScroll, 100)">
    {% include "navigation.html" %}
    {% block content %}{% endblock %}
    <button
      class="btn btn-outline-secondary jump-to-top px-2 py-0 position-fixed end-0 bottom-0 mb-3 mx-3 fs-5"
      title="Go back to the top of the page"
      onclick="jumpToTop()"
    >
      &#x21E7;
    </button>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
    {% block scripts %}{% endblock %}
  </body>
</html>