<!--
/* Copyright (C) 2019 Intel Corporation.  All rights reserved.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 */
-->

{% load static %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0,shrink-to-fit=no">
    <title> Wasm-Micro-Runtime </title>
    <link rel="stylesheet" type="text/css" href="{%static 'css/application.css'%}"/> 
    
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>

<body  style="background-image: linear-gradient(to right, rgb(248, 248, 248) , rgb(194, 194, 190))">
                				
<div id="container" style="background-image: url('{%static 'photo//totalblack.png'%}')">
    <div id="content">
        <div id= "mainnav">
            <ul>
                <li ><a href="https://github.com/intel/wasm-micro-runtime">GitHub</a></li>
                <li ><a href="/">Devices</a></li>
                <li ><a href="/appstore/">App Store</a></li>
                <li ><a href="/help/">Help</a></li>
            </ul>  
        </div>
    </div>
    <div class="headers" style="background-image: url('{%static 'photo/milky-way-2695569_1280.jpg'%}')">
        <h1 id="maintitle">WebAssembly Micro Runtime - APP Store Demo</h1>
    </div>
</div>
					

    
<div class="row">
        <div class="col-sm-2 col-md-2 col-lg-2 col-xl-2"></div>
        <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8" id="section">
            <div id="photo"> 
            <p>
                <img src="{%static 'photo/net_device.png'%}" ;height="65" width="65" />
            </p>
            </div>
            <div id="IPs">IP : </div>
            <div id="ports">Port : </div>
            <div id="installs">Installed apps : </div>
        </div>
        <div class="col-sm-2 col-md-2 col-lg-2 col-xl-2"></div>
</div>

    <div class="middlebox" style="display:none;">
        <div class="warning">Dialog Box</div>
        <div class="findapp"> APP </div>
        <button class="surebtn" type="button" value="sure">OK</button>
    </div>

    <div class="deletebox" style="display:none;">
            <div class="warning2">Dialog Box</div>
            <div class="findapp"> APP </div>
            <button class="suresbtn" type="button" value="sure">OK</button>
            <button class="cancelsbtn" type="button" value="Cancel">Cancel</button>
    </div>

    <div id="loading">
        <p class="loadapp"> app is downloading now </p>
        <div id="preloader">
            <div id="loader"></div>
        </div>
    </div>

    
<div class="main">
    <div class="mainbox">
        <div class= "close"> × </div>
        <div class="hotapps">HOT Applications</div>
        <div class="col-sm-6" id="searchbar">
                <form method="post" action="/apps/" id="form_addServiceInfoAll">
                    {% csrf_token %}
                    <div class="input-group">
                        <input type="text" name="mykey" class="form-control" placeholder="Input the product name" required />
                        <input type="hidden" name="voip" id="aa" value="">
                        <input type="hidden" name="voport" id="bb" value="">
                        <span class="input-group-btn">
                            <input type="submit" class="btn btn-default" value="Search" />
                        </span>
                    </div>
                </form>
        </div>
        <div id="scrollba">
            <div id="Dapplications">
                <div id="appslogo" style="width:45px; height:25px; float:left; "><img src="{%static 'photo/application.png'%}" ;height="35" width="35" /></div> 
                <p id="appsinfo1" style="font-size:15px;font-family:'sansationlight';width:310px; height:25px; float:left; ">    Product Name:   </p>
                <p id="appsinfo2" style="font-size:15px;font-family:'sansationlight';width:120px; height:25px; float:left; ">    Current Version:   </p>
                <button class="mybtn2" type="button" onclick="getthis(this)" value="downloadit"> ↓ Install</button>
            </div>
        </div>
    </div>
</div>


    <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8" id="download">
            <p class = "explain pull-left" >List of Installed Apps:</p>
            <button id="btn" class="btn btn-outline-primary pull-right" style="float:right" type="button" value="add">Install Application</button>
    </div>


    <div id="APPS" class="sourceapp">
        <div id="applications">
            <div id="applogo"><img src="{%static 'photo/app(1).png'%}" ;height="35" width="35" /></div>
            <div id="appinfo1"> Product Name: </div>
            <div id="appinfo2"> Staus: </div>
            <div id="appinfo3"> Current Version: </div>
        </div>
        <div id="delete" ><img class="mybtn" style="cursor:pointer" src="{%static 'photo/delete.png'%}" ;height="35" width="35" /></div> 
    </div>

<footer class="footer">  Copyright&copy; intel.com</footer>
                    


<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
var alist = {{alist|safe}}; /*alist is a list of downloaded apps under the current device*/
var dlist = {{dlist|safe}}; /*dlist saves the device info that includes its IP, Port and number of apps*/
var llist = {{llist|safe}}; /*llist is a list of apps avaliable for installing that are synchronously updated with appstore*/
var open_status ={{open_status|safe}};/*check is the search bar working&searching,otherwise, close window and return to the main page*/
var search_node ={{search_node|safe}};/*THe queried app node*/
</script>
<script type="text/javascript" src="{%static 'js/application.js'%}"></script>

</body>				

</html>

