<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>DremJS Terminal</title>
    
	<link rel="stylesheet" type="text/css" title="dark" href="css/dark.css">
	<!--<link rel="alternate stylesheet" type="text/css" title="lite" href="css/lite.css">-->
</head>

<body>

  <html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="chrome=1" />
    <title>DremJS</title>
    <link href="https://fonts.googleapis.com/css?family=Inconsolata"
          rel="stylesheet" type="text/css" />
  </head>
  <body onload="getTheme();">
  <script>
	function getTheme() {
		jQuery.get('terminal/configs/theme.conf', function(data) {
			if(data == "1") {
				var cssLink = $('link[href*="css/dark.css"]');
				cssLink.replaceWith('<link href="css/lite.css" type="text/css" rel="stylesheet">');
			} else {
				var cssLink = $('link[href*="css/lite.css"]');
				cssLink.replaceWith('<link href="css/dark.css" type="text/css" rel="stylesheet">');
			}
		});
	}
  </script>
  <!--<script>                                              old script
	function setTheme() {
		if (checkCookie('terminalTheme') == false) {
			document.cookie = "terminalTheme=0";
		} else {
			theme = getCookie('terminalTheme');
			if (theme == 1) {
				/*var stylesheet = document.getElementById("stylesheet");
				stylesheet.setAttribute('href', 'css/lite.css');*/
				var cssLink = $('link[href*="css/dark.css"]');
				cssLink.replaceWith('<link href="css/lite.css" type="text/css" rel="stylesheet">');
			}
		}
	}
	
	function checkCookie(cname) {
		var cookie = getCookie(cname);
		if (cookie != "") {
			return true;
		} else {
			return false;
		}
	}
	
	function getCookie(cname) {
		var name = cname + "=";
		var decodedCookie = decodeURIComponent(document.cookie);
		var ca = decodedCookie.split(';');
		for(var i = 0; i <ca.length; i++) {
			var c = ca[i];
			while (c.charAt(0) == ' ') {
				c = c.substring(1);
			}
			if (c.indexOf(name) == 0) {
				return c.substring(name.length, c.length);
			}
		}
		return "";
	}
  </script>-->
    <div id="container">
      <output></output>
      <div id="input-line" class="input-line">
        <div class="prompt"></div><div><input class="cmdline" autofocus /></div>
      </div>
    </div>
    
    <!--<script src="http://www.codehelper.io/api/ips/?js"></script>-->
    <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
    <script src="terminal/terminal.js"></script>
    
    <div class="clock-container">
      <svg viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="45"/>
        <g>
          <rect class="hour" x="47.5" y="12.5" width="5" height="40" rx="2.5" ry="2.55" />
          <rect class="min" x="48.5" y="12.5" width="3" height="40" rx="2" ry="2"/>
          <line class="sec" x1="50" y1="50" x2="50" y2="16" />
        </g>
      </svg>
    </div>
    
  </body>
</html>
  
  

    <script  src="terminal/index.js"></script>




</body>

</html>