Browse Source

svg screen gif

windhamdavid 10 years ago
parent
commit
8c60b9e5d5
3 changed files with 75 additions and 21 deletions
  1. 35 16
      index.php
  2. 26 3
      js/init.js
  3. 14 2
      style.css

+ 35 - 16
index.php

@@ -32,7 +32,7 @@
 			</div>
 		</div>
 	</div>
-	<video id="tv" class="sat" preload="auto" autostart="false" loop="loop" poster="wp-content/themes/dw/img/tv.jpg">
+	<video id="tv" class="sat" preload="auto" autoplay="true" loop="loop" poster="wp-content/themes/dw/img/tv.jpg">
 	     <source src="<?php echo get_bloginfo('template_directory');?>/img/tv.mp4" type="video/mp4">
 	     <source src="<?php echo get_bloginfo('template_directory');?>/img/tv.webm" type="video/webm">
 	</video>
@@ -151,6 +151,26 @@
 			<div class="carousel-inner">
 				<div class="item active">
 					<div class="container animac">
+						<div class="row">
+							<div class="col-sm-6">
+								<h1 class="light super cm-sans">Computer Modern</h1>
+							</div>
+							<div class="col-sm-6">
+								<svg xmlns="http://www.w3.org/2000/svg" id="sv" height="200px" viewBox="-450 469 298 342">
+								<path stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" fill="#1572B6" d="M-422.9,777.3l-27.1-303.6h297.4l-27.1,303.6L-301.4,811L-422.9,777.3z"/>
+								<path stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" fill="#33A9DC" d="M-301.2,785.2l98.4-27.3l23.2-259.4h-121.6V785.2z"/>
+								<path stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" fill="#EBEBEB" d="M-301.2,608.5v23.1v14v0.1H-342h-0.1l-0.7-8.4l-1.7-18.9l-0.9-10H-301.2z"/>
+								<path stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" fill="#EBEBEB" d="M-301.1,533.1v23.1v14v0.1h-89.8h-0.1l-0.7-8.4l-1.7-18.9l-0.9-10H-301.1z"/>
+								<path stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" fill="#FFFFFF" d="M-255.1,644.2l-4.5,49.9l-41.5,11.2V744l76.3-21.2l0.6-6.3l6.5-72.4H-255.1z"/>
+								<path stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" fill="#EBEBEB" d="M-301,705.2l-0.2,0l-41.5-11.2l-2.7-29.7h-20.2h-17.2l5.2,58.5l76.3,21.2l0.2,0V705.2z"/>
+								<path stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" fill="#FFFFFF" d="M-301.2,608.5h49.3l3.4-38.1h-52.7v-37.2h0.1h93.2l-0.9,10l-9.2,102.6h-83.3V608.5z"/>
+								</svg>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="item">
+					<div class="container animac hide-svg">
 						<svg xmlns="http://www.w3.org/2000/svg" id="svg-mac" class="svg" viewBox="0 0 960 480" preserveAspectRatio="xMinYMin meet">
 							<path fill="#B4BEC8" stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" d="M570.14 440.2l-29.165-28.99c-7.103-8.5-6.152-36.718-6.02-40.665H425.048c.133 3.947 1.082 32.164-6.018 40.666l-29.166 28.99c-1.237 1.404-1.712 2.505-1.623 3.37h-.054c.76 7.727 6.664 6.332 13.607 6.332H558.01c6.696 0 12.412 1.27 13.493-5.56.58-.953.274-2.282-1.364-4.14z"/>
 							<path fill="#C8D2DC" stroke="#C8D2DC" stroke-width="2px" stroke-miterlimit="10" d="M727.488 355.125c0 8.514-6.597 15.42-14.738 15.42h-465.5c-8.14 0-14.74-6.906-14.74-15.42V45.42c0-8.517 6.6-15.42 14.74-15.42h465.5c8.142 0 14.738 6.903 14.738 15.42v309.705z"/>
@@ -162,13 +182,20 @@
 				</div>
 				<div class="item">
 					<div class="container animac hide-svg">
-						<svg xmlns="http://www.w3.org/2000/svg" id="svg-imac" class="svg" viewBox="0 0 960 480" preserveAspectRatio="xMinYMin meet">
-							<path fill="#B4BEC8" stroke="#B4BEC8" stroke-width="2px" stroke-miterlimit="10" d="M570.14 440.2l-29.165-28.99c-7.103-8.5-6.152-36.718-6.02-40.665H425.048c.133 3.947 1.082 32.164-6.018 40.666l-29.166 28.99c-1.237 1.404-1.712 2.505-1.623 3.37h-.054c.76 7.727 6.664 6.332 13.607 6.332H558.01c6.696 0 12.412 1.27 13.493-5.56.58-.953.274-2.282-1.364-4.14z"/>
-							<path fill="#C8D2DC" stroke="#C8D2DC" stroke-width="2px" stroke-miterlimit="10" d="M727.488 355.125c0 8.514-6.597 15.42-14.738 15.42h-465.5c-8.14 0-14.74-6.906-14.74-15.42V45.42c0-8.517 6.6-15.42 14.74-15.42h465.5c8.142 0 14.738 6.903 14.738 15.42v309.705z"/>
-							<path fill="#fff" stroke="#C8D2DC" stroke-width="2px" stroke-miterlimit="10" d="M489.01 343.713c-.042-4.223 3.447-6.254 3.605-6.352-1.963-2.866-5.018-3.263-6.102-3.31-2.602-.26-5.074 1.53-6.39 1.53s-3.356-1.49-5.506-1.448c-2.836.04-5.445 1.645-6.907 4.182-2.942 5.11-.75 12.672 2.116 16.814 1.4 2.02 3.072 4.305 5.268 4.22 2.114-.08 2.913-1.362 5.467-1.362 2.556 0 3.274 1.363 5.51 1.322 2.273-.04 3.716-2.064 5.105-4.098 1.61-2.35 2.273-4.63 2.313-4.748-.05-.02-4.434-1.7-4.48-6.75M484.807 331.31c1.168-1.41 1.953-3.37 1.738-5.327-1.68.068-3.713 1.12-4.916 2.53-1.08 1.247-2.027 3.245-1.77 5.16 1.87.143 3.784-.95 4.947-2.362"/>
-							<path fill="#3C4650" stroke="#3C4650" stroke-width="2px" stroke-miterlimit="10" d="M727.488 315.527V45.982c0-8.828-6.597-15.982-14.738-15.982h-465.5c-8.14 0-14.74 7.155-14.74 15.982v269.545H727.49z"/>
-							<path fill="#141E28" stroke="#141E28" stroke-width="2px" stroke-miterlimit="10" d="M251.2 48.887h457.205v245.52H251.2z"/>
-						</svg>
+						<div class="row">
+							<div class="col-sm-6">
+								<h1 class="light super cm-sans">Computer Modern</h1>
+							</div>
+							<div class="col-sm-6">
+								<svg xmlns="http://www.w3.org/2000/svg" id="svg-imac" class="svg screen" viewBox="0 0 460 400" preserveAspectRatio="xMinYMin meet">
+									<path fill="#B4BEC8" stroke="#B4BEC8" stroke-width="2" stroke-miterlimit="10" d="M312.5,381.9l-26.5-26.4c-6.5-7.7-5.6-33.4-5.5-37h-99.9c0.1,3.6,1,29.2-5.5,37l-26.5,26.4c-1.1,1.3-1.6,2.3-1.5,3.1h0c0.7,7,6.1,5.8,12.4,5.8h142c6.1,0,11.3,1.2,12.3-5.1C314.2,384.8,313.9,383.6,312.5,381.9L312.5,381.9z"/>
+									<path fill="#C8D2DC" stroke="#C8D2DC" stroke-width="2" stroke-miterlimit="10" d="M442.1,9H18.9C11.5,9,5,15.2,5,23v281.6c0,7.7,6.5,14.5,13.9,14.5h423.2c7.4,0,13.9-6.7,13.9-14.5V23C456,15.2,449.5,9,442.1,9z M438,249H23V26h415V249z"/>
+									<path fill="#FFFFFF" stroke="#C8D2DC" stroke-width="2" stroke-miterlimit="10" d="M238.7,294.2c0-3.8,3.1-5.7,3.3-5.8c-1.8-2.6-4.6-3-5.5-3c-2.4-0.2-4.6,1.4-5.8,1.4s-3.1-1.4-5-1.3c-2.6,0-5,1.5-6.3,3.8c-2.7,4.6-0.7,11.5,1.9,15.3c1.3,1.8,2.8,3.9,4.8,3.8c1.9-0.1,2.6-1.2,5-1.2c2.3,0,3,1.2,5,1.2c2.1,0,3.4-1.9,4.6-3.7c1.5-2.1,2.1-4.2,2.1-4.3C242.7,300.3,238.7,298.8,238.7,294.2 M234.9,282.9c1.1-1.3,1.8-3.1,1.6-4.8c-1.5,0.1-3.4,1-4.5,2.3c-1,1.1-1.8,3-1.6,4.7C232.1,285.2,233.8,284.2,234.9,282.9"/>
+									<path fill="#3C4650" stroke="#3C4650" stroke-width="2" stroke-miterlimit="10" d="M442.1,9H18.9C11.5,9,5,15.4,5,23.5V269h451V23.5C456,15.4,449.5,9,442.1,9z M438,249H22V26h416V249z"/>
+									<path fill="none" stroke="#141E28" stroke-width="2" stroke-miterlimit="10" d="M22.5,26.1h415.7v223.2H22.5V26.1z"/>
+								</svg>
+							</div>
+						</div>
 					</div>
 				</div>
 				<div class="item">
@@ -181,14 +208,6 @@
 					</div>
 				</div>
 			</div>
-			<a class="left carousel-control" href="#caro" role="button" data-slide="prev">
-			    <span class="glyphicon glyphicon-chevron-left"></span>
-			    <span class="sr-only">Previous</span>
-			  </a>
-			  <a class="right carousel-control" href="#caro" role="button" data-slide="next">
-			    <span class="glyphicon glyphicon-chevron-right"></span>
-			    <span class="sr-only">Next</span>
-			  </a>
 		</div>
 	</div>
 	<div class="container-full dark bottom">

+ 26 - 3
js/init.js

@@ -3,7 +3,7 @@ new WOW().init();
 jQuery(document).ready(function($) {
 	
 $(window).bind('load', function() {
-	$('#loader').fadeOut(700);
+	$('#loader').fadeOut(70);
 });
 
 
@@ -131,6 +131,7 @@ function dw_terminal(){
 		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 (/when/i.test(text)) return "Yesterday";
 		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";
@@ -190,12 +191,12 @@ $('.carousel').carousel({
 	interval: false
 });
 
-$('.carousel').on('slide.bs.carousel', function() {
+$('#caro-lead').on('slide.bs.carousel', function() {
 	$('.carousel-caption').fadeIn(600);
 	//$('#tv').removeClass('invert');
 });
 
-$('.carousel').on('slid.bs.carousel', function() {
+$('#caro-lead').on('slid.bs.carousel', function() {
 	$('.carousel-caption').fadeOut(600);
 	//$('#tv').addClass('invert');
 });
@@ -204,9 +205,24 @@ $('.caro').carousel({
 	interval: 9000
 });
 
+$(document).bind('keyup', function(e) {
+    if(e.which == 39){
+		//$('#caro-lead').carousel('next');
+		$('#caro').carousel('next');
+    }
+    else if(e.which == 37){
+		//$('#caro-lead').carousel('prev');
+		$('#caro').carousel('prev');
+    }
+});
+
 /*============================================
 		      SVG Animate
 ==============================================*/
+(function() {
+	var myAnimation = new DrawFillSVG({elementId: "sv"});
+})();
+
 
 $('#caro').on('slid.bs.carousel', function() {
 	$('.active .animac').removeClass('hide-svg fade-svg');
@@ -219,11 +235,18 @@ $('#caro').on('slid.bs.carousel', function() {
 });
 
 $('#caro').on('slide.bs.carousel', function() {
+	$('.active #svg-imac.bg').attr('class', 'svg screen');
 	$('.active .animac').addClass('fade-svg').delay(1000).queue(function(hideit){
 	    $(this).addClass('hide-svg');
 	    hideit();
 	});
 });
+$('#caro').on('slid.bs.carousel', function() {
+	$('.active #svg-imac.screen').delay(2500).queue(function(screenit){
+	    $(this).attr('class', 'bg');
+	    screenit();
+	});
+});
 
 
 /*============================================

+ 14 - 2
style.css

@@ -590,10 +590,10 @@ h1.super {
 }
 
 #caro-lead {
-	height: 400px;
+	min-height: 400px;
 }
 #caro {
-	height: 600px;
+	
 }
 .hide-svg {
 	visibility: hidden;
@@ -612,6 +612,18 @@ h1.super {
 	-ms-animation: fadeIn 1s;
 	animation: fadeIn 1s;
 }
+#caro svg#svg-imac.screen {
+	max-height: 460px;
+	margin: 0;
+	float: right;
+}
+#caro svg#svg-imac.bg {
+	max-height: 460px;
+	margin: 0;
+	float: right;
+	background: transparent url('img/web.gif') no-repeat 28% 15%;
+}
+
 .bg1 {
 	//background: url(img/desk.jpg) no-repeat left center;
 	background-size: cover;