index.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="apple-mobile-web-app-capable" content="yes" />
  5. <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
  6. <meta charset="UTF-8">
  7. <meta name="theme-color" content="#4b75ff">
  8. <link rel="stylesheet" href="../script/semantic/semantic.min.css">
  9. <script src="../script/jquery.min.js"></script>
  10. <script src="../script/ao_module.js"></script>
  11. <script src="../script/semantic/semantic.min.js"></script>
  12. <title>PyServer</title>
  13. <style>
  14. body{
  15. background-color:white;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <br><br>
  21. <div class="ui container">
  22. <h2>Hello World!</h2>
  23. <p>This is a Python written web server running inside ArozOS</p>
  24. <p>Your Desktop folder path on the disk is: <span id="desktopPath">Loading...</span></p>
  25. <p>For CSS Examples, see <a href="https://semantic-ui.com/">https://semantic-ui.com/</a></p>
  26. <button class="ui blue button" onclick="openDesktop()"><i class="folder open icon"></i> Open Desktop</button>
  27. </div>
  28. <script>
  29. //See arozos/web/script/ao_module.js for more floatWindow APIs
  30. ao_module_setWindowTitle("PyServer - Example");
  31. function openDesktop(){
  32. ao_module_openPath("user:/Desktop/");
  33. }
  34. //This will request the /api endpoint from the Python Server
  35. setTimeout(function(){
  36. $.get("./api", function(data){
  37. $("#desktopPath").text(data);
  38. })
  39. }, 1000);
  40. </script>
  41. </body>
  42. </html>