Unspaghettification

This commit is contained in:
Innovation Inc 2019-12-13 22:16:24 -06:00 committed by GitHub
parent 30594ef6de
commit 01052bb2bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,165 +1,163 @@
<html> <html>
<head> <head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>--> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<!--<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>--> <!-- classes were from SparrOS Developer Team -->
<script src="https://raw.githubusercontent.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js"/> <title>DremJS</title>
<!-- classes were from SparrOS Developer Team -->
<title>DremJS</title>
<!--<embed src="mopen.mp3" width="0" height="0" loop="false" autostart="true" hidden="true" /> <!--<embed src="mopen.mp3" width="0" height="0" loop="false" autostart="true" hidden="true" />
<audio loop autoplay> <audio loop autoplay>
Aw fiddle sticks. What now? (ERROR: 1040-0001) Aw fiddle sticks. What now? (ERROR: 1040-0001)
Your browser doesn't support the AUDIO tag! Get a newer browser or update it Your browser doesn't support the AUDIO tag! Get a newer browser or update it
<source src="ambient.mp3" type="audio/mp3"> <source src="ambient.mp3" type="audio/mp3">
</audio>--> </audio>-->
<style> <style>
.framewrap { .framewrap {
width:500px; width:500px;
height:300px; height:300px;
padding:10px; padding:10px;
position: fixed; position: fixed;
top: 50px; top: 50px;
left: 10px; left: 10px;
background-color:#87CEEB; background-color:#87CEEB;
} }
.appFrame { .appFrame {
width:99%; width:99%;
height:93%; height:93%;
background-color:#FFFFFF; background-color:#FFFFFF;
} }
.start { .start {
position: absolute; position: absolute;
left: 0px; left: 0px;
bottom: 0px; bottom: 0px;
} }
.astart { .astart {
position: absolute; position: absolute;
left: 0px; left: 0px;
bottom: 50px; bottom: 50px;
} }
.cwhite { .cwhite {
color: white; color: white;
} }
.br1 { .br1 {
position: absolute; position: absolute;
bottom: 8px; bottom: 8px;
right: 16px; right: 16px;
font-size: 12px; font-size: 12px;
} }
.br2 { .br2 {
position: absolute; position: absolute;
bottom: 22px; bottom: 22px;
right: 16px; right: 16px;
font-size: 12px; font-size: 12px;
} }
.br3 { .br3 {
position: absolute; position: absolute;
bottom: 36px; bottom: 36px;
right: 16px; right: 16px;
font-size: 12px; font-size: 12px;
} }
html { html {
background: url(DremJS-Background.png) no-repeat center center fixed; background: url(DremJS-Background.png) no-repeat center center fixed;
-webkit-background-size: cover; -webkit-background-size: cover;
-moz-background-size: cover; -moz-background-size: cover;
-o-background-size: cover; -o-background-size: cover;
background-size: cover; background-size: cover;
} }
a:link { a:link {
color: black; color: black;
text-decoration: none; text-decoration: none;
} }
a:visited { a:visited {
color: black; color: black;
text-decoration: none; text-decoration: none;
} }
.startgray { .startgray {
background-color: gray; background-color: gray;
padding: 300px; padding: 300px;
border: 5px solid gray; border: 5px solid gray;
margin: 0; margin: 0;
} }
.cent { .cent {
position: relative; position: relative;
top: 4px; top: 4px;
} }
.taskbar { .taskbar {
background-color: black; background-color: black;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
width: 100%; width: 100%;
height: 42px; height: 42px;
} }
</style> </style>
</head> </head>
<body onload="initAgendaWM()"> <body onload="initAgendaWM()">
<p class="cwhite br3">DremJS Version 0.1.2b</p> <p class="cwhite br3">DremJS Version 0.1.2b</p>
<p class="cwhite br2">Build 31</p> <p class="cwhite br2">Build 31</p>
<p class="cwhite br1">&copy; Innovation Inc.</p> <p class="cwhite br1">&copy; Innovation Inc.</p>
<div class="start startgray"> <div class="start startgray">
<ul class="astart"> <ul class="astart">
<dt><a onclick="openApplication('About')"><p><img src="apps/About/about.png" align="top"> About DremJS</p></a></dt> <dt><a onclick="openApplication('About')"><p><img src="apps/About/about.png" align="top"> About DremJS</p></a></dt>
<dt><a onclick="openApplication('HowTo')"><p><img src="apps/HowTo/howto.png" align="top"> How to Install Applications</p></a></dt> <dt><a onclick="openApplication('HowTo')"><p><img src="apps/HowTo/howto.png" align="top"> How to Install Applications</p></a></dt>
<dt><a onclick="openApplication('Market')"><p><img src="apps/Market/market.png" align="top"> DremJS Market</p></a></dt> <dt><a onclick="openApplication('Market')"><p><img src="apps/Market/market.png" align="top"> DremJS Market</p></a></dt>
<dt><a onclick="openApplication('debug')"><p><img src="apps/debug/debug.png" align="top"> Report a Bug</p></a></dt> <dt><a onclick="openApplication('debug')"><p><img src="apps/debug/debug.png" align="top"> Report a Bug</p></a></dt>
<!--Below is where remotely installed apps will start --> <!--Below is where remotely installed apps will start -->
<hr /> <hr />
<dt><a target="_top" href="shuttingdown.html"><p><img src="shutdown.png" align="top" style="width:16px;height:16px;"> Shutdown DremJS</p></dt> <dt><a target="_top" href="shuttingdown.html"><p><img src="shutdown.png" align="top" style="width:16px;height:16px;"> Shutdown DremJS</p></dt>
</ul> </ul>
<a href="#"><p class="start" style="left:12px;">Start</p></a> <a href="#"><p class="start" style="left:12px;">Start</p></a>
</div> </div>
<div id="appContainer"> <div id="appContainer">
</div> </div>
<div class="taskbar"> <div class="taskbar">
<div class="cwhite" style="text-align:left" id="txt"></div> <a onclick="openApplication('About')"><img class="cent" src="apps/About/about.png"> |</a> <div class="cwhite" style="text-align:left" id="txt"></div> <a onclick="openApplication('About')"><img class="cent" src="apps/About/about.png"> |</a>
</div> </div>
<script> <script>
function initAgendaWM() { function initAgendaWM() {
makeDraggable(); makeDraggable();
startTime(); startTime();
} }
function makeDraggable() { function makeDraggable() {
$(".framewrap") $(".framewrap")
.draggable() .draggable()
.resizable(); .resizable();
} }
function moveToFront(app) { function moveToFront(app) {
$('.framewrap').css('z-index', 1); $('.framewrap').css('z-index', 1);
$('#' + app).css('z-index', 9999); $('#' + app).css('z-index', 9999);
} }
function openApplication(app) { function openApplication(app) {
var i = 0; var i = 0;
while ($('#' + i).length) while ($('#' + i).length)
i++; i++;
var newElement="<div onclick=\"moveToFront('" + i + "')\" id='" + i + "' class='framewrap'><input type='button' onclick=\"closeApplication('" + i + "')\" value='X' /><iframe class='appFrame' src='apps/" + app + "/'></iframe></div>"; var newElement="<div onclick=\"moveToFront('" + i + "')\" id='" + i + "' class='framewrap'><input type='button' onclick=\"closeApplication('" + i + "')\" value='X' /><iframe class='appFrame' src='apps/" + app + "/'></iframe></div>";
var parent=document.getElementById('appContainer'); var parent=document.getElementById('appContainer');
parent.innerHTML+=newElement; parent.innerHTML+=newElement;
moveToFront(i); moveToFront(i);
makeDraggable(); makeDraggable();
} }
function closeApplication(app) { function closeApplication(app) {
var element = document.getElementById(app); var element = document.getElementById(app);
element.parentNode.removeChild(element); element.parentNode.removeChild(element);
} }
function startTime() { function startTime() {
var today = new Date(); var today = new Date();
var h = today.getHours(); var h = today.getHours();
var m = today.getMinutes(); var m = today.getMinutes();
var s = today.getSeconds(); var s = today.getSeconds();
m = checkTime(m); m = checkTime(m);
s = checkTime(s); s = checkTime(s);
document.getElementById('txt').innerHTML = document.getElementById('txt').innerHTML =
h + ":" + m + ":" + s; h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500); var t = setTimeout(startTime, 500);
} }
function checkTime(i) { function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10 if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i; return i;
} }
</script> </script>
</body> </body>
</html> </html>