|
@@ -33,17 +33,18 @@ $(function dw_set_cookie() {
|
|
else {
|
|
else {
|
|
$('.intro').collapse('hide');
|
|
$('.intro').collapse('hide');
|
|
$('.terminal').modal('show');
|
|
$('.terminal').modal('show');
|
|
- $('.welcome-back').typed({
|
|
|
|
- strings: ['Hey...', 'Welcome back...'],
|
|
|
|
- typeSpeed: -40,
|
|
|
|
- backSpeed: -70,
|
|
|
|
|
|
+ $('.welcome-back-text').typed({
|
|
|
|
+ strings: ['Hello...', 'Welcome back'],
|
|
|
|
+ typeSpeed: 10,
|
|
|
|
+ backSpeed: 70,
|
|
startDelay: 0,
|
|
startDelay: 0,
|
|
backDelay: 0,
|
|
backDelay: 0,
|
|
loop: false,
|
|
loop: false,
|
|
loopCount: false,
|
|
loopCount: false,
|
|
attr: null,
|
|
attr: null,
|
|
- callback: function(){
|
|
|
|
- dw_collapse();
|
|
|
|
|
|
+ callback: function(){
|
|
|
|
+ dw_terminal();
|
|
|
|
+ dw_collapse();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -66,8 +67,82 @@ function dw_shift() {
|
|
}
|
|
}
|
|
|
|
|
|
function dw_collapse() {
|
|
function dw_collapse() {
|
|
|
|
+ $('.welcome-back-text').addClass('.welcome-back-text:after');
|
|
//$('.intro').collapse('hide');
|
|
//$('.intro').collapse('hide');
|
|
- $('.terminal').modal('hide');
|
|
|
|
|
|
+ //$('.terminal').modal('hide');
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/*============================================
|
|
|
|
+ Terminal
|
|
|
|
+==============================================*/
|
|
|
|
+(function ($){
|
|
|
|
+ $.fn.cli = function(handler, prompt, effect){
|
|
|
|
+ if (!prompt) prompt = '<span class="u">you</span><span class="at">@</span><span class="mee">david</span> > ';
|
|
|
|
+ if (!effect) effect = $.fn.text;
|
|
|
|
+ return this.each(function(){
|
|
|
|
+ var self = $(this);
|
|
|
|
+ function newline(){
|
|
|
|
+ self.
|
|
|
|
+ append('<p class=input><span class=prompt>'+prompt+'</span><span style=outline:none contenteditable></span></p>');
|
|
|
|
+ try {
|
|
|
|
+ $('[contenteditable]', self)[0].focus();
|
|
|
|
+ }catch(e){
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ newline();
|
|
|
|
+ self.on('keydown', '[contenteditable]', function(evt){
|
|
|
|
+ if (evt.keyCode == 13){
|
|
|
|
+ $(this).removeAttr('contenteditable'); // IE needs special handling which jQuery provides
|
|
|
|
+ effect.call($('<p class=response>').appendTo(self),handler(this.textContent || this.innerText));
|
|
|
|
+ newline();
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+})(jQuery);
|
|
|
|
+
|
|
|
|
+function dw_terminal(){
|
|
|
|
+ function type(text){
|
|
|
|
+ var span = $('<span>').appendTo(this).after('<span id="blinker" style="background: green"> </span>');
|
|
|
|
+ var style = $('<style>p.input {visibility: hidden} p.input.old {visibility: visible}</style>').appendTo('head');
|
|
|
|
+ $('p.input').addClass('old');
|
|
|
|
+ var progress = 0;
|
|
|
|
+ var timer = setInterval (function(){
|
|
|
|
+ span.text(text.substr(0, progress++));
|
|
|
|
+ if (progress > text.length){
|
|
|
|
+ $('#blinker').remove();
|
|
|
|
+ style.remove();
|
|
|
|
+ $('[contenteditable]')[0].focus();
|
|
|
|
+ clearInterval(timer);
|
|
|
|
+ }
|
|
|
|
+ },100);
|
|
|
|
+ }
|
|
|
|
+ $('.thermo').cli(function(text){
|
|
|
|
+ if (/good/i.test(text)) {
|
|
|
|
+ return "Very" +text;
|
|
|
|
+ $('.terminal').modal('hide');
|
|
|
|
+ };
|
|
|
|
+ if (/exit/i.test(text)) {
|
|
|
|
+ $('.terminal').modal('hide');
|
|
|
|
+ };
|
|
|
|
+ if (/help/i.test(text)) return "I need somebody. Type 'exit' to close";
|
|
|
|
+ if (/hello/i.test(text)) return "Hello to you!";
|
|
|
|
+ if (/what/i.test(text)) return "This is a website silly human";
|
|
|
|
+ if (/and/i.test(text)) return "and what?";
|
|
|
|
+ if (/who/i.test(text)) return "David A. Windham";
|
|
|
|
+ if (/how/i.test(text)) return "JavaScript is a dynamic computer programming language";
|
|
|
|
+ if (/why/i.test(text)) return "For fun";
|
|
|
|
+ if (/you/i.test(text)) return "your mama";
|
|
|
|
+ if (/cd ../i.test(text)) return "Oh, I see";
|
|
|
|
+ if (/thermonuclear/i.test(text)) return "Wouldn't you prefer a nice game of chess?";
|
|
|
|
+ if (text.length < 3) return "type 'exit' to close";
|
|
|
|
+ return 'command not found: '+text;
|
|
|
|
+ }, null, type);
|
|
|
|
+ $('p.input').on('touchstart click', function(e) {
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ $('[contenteditable]')[0].focus();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -111,7 +186,8 @@ $(function dw_hidenav() {
|
|
==============================================*/
|
|
==============================================*/
|
|
|
|
|
|
$('.carousel').carousel({
|
|
$('.carousel').carousel({
|
|
- interval: 4200
|
|
|
|
|
|
+ interval: 4200,
|
|
|
|
+ interval: false
|
|
});
|
|
});
|
|
|
|
|
|
$('.carousel').on('slide.bs.carousel', function() {
|
|
$('.carousel').on('slide.bs.carousel', function() {
|
|
@@ -124,6 +200,31 @@ $('.carousel').on('slid.bs.carousel', function() {
|
|
//$('#tv').addClass('invert');
|
|
//$('#tv').addClass('invert');
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+$('.caro').carousel({
|
|
|
|
+ interval: 9000
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+/*============================================
|
|
|
|
+ SVG Animate
|
|
|
|
+==============================================*/
|
|
|
|
+
|
|
|
|
+$('#caro').on('slid.bs.carousel', function() {
|
|
|
|
+ $('.active .animac').removeClass('hide-svg fade-svg');
|
|
|
|
+ var animac = new DrawFillSVG({elementId: 'svg-mac'});
|
|
|
|
+ var animac1 = new DrawFillSVG({elementId: 'svg-imac'});
|
|
|
|
+ var animac2 = new DrawFillSVG({elementId: 'svg'});
|
|
|
|
+ animac.replay();
|
|
|
|
+ animac1.replay();
|
|
|
|
+ animac2.replay();
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+$('#caro').on('slide.bs.carousel', function() {
|
|
|
|
+ $('.active .animac').addClass('fade-svg').delay(1000).queue(function(hideit){
|
|
|
|
+ $(this).addClass('hide-svg');
|
|
|
|
+ hideit();
|
|
|
|
+ });
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
|
|
/*============================================
|
|
/*============================================
|
|
Comments
|
|
Comments
|
|
@@ -156,16 +257,17 @@ $('#commentform').validate({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
messages: {
|
|
messages: {
|
|
- author: "Please enter in your name.",
|
|
|
|
- email: "Please enter a valid email address.",
|
|
|
|
- comment: "Message box can't be empty!"
|
|
|
|
|
|
+ author: 'Please enter in your name.',
|
|
|
|
+ email: 'Please enter a valid email address.',
|
|
|
|
+ comment: 'Nothing to Say?'
|
|
},
|
|
},
|
|
- errorElement: "div",
|
|
|
|
|
|
+ errorElement: 'div',
|
|
errorPlacement: function(error, element) {
|
|
errorPlacement: function(error, element) {
|
|
element.before(error);
|
|
element.before(error);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+
|
|
/*============================================
|
|
/*============================================
|
|
SmoothState
|
|
SmoothState
|
|
==============================================*/
|
|
==============================================*/
|