Yahoo! logo randomiser and generator.
Last active
December 20, 2015 21:29
-
-
Save blech/6197998 to your computer and use it in GitHub Desktop.
Yahoo! logo! generator!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Yellvetica!</title> | |
<meta name="generator" content="BBEdit 10.5" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<style type="text/css"> | |
body { background-color: #fff; margin: 0px; | |
color: rgb(108, 59, 147); | |
font-family: 'helvetica neue', helvetica, arial, sans-serif; | |
font-size: 16px; } | |
h1{ color: rgb(108, 59, 147); | |
font-family: 'helvetica neue', helvetica, arial, sans-serif; | |
font-size: 90px; | |
font-weight: bold; | |
letter-spacing: -2px; | |
margin: 30px; } | |
form { margin: 30px; } | |
label { width: 160px; display: block; float: left; } | |
</style> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1><span class="y">Y</span><span class="a">a</span><span class="h">h</span><span class="o">o</span><span class="oo">o</span><span class="f">!</span></h1> | |
<form id="designer" name="designer" method="GET" action=""> | |
<label for="font">Select a typeface!</label> | |
<select name="font" id="font"> | |
<option value="arial">Arial</option> | |
<option value="brush script mt">Brush Script</option> | |
<option value="comic sans ms">Comic Sans</option> | |
<option value="helvetica">Helvetica</option> | |
<option value="helvetica neue" selected="selected">Helvetica Neue</option> | |
<option value="impact">Impact</option> | |
<option value="myriad pro">Myriad</option> | |
<option value="marker felt">Marker Felt</option> | |
<option value="palatino">Palatino</option> | |
<option value="papyrus">Papyrus</option> | |
<option value="times new roman">Times New Roman</option> | |
<option value="verdana">Verdana</option> | |
<option value="zapfino">Zapfino</option> | |
</select><br> | |
<label for="colour">Select a colour!</label> | |
<select id="colour" name="colour"> | |
<option value="purple" selected="selected">Purple</option> | |
</select><br> | |
<label for="wonky">Wonky lettering!?</label> | |
<input id="wonky" type="checkbox"></input><br> | |
<label for="pling">Exclamation mark!?</label> | |
<input id="pling" type="checkbox" disabled="disabled" checked="checked"></input><br> | |
</form> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('#designer').change(function() { | |
$('h1').css('font-family', $('#font').val()); | |
if ($('#wonky').prop('checked')) { | |
$('.a').css('font-size', '76px'); | |
$('.o').css('font-size', '76px'); | |
} else { | |
$('.a').css('font-size', '90px'); | |
$('.o').css('font-size', '90px'); | |
} | |
}); | |
}); | |
window.setInterval(randomise, 7500); | |
function randomise() { | |
var $options = $('#font').find('option'), | |
random = ~~(Math.random() * $options.length); | |
$('#font').val($options[random].value) | |
$('h1').css('font-family', $('#font').val()); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment