$(document).ready(function() {
// Terminal typing animation
/* $("#from-terminal p").typed({
strings: ["curl --upload-file ./hello.txt https://transfer.sh/hello.txt\n######################################################\nhttps://transfer.sh/66nb8/hello.txt \n "],
typeSpeed: 0, // typing speed
backSpeed: 0, // backspacing speed
startDelay: 0, // time before typing starts
backDelay: 500, // pause before backspacing
loop: false, // loop on or off (true or false)
loopCount: false, // number of loops, false = infinite
showCursor: true,
attr: null, // attribute to type, null = text for everything except inputs, which default to placeholder
callback: function(){ } // call function after typing is done
});
*/
var typewriter = require('typewriter');
var twSpan = document.getElementById('terminal');
var tw = typewriter(twSpan).withAccuracy(95)
.withMinimumSpeed(5)
.withMaximumSpeed(17)
.build();
tw.put('$ ')
.waitRange(500, 1000)
.type('curl --upload-file ./hello.txt https://transfer.sh/hello.txt\n#######################')
.put('
')
.waitRange(1000, 1500)
.put('ls: realistic-typewriter.js: No such file or directory
')
.put('$ ')
.waitRange(1000, 1500)
.type('exit')
.put('
')
.wait(500)
.put('logout
')
.put('[Process completed]
');
// Smooth scrolling
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
// function resizePages() {
// var h = $(window).height();
// var height = h < 600 ? 600 : h;
/* $('section').css('height',height);
$('#home').css('height',height*0.98);
}
resizePages();*/
});
(function() {
var files = Array()
function upload(file) {
$('.browse').addClass('uploading');
var li = $('
Uploading... ' + file.name + '