diff options
| author | Josh Brewer | 2011-04-19 00:25:24 -0700 |
|---|---|---|
| committer | Josh Brewer | 2011-04-19 00:25:24 -0700 |
| commit | 4801f4a46ccb8ea97f3683712c3774f6dd396e8b (patch) | |
| tree | 9e37006bb82116bbf5dd8c2e88baec99d73aa0bb | |
| parent | aec7a7fca503639f78795d0baaf4a67c455704d1 (diff) | |
| download | ffffallback-4801f4a46ccb8ea97f3683712c3774f6dd396e8b.tar.bz2 | |
added lettering.js and some small css tweaks
| -rw-r--r-- | site/css/screen2.css | 12 | ||||
| -rw-r--r-- | site/index.html | 12 | ||||
| -rwxr-xr-x | site/js/jquery.lettering.js | 66 |
3 files changed, 82 insertions, 8 deletions
diff --git a/site/css/screen2.css b/site/css/screen2.css index bad6f32..eb26819 100644 --- a/site/css/screen2.css +++ b/site/css/screen2.css @@ -141,7 +141,7 @@ span.horizon { position:absolute; } span.rising {width:100%; margin-top:10.5em;} -span.setting {width:52em; margin-top:2.5em;margin-left:-22em;} +span.setting {width:52em; margin-top:2.5em;margin-left:-20em;} #main { border-left: 1px solid #423e39; margin:0 0 0 4em; @@ -199,11 +199,11 @@ hgroup h2 { background: #2d2a27; color:#fef1d8; font-size:1.05em; - left:27.5em; + left:26.75em; line-height:1; position:absolute; text-transform:uppercase; - top:3.85em; + top:2em; height: 7em; width: 7em; -webkit-border-radius: 7em; @@ -229,13 +229,14 @@ hgroup h2 { } .brave i { font-family:"kulturista-web-1","kulturista-web-2", "Courier New"; + font-size:0.8125em; font-style: normal; font-weight: normal; - top: 1.75em; + top: 2.25em; position: relative; width: 4em; display: block; - left: 2em; + left: 2.25em; } hgroup + p, hgroup + p + p { @@ -273,6 +274,7 @@ hgroup + p, hgroup + p + p { text-align:center; text-transform: uppercase; text-shadow:0 1px 1px #2D2A27; + z-index:100; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; diff --git a/site/index.html b/site/index.html index c4e5dd2..402a953 100644 --- a/site/index.html +++ b/site/index.html @@ -12,11 +12,17 @@ <link rel="shortcut icon" href="/favicon.ico"> - <!-- CSS : implied media="all" --> - <link rel="stylesheet" href="css/screen2.css"> - <script type="text/javascript" src="http://use.typekit.com/rbn4gdu.js"></script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script> + + <link rel="stylesheet" href="css/screen2.css"> + + <script src="js/jquery.lettering.js"></script> + <script> + $(document).ready(function() { + $("h1").lettering(); + }); + </script> <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> diff --git a/site/js/jquery.lettering.js b/site/js/jquery.lettering.js new file mode 100755 index 0000000..4515590 --- /dev/null +++ b/site/js/jquery.lettering.js @@ -0,0 +1,66 @@ +/*global jQuery */ +/*! +* Lettering.JS 0.6.1 +* +* Copyright 2010, Dave Rupert http://daverupert.com +* Released under the WTFPL license +* http://sam.zoy.org/wtfpl/ +* +* Thanks to Paul Irish - http://paulirish.com - for the feedback. +* +* Date: Mon Sep 20 17:14:00 2010 -0600 +*/ +(function($){ + function injector(t, splitter, klass, after) { + var a = t.text().split(splitter), inject = ''; + if (a.length) { + $(a).each(function(i, item) { + inject += '<span class="'+klass+(i+1)+'">'+item+'</span>'+after; + }); + t.empty().append(inject); + } + } + + var methods = { + init : function() { + + return this.each(function() { + injector($(this), '', 'char', ''); + }); + + }, + + words : function() { + + return this.each(function() { + injector($(this), ' ', 'word', ' '); + }); + + }, + + lines : function() { + + return this.each(function() { + var r = "eefec303079ad17405c889e092e105b0"; + // Because it's hard to split a <br/> tag consistently across browsers, + // (*ahem* IE *ahem*), we replaces all <br/> instances with an md5 hash + // (of the word "split"). If you're trying to use this plugin on that + // md5 hash string, it will fail because you're being ridiculous. + injector($(this).children("br").replaceWith(r).end(), r, 'line', ''); + }); + + } + }; + + $.fn.lettering = function( method ) { + // Method calling logic + if ( method && methods[method] ) { + return methods[ method ].apply( this, [].slice.call( arguments, 1 )); + } else if ( method === 'letters' || ! method ) { + return methods.init.apply( this, [].slice.call( arguments, 0 ) ); // always pass an array + } + $.error( 'Method ' + method + ' does not exist on jQuery.lettering' ); + return this; + }; + +})(jQuery);
\ No newline at end of file |
