Skip to content
index.html 8.84 KiB
Newer Older
Davide Ricci's avatar
Davide Ricci committed
<!DOCTYPE html>
Davide Ricci's avatar
Davide Ricci committed
<html lang="en" data-bs-theme="dark">
Davide Ricci's avatar
Davide Ricci committed
<meta charset="utf-8">
  {% block title %}
  {% endblock title %}
</title>
Davide Ricci's avatar
Davide Ricci committed
<script src="/static/js/socket.io.min.js"></script>
Davide Ricci's avatar
Davide Ricci committed
<script src="/static/js/jquery-3.6.0.min.js"></script>
Davide Ricci's avatar
Davide Ricci committed
<!-- <script src="/static/js/jquery-ui.min.js"></script> -->
vertighel's avatar
vertighel committed
<script src="/static/js/bootstrap.bundle.min.js"></script>
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
Davide Ricci's avatar
Davide Ricci committed

Davide Ricci's avatar
Davide Ricci committed
<script  type="text/javascript" >
Davide Ricci's avatar
Davide Ricci committed
  var api_base_url = "{{ ext_base_url|safe }}"
Davide Ricci's avatar
Davide Ricci committed
</script>
<script src="/static/js/ansi_up.js"></script>
Davide Ricci's avatar
Davide Ricci committed
<script src="/static/form-crud.js"></script>
<script src="/static/status-streams.js"></script>
<link href="/static/css/custom.css" rel="stylesheet">
Davide Ricci's avatar
Davide Ricci committed

<!-- favicon for all devices -->
<link rel="shortcut icon" href="/static/favicon/favicon.ico">
<!-- <link rel="apple-touch-icon" sizes="76x76" href="/static/favicon/apple-touch-icon.png"> -->
<!-- <link rel="icon" type="image/png" sizes="32x32" href="/static/favicon/favicon-32x32.png"> -->
<!-- <link rel="icon" type="image/png" sizes="16x16" href="/static/favicon/favicon-16x16.png"> -->
<!-- <link rel="manifest" href="/static/favicon/site.webmanifest"> -->
<!-- <meta name="msapplication-TileColor" content="#da532c"> -->
<!-- <meta name="msapplication-config" content="/static/favicon/browserconfig.xml"> -->
<!-- <meta name="theme-color" content="#cccccc"> -->


Davide Ricci's avatar
Davide Ricci committed

{% block head %}
<!-- add single page head scripts or link tags -->
{% endblock head %}

Davide Ricci's avatar
Davide Ricci committed

<!-- 100% width body in all viewports-->
vertighel's avatar
vertighel committed

Davide Ricci's avatar
Davide Ricci committed
  <header class="row align-items-center custom-header">
    <!-- logo -->
    <div class="col-6 col-sm-3 col-md-2 col-lg-2 col-xl-1 col-xxl-1">
      <a href="/web/home/">
        <img class="rounded d-block img-fluid" src="/static/images/logo.jpg" alt="logo">
    <div class="col col-sm-auto col-md-auto col-lg-auto col-xl col-xxl d-none d-sm-none d-md-none d-lg-none d-xl-block d-xxl-block">
      <nav class="col">
        <a class="btn btn-primary mb-1" role="button" href="/web/init">Init panel</a>
        <a class="btn btn-primary mb-1" role="button" href="/web/control">Control panel</a>
        <a class="btn btn-primary mb-1" role="button" href="/web/blocks">OB editor</a>
        <a class="btn btn-primary mb-1" role="button" href="/web/sequencer">Sequencer</a>
        <a class="btn btn-primary mb-1" role="button" href="/web/display" >Display</a>
        <a class="btn btn-primary mb-1" role="button" href="/web/webcam" >Webcam</a>
    
    <div class="col-2 d-none d-sm-none d-md-none d-lg-none d-xl-block d-xxl-block">
      <h4>Info</h4>
      <nav class="col">
        <small class="d-block" >Web-Client time diff</small>
        <var data-status="timestamp-diff">und</var>
      </nav>
    </div>
    <div class="col-auto d-none d-sm-none d-md-none d-lg-none d-xl-block d-xxl-block">
      <h4>Devel</h4>
      <nav class="col">
        <a class="btn btn-secondary mb-1" role="button" href="/web/environment/" >Meteo</a>
        <a class="btn btn-secondary mb-1" role="button" href="/web/other/button" >Buttons</a>
        <a class="btn btn-secondary mb-1" role="button" href="/web/webgl" >WebGL</a>
    <div class="col-auto d-none d-sm-none d-md-none d-lg-none d-xl-block d-xxl-block">
        <h4>External Resources</h4>
        <nav class="col">
          <a class="btn btn-outline-primary mb-1" role="button" target="_blank" href="/api">API docs</a>
          <a class="btn btn-outline-primary mb-1" role="button" target="_blank" href="http://skycam:Antola@130.251.11.11/skycam/index.php">AllSky zap</a>
          <a class="btn btn-outline-primary mb-1" role="button" target="_blank" href="http://admin:BigBang2021@ipcam.orsa.unige.net:80">Ipcam</a>
          </nav>
    </div>

    <div class="col col-sm col-md col-lg col-xl-2 col-xxl-1 text-end d-block d-sm-block d-md-block d-lg-block d-xl-none d-xxl-none">
      <button class="btn btn-secondary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvas" aria-controls="offcanvas" style="margin-right:15px; padding:25px;">
        MENU
      </button>
    </div>

    <!-- offcanvas menu for mobile and tablet -->
    <div class="offcanvas offcanvas-start zindex-tooltip" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel">
      <div class="offcanvas-header">
        <h5 class="offcanvas-title" id="offcanvasLabel">Menu</h5>
        <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
      </div>
      <div class="offcanvas-body">
        <h4>Stable</h4>
        <nav class="col">
          <a class="btn btn-primary mb-1" role="button" href="/web/init">Init panel</a>
          <a class="btn btn-primary mb-1" role="button" href="/web/control">Control panel</a>
          <a class="btn btn-primary mb-1" role="button" href="/web/blocks">OB editor</a>
          <a class="btn btn-primary mb-1" role="button" href="/web/sequencer">Sequencer</a>
          <a class="btn btn-primary mb-1" role="button" href="/web/display" >Display</a>
          <a class="btn btn-primary mb-1" role="button" href="/web/webcam" >Webcam</a>
        </nav>
        
        <h4>Devel</h4>
        <nav class="col">
          <a class="btn btn-secondary mb-1" role="button" href="/web/environment/" >Meteo</a>
          <a class="btn btn-secondary mb-1" role="button" href="/web/other/button" >Buttons</a>
          <a class="btn btn-secondary mb-1" role="button" href="/web/webgl" >WebGL</a>
        </nav>
        
        <h4>External Resources</h4>
        <nav class="col">
          <a class="btn btn-outline-primary mb-1" role="button" target="_blank" href="/api">API docs</a>
          <a class="btn btn-outline-primary mb-1" role="button" target="_blank" href="http://skycam:Antola@130.251.11.11/skycam/index.php">AllSky zap</a>
          <a class="btn btn-outline-primary mb-1" role="button" target="_blank" href="http://admin:BigBang2021@ipcam.orsa.unige.net:80">Ipcam</a>
  </header>

  {% endblock header %}

  <main>
    {% block content %}

    <div class="row">
    </div>
    {% endblock content%}
    <hr style="height:50px;visibility:hidden">
  </main>

antola's avatar
antola committed
  {% block footer %}
  <footer id="footer" class="fixed-bottom mx-2 overflow-hidden logbar">
Davide Ricci's avatar
Davide Ricci committed
    <div class="expand-button" id="dragbar"></div>
Davide Ricci's avatar
Davide Ricci committed
    <figure class="card h-100 border rounded">
      <figcaption class="card-header">
Davide Ricci's avatar
Davide Ricci committed
        <div class="log-level-checkbox">
          <label for="DEBUG"><input type="checkbox" id="DEBUG" value="DEBUG">DEBUG</label>
        </div>
        <div class="log-level-checkbox">
          <label for="INFO"><input type="checkbox" id="INFO" value="INFO">INFO</label>
        </div>
        <div class="log-level-checkbox">
          <label for="WARNING"><input type="checkbox" id="WARNING" value="WARNING">WARNING</label>
        </div>
        <div class="log-level-checkbox">
          <label for="ERROR"><input type="checkbox" id="ERROR" value="ERROR">ERROR</label>
        </div>
        <button class="btn btn-primary btn-sm float-end" onclick="$('#stream-output').html('')">Clear</button>
      </figcaption>
      <div class="card-body p-0 m-0 overflow-hidden">
        <pre class="ms-3 me-3 list-group h-100 list-group-flush rounded-0">
          <code class="h-100 scrollable overflow-auto"
                id="stream-output"
                style="display:flex; flex-direction:column-reverse;">
Davide Ricci's avatar
Davide Ricci committed
                Log text
vertighel's avatar
vertighel committed
      </div>
vertighel's avatar
vertighel committed
  </footer>
antola's avatar
antola committed
  {% endblock footer %}
Davide Ricci's avatar
Davide Ricci committed
    var level_checkboxes = $('#DEBUG, #INFO, #WARNING, #ERROR');
    level_checkboxes.prop('checked', true);
Davide Ricci's avatar
Davide Ricci committed
    level_checkboxes.change(function(){
        var id = $(this).attr('id');
        var class_id = id + '-level-line';
        if(this.checked) {
            $('style').text($('style').text() + '.'+class_id+'{display:block;}');
        } else {
            $('style').text($('style').text() + '.'+class_id+'{display:none;}');
        }
Davide Ricci's avatar
Davide Ricci committed
    });
Davide Ricci's avatar
Davide Ricci committed
    $(document).ready(function() {
        var dragging = false;
        var footer = $('#footer');
        var handle = $('.expand-button');
        var startY, startHeight;
        
        handle.mousedown(function(e) {
            e.preventDefault();
            startY = e.pageY;
            startHeight = footer.height();
            dragging = true;
        });
        
        $(document).mouseup(function(e) {
            dragging = false;
        });
        
        $(document).mousemove(function(e) {
            if (dragging) {
                var newHeight = startHeight - (e.pageY - startY);
                footer.height(newHeight);
            }
        });
Davide Ricci's avatar
Davide Ricci committed
    });
<script src="/static/form-actions.js"></script>