Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b896513
Wendy 1st commit.
Nov 3, 2014
aa892aa
Added Audio files
Nov 3, 2014
8f064d9
Cleaned up Audio Files
Nov 3, 2014
2260747
Galen first commit
gkbroderick Nov 3, 2014
381fb45
Delete .DS_Store
gkbroderick Nov 3, 2014
ad6a487
Delete .DS_Store
gkbroderick Nov 3, 2014
6b0415d
Delete .DS_Store
gkbroderick Nov 3, 2014
7980fc4
Add system file gitignore
Nov 3, 2014
6b8f1ea
Delete .DS_Store
gkbroderick Nov 3, 2014
de5707d
Add gitignore
Nov 3, 2014
7428b27
HELP
gkbroderick Nov 3, 2014
8544649
HELP
gkbroderick Nov 3, 2014
3c191aa
Merge branch 'master' of https://github.com/gkbroderick/html5-as-a-pl…
Nov 3, 2014
69863fe
delete .DS.Store from Audio and the HTML5 folder
Nov 3, 2014
2696ea1
delete Video/.DS_Store
Nov 3, 2014
1e1fce8
Delete DS Store again
gkbroderick Nov 3, 2014
a9ca5c6
Merge branch 'master' of https://github.com/gkbroderick/html5-as-a-pl…
gkbroderick Nov 3, 2014
eb8df47
update main page links
gkbroderick Nov 3, 2014
88eedeb
fix Camera Code Syntax, Add READMEs
gkbroderick Nov 3, 2014
bf4d1d2
add READMEs, for real this time
gkbroderick Nov 3, 2014
3770c93
readme file updated
Nov 3, 2014
2d0f85c
Merge branch 'master' of https://github.com/gkbroderick/html5-as-a-pl…
Nov 3, 2014
548d014
Update README
gkbroderick Nov 3, 2014
4772402
Add change to bear
Nov 3, 2014
21a1298
Merge branch 'master' of https://github.com/gkbroderick/html5-as-a-pl…
Nov 3, 2014
5381641
bear
Nov 3, 2014
c77aeb9
Update README.md
gkbroderick Nov 3, 2014
7dffb35
Added pause-play button
Nov 3, 2014
760992b
...Merge branch 'master' of https://github.com/gkbroderick/html5-as-a…
Nov 3, 2014
e60d563
Fix Jade examples add head and body spacing fix text
gkbroderick Nov 9, 2014
caeb389
Move everthing to central partner folder
gkbroderick Nov 9, 2014
0042cac
Placing everything in Partner Named Folder
gkbroderick Nov 9, 2014
4b214d2
Added Clearfix class
gkbroderick Nov 9, 2014
011e303
Remove <br> tags, add Clearfix, remove empty lines
gkbroderick Nov 9, 2014
011ca3a
remove blank lines
gkbroderick Nov 9, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated CSS output
public/stylesheets/*.css

# No node packages
node_modules/

# OS generated files #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Binary file not shown.
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions Galen-Wendy/Audio/audio.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<head>
<title>HTML5 Audio Demo</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../main.css" type="text/css" rel="stylesheet">
</head>
<body>
<p> Audio</p>
<div class="clearfix">
<audio id = "audio" width="320" height="240" controls>
<source src="Audio Converts/FillOutSomeForms.mp3" type="audio/mp3">
<source src="Audio Converts/FillOutSomeForms.ogg" type="audio/mp3">
<source src="Audio Converts/FillOutSomeForms.wav" type="audio/mp3">
</audio>
</div>
<button onclick="playVid()" type="button" class="">Play Audio</button>
<button onclick="pauseVid()" type="button">Pause Audio</button>
<button onclick="frameChange(2)" type="button">Fast Forward</button>
<button onclick="frameChange(-2)" type="button"> Rewind </button>
<button onclick="restart()" type="button">Restart</button>
<button onclick="pauseplay()" type="button">PausePlay</button>
</body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script type="text/javascript" src=audio.js></script>
</html>
35 changes: 35 additions & 0 deletions Galen-Wendy/Audio/audio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
var vid = document.getElementById("audio")
function pauseVid(){
var vid = document.getElementById("audio");
vid.pause();
}
function playVid(){
var vid = document.getElementById("audio");
vid.play();
}
function frameChange(value){
var vid = document.getElementById("audio");
vid.currentTime += value;
}

function sneeze(){
var vid = document.getElementById("audio");
vid.currentTime = 11;
vid.play();
}
function restart(){
var vid = document.getElementById("audio");
vid.currentTime = 0;
vid.play();
}

function pauseplay(){
var vid = document.getElementById("audio");
if (vid.paused){
vid.play();
}
else{
vid.pause();
}

}
File renamed without changes.
7 changes: 7 additions & 0 deletions Galen-Wendy/Camera/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Camera Access via Browser Example!
We combined David Walsh's Camera Access / snapshot code with a Canvas Element drawing app to make a (slow) app that can draw over the captured image with black circles using mouseclicks.

####Sources
Browser Camera from [David Walsh](http://davidwalsh.name/browser-camera)

Canvas Drawing Adapted from [bogonko](http://stackoverflow.com/questions/2368784/draw-by-mouse-with-html5-canvas) and his [jsfiddle example](http://jsfiddle.net/ArtBIT/kneDX/)
22 changes: 22 additions & 0 deletions Galen-Wendy/Camera/camera.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<title>HTML5 Photo</title>
<link href="../main.css" type="text/css" rel="stylesheet">
</head>
<body>
<header>
<h1>HTML5 Photo</h1>
</header>
<main>
<video id="video" width="640" height="480" autoplay></video>
<button id="snap">Snap Photo</button>
<section class="camera-output">
<canvas id="canvas" width="640" height="480"></canvas>
<h3>Once it ouputs, Draw on the Still Image with your Mouse!</h3>
</section>
</main>
<script type="text/javascript" src="photo.js"></script>
</body>
</html>
69 changes: 69 additions & 0 deletions Galen-Wendy/Camera/photo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Browser Camera from David Walsh http://davidwalsh.name/browser-camera
// Canvas Drawing Adapted from bogonko http://stackoverflow.com/questions/2368784/draw-by-mouse-with-html5-canvas
// http://jsfiddle.net/ArtBIT/kneDX/

// Put event listeners into place
window.addEventListener("DOMContentLoaded", function() {
// Grab elements, create settings, etc.
var canvas = document.getElementById("canvas"),
context = canvas.getContext("2d"),
video = document.getElementById("video"),
videoObj = { "video": true },
errBack = function(error) {
console.log("Video capture error: ", error.code);
};

// Put video listeners into place
if(navigator.getUserMedia) { // Standard
navigator.getUserMedia(videoObj, function(stream) {
video.src = stream;
video.play();
}, errBack);
} else if(navigator.webkitGetUserMedia) { // WebKit-prefixed
navigator.webkitGetUserMedia(videoObj, function(stream){
video.src = window.webkitURL.createObjectURL(stream);
video.play();
}, errBack);
}
else if(navigator.mozGetUserMedia) { // Firefox-prefixed
navigator.mozGetUserMedia(videoObj, function(stream){
video.src = window.URL.createObjectURL(stream);
video.play();
}, errBack);
}

}, false);

document.getElementById("snap").addEventListener("click", function() {
canvas.getContext("2d").drawImage(video, 0, 0, 640, 480);

//Add Drawing Functionality
var ctx = canvas.getContext("2d");
// define a custom fillCircle method
ctx.fillCircle = function(x, y, radius, fillColor) {
this.fillStyle = fillColor;
this.beginPath();
this.moveTo(x, y);
this.arc(x, y, radius, 0, Math.PI * 2, false);
this.fill();
};
// bind mouse events
canvas.onmousemove = function(e) {
if (!canvas.isDrawing) {
return;
}
var x = e.pageX - this.offsetLeft;
var y = e.pageY - this.offsetTop;
var radius = 3; // or whatever
var fillColor = '#000000';
ctx.fillCircle(x, y, radius, fillColor);
};
canvas.onmousedown = function(e) {
canvas.isDrawing = true;
};
canvas.node.onmouseup = function(e) {
canvas.isDrawing = false;
};

});

12 changes: 12 additions & 0 deletions Galen-Wendy/Email_Form/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#Email Form Example
A sample 'Contact' form using name/email/message inputs for when you want spam from bots.
Has potential PHP functionality if it's on a server that supports it. Python local servers return a 501 error.

###LocalStorage!
localStorage functionality for saving form values courtesy of Jon Duckett's Javascript book.
Added an event listener for the submit button that clears the local storage form values.


#####Sources
[Jon Duckett's LocalStorage Code](http://javascriptbook.com/code/c09/js/local-storage.js)
Tangled in Design's [PHP form Example](http://tangledindesign.com/how-to-create-a-contact-form-using-html5-css3-and-php/)
23 changes: 23 additions & 0 deletions Galen-Wendy/Email_Form/email_form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
label {
display: block;
margin-top: 15px;
}

input:focus, textarea:focus {
border:1px solid #97d6eb;
}

input, textarea {
width:200px;
border-radius: 2px;
}

textarea {
height: 240px;
}

#submit {
display: block;
width: 60px;
margin-top: 15px;
}
27 changes: 27 additions & 0 deletions Galen-Wendy/Email_Form/email_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<!-- Adapted from http://tangledindesign.com/how-to-create-a-contact-form-using-html5-css3-and-php/ -->
<html lang="en">
<head>
<meta charset='utf-8'>
<title>HTML5 Email Form</title>
<link href="email_form.css" type="text/css" rel="stylesheet">
<link href="../main.css" type="text/css" rel="stylesheet">
</head>
<body>
<main>
<header>
<h1>HTML5 Email Contact Form</h1>
</header>
<form id="contact-form" method="post" action="email_form.php">
<label for="name">Name</label>
<input id ="name" name="name" type="text" placeholder="Full name" required autofocus>
<label for="email">Email</label>
<input id="email" name="email" type="email" placeholder="Example@Domain.com" required>
<label for="message">Message</label>
<textarea id="message" name="message" type="text" placeholder="Your Message" value=""></textarea>
<input id="submit" name="submit" type="submit" value="Submit" role="button">
</form>
</main>
<script type="text/javascript" src="email_form.js"></script>
</body>
</html>
32 changes: 32 additions & 0 deletions Galen-Wendy/Email_Form/email_form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// From Jon Duckett's Javascript and Jquery 2014 and David Winer's local storage demo
if (typeof (Storage) != undefined) {
// Get form elements
var txtName = document.getElementById('name');
var txtEmail = document.getElementById('email');
var txtMessage = document.getElementById('message');

// Elements populated by localStorage data
txtName.value = localStorage.getItem('name');
txtEmail.value = localStorage.getItem('email');
txtMessage.value = localStorage.getItem('message');

// Data saved on keyup
txtName.addEventListener('input', function () {
localStorage.setItem('name', txtName.value);
}, false);

txtEmail.addEventListener('input', function () {
localStorage.setItem('email', txtEmail.value);
}, false);

txtMessage.addEventListener('input', function () {
localStorage.setItem('message', txtMessage.value);
}, false);

//clear local Storage by Keys on submit
document.getElementById('submit').addEventListener('click', function () {
localStorage.removeItem('name');
localStorage.removeItem('email');
localStorage.removeItem('message');
}, false);
};
20 changes: 20 additions & 0 deletions Galen-Wendy/Email_Form/email_form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
// Adapted from http://tangledindesign.com/how-to-create-a-contact-form-using-html5-css3-and-php/

$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$from = 'From: DemoTestSite';
$to = 'galen.broderick@gmail.com';
$subject = 'DemoTestSite Email';
$human = $_POST['humanCheck'];

$body = "From: $name\n E-Mail: $email\n Message:\n $message";
if ($_POST['submit']) {
if (mail ($to, $subject, $body, $from)) {
echo '<p>Your message has been sent!</p>';
} else {
echo '<p>Something went wrong, go back and try again!</p>';
}
}
?>
Loading