RuStream 0.0.0-alpha

Rustic API to stream videos from localhost
<!DOCTYPE html>
<!--suppress JSUnresolvedLibraryURL -->
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Rustic video streaming</title>
    <meta property="og:type" content="VideoStreaming">
    <meta name="keywords" content="Rust, streaming, actix, JavaScript, HTML, CSS">
    <meta name="author" content="Vignesh Rao">
    <meta name="image" property="og:image" content="https://thevickypedia.com/img/apple-touch-icon.jpg">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <!-- Disables 404 for favicon.ico which is a logo on top of the webpage tab -->
    <link rel="shortcut icon" href="#">
    <!-- Font Awesome icons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <!-- CSS and JS for night mode -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
    <script type="text/javascript" src="https://rawgit.com/thevickypedia/open-source/main/nightmode/night.js" defer></script>
    <link rel="stylesheet" href="https://rawgit.com/thevickypedia/open-source/main/nightmode/night.css">
    <!-- Button CSS -->
    <style>
        body {
            margin-left: 1%;  /* 1% away from left corner */
            padding: 0.5%  /* 0.5% away from any surrounding elements */
        }
        .home {
            position: absolute;
            top: 3.8%;
            right: 218px;
            border: none;
            padding: 10px 14px;
            font-size: 16px;
            cursor: pointer;
        }
        .back {
            position: absolute;
            top: 3.8%;
            right: 130px;
            border: none;
            padding: 10px 14px;
            font-size: 16px;
            cursor: pointer;
        }
        .logout {
            position: absolute;
            top: 3.8%;
            right: 30px;
            border: none;
            padding: 10px 14px;
            font-size: 16px;
            cursor: pointer;
        }
    </style>
    <!-- Title list CSS -->
    <style>
        a:hover, a:active {font-size: 120%; opacity: 0.7;}
        a:link { color: blue; }
        a:visited { color: blue; }
        ol {
          list-style: none;
          counter-reset: list-counter;
        }
        li {
          counter-increment: list-counter;
          margin: 0.25rem;
        }
        li::before {
          content: counter(list-counter);
          background: #4169E1;
          width: 2rem;
          height: 2rem;
          border-radius: 50%;
          display: inline-block;
          line-height: 2rem;
          color: white;
          text-align: center;
          margin-right: 0.5rem;
        }
        body {
            font-family: 'PT Serif', serif;
        }
    </style>
</head>
<body translate="no">
<div class="toggler fa fa-moon-o"></div>
<br><br>
<h1>Video Streaming via Actix</h1>
<hr>
<button class="home" onclick="goHome()"><i class="fa fa-home"></i> Home</button>
<button class="back" onclick="goBack()"><i class="fa fa-backward"></i> Back</button>
<button class="logout" onclick="logOut()"><i class="fa fa-sign-out"></i> Logout</button>
{% if dir_name or files or directories %}
    {% if dir_name %}
        <h3>{{dir_name}}</h3>
    {% else %}
        <h3>Files</h3>
    {% endif %}
    <ol>
        {% for file in files %}
        <li><a href="{{file.path}}">{{file.name}}</a></li>
        {% endfor %}
    </ol>
    {% if directories %}
    <h3>Directories</h3>
    <ol>
        {% for directory in directories %}
        <li><a href="{{directory.path}}">{{directory.name}}</a></li>
        {% endfor %}
    </ol>
    {% endif %}
{% else %}
    <h3 style="text-align: center">No content was rendered by the server</h3>
{% endif %}
<hr>
<script>
    function logOut() {
        window.location.href = window.location.origin + "/logout";
    }
    function goHome() {
        window.location.href = window.location.origin + "/home";
    }
    function goBack() {
        window.history.back();
    }

</script>
</body>
</html>