LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

  
    
    
    HTML5 Web Terminal
    
  
  
    
CSS
::selection {
  background: #FF5E99;
}
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  font-size: 11pt;
  font-family: Inconsolata, monospace;
  color: white;
  background-color: black;
}
#container {
  padding: .1em 1.5em 1em 1em;
}
#container output {
  clear: both;
  width: 100%;
}
#container output h3 {
  margin: 0;
}
#container output pre {
  margin: 0;
}
.input-line {
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  clear: both;
}
.input-line > div:nth-child(2) {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
}
.prompt {
  white-space: nowrap;
  color: #96b38a;
  margin-right: 7px;
  display: -webkit-box;
  -webkit-box-pack: center;
  -webkit-box-orient: vertical;
  display: -moz-box;
  -moz-box-pack: center;
  -moz-box-orient: vertical;
  display: box;
  box-pack: center;
  box-orient: vertical;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.cmdline {
  outline: none;
  background-color: transparent;
  margin: 0;
  width: 100%;
  font: inherit;
  border: none;
  color: inherit;
}
.ls-files {
  height: 45px;
  -webkit-column-width: 100px;
  -moz-column-width: 100px;
  -o-column-width: 100px;
  column-width: 100px;
}


/************************************************************/
/* SVG Clock                                                */
/************************************************************/

.clock-container {
  display: none /*inline-block*/;
  position: relative;
  width: 200px;
  vertical-align: middle;
  overflow: hidden;
} 

.clock-container > svg > circle {
  stroke-width: 2px;
  stroke: #fff;
}

.hour, .min, .sec { 
  stroke-width: 1px;
  fill: #333;
  stroke: #555;
}

.sec {
   stroke: #f55;
}

JS
$(function() {
  
  // Set the command-line prompt to include the user's IP Address
  //$('.prompt').html('[' + codehelper_ip["IP"] + '@HTML5] # ');
    $('.prompt').html('[user@HTML5] # ');

  // Initialize a new terminal object
  var term = new Terminal('#input-line .cmdline', '#container output');
  term.init();
  
  // Update the clock every second
  setInterval(function() {
    function r(cls, deg) {
      $('.' + cls).attr('transform', 'rotate('+ deg +' 50 50)')
    }
    var d = new Date()
    r("sec", 6*d.getSeconds())  
    r("min", 6*d.getMinutes())
    r("hour", 30*(d.getHours()%12) + d.getMinutes()/2)
  }, 1000);
  
});
Host Instantly Drag and Drop Website Builder

 

Description

A console for the Web written completely in JavaScript. The console supports Web versions of Linux commands.
Term
Mon, 11/27/2017 - 21:48

Related Codes

Pen ID
Pen ID
Pen ID