Initial commit.
114
404.html
Normal file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<!--
|
||||
320 and Up boilerplate extension
|
||||
Author: Andy Clarke
|
||||
Version: 0.9b
|
||||
URL: http://stuffandnonsense.co.uk/projects/320andup
|
||||
-->
|
||||
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7" manifest="default.appcache?v=1"><![endif]-->
|
||||
<!--[if lt IE 7 ]><html class="no-js ie6" lang="en"><![endif]-->
|
||||
<!--[if IE 7 ]><html class="no-js ie7" lang="en"><![endif]-->
|
||||
<!--[if IE 8 ]><html class="no-js ie8" lang="en"><![endif]-->
|
||||
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" manifest="default.appcache?v=1" lang="en"><!--<![endif]-->
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>320 and up</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1">
|
||||
|
||||
<!-- For less capable mobile browsers
|
||||
<link rel="stylesheet" media="handheld" href="css/handheld.css?v=1"> -->
|
||||
|
||||
<!-- For all browsers -->
|
||||
<link rel="stylesheet" href="css/style.css?v=1">
|
||||
|
||||
<!-- JavaScript at bottom except for Modernizr -->
|
||||
<script src="js/libs/modernizr-1.7.min.js"></script>
|
||||
|
||||
<!-- For iPhone 4 -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/h/apple-touch-icon.png">
|
||||
<!-- For iPad 1-->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/m/apple-touch-icon.png">
|
||||
<!-- For iPhone 3G, iPod Touch and Android -->
|
||||
<link rel="apple-touch-icon-precomposed" href="img/l/apple-touch-icon-precomposed.png">
|
||||
<!-- For Nokia -->
|
||||
<link rel="shortcut icon" href="img/l/apple-touch-icon.png">
|
||||
<!-- For everything else -->
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
|
||||
<!--iOS. Delete if not required -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="apple-touch-startup-image" href="img/splash.png">
|
||||
|
||||
<!--Microsoft. Delete if not required -->
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
|
||||
<!-- http://t.co/y1jPVnT -->
|
||||
<link rel="canonical" href="/">
|
||||
</head>
|
||||
|
||||
<body class="clearfix">
|
||||
|
||||
<header role="banner" class="clearfix">
|
||||
<h1>320 and up</h1>
|
||||
</header>
|
||||
|
||||
<div class="content clearfix">
|
||||
|
||||
<h1>Page not found</h1>
|
||||
|
||||
<div role="main">
|
||||
<p>Sorry, but the page you’re looking for doesn’t not exist.</p>
|
||||
<p>It looks like this was either the result of:</p>
|
||||
|
||||
<ul>
|
||||
<li>A mis-typed address</li>
|
||||
<li>An out-of-date link</li>
|
||||
</ul>
|
||||
|
||||
<script>var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2), GOOG_FIXURL_SITE = location.host;</script>
|
||||
<script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
|
||||
</div>
|
||||
|
||||
<div role="complimentary">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer role="contentinfo" class="clearfix">
|
||||
</footer>
|
||||
|
||||
<!-- mathiasbynens.be/notes/async-analytics-snippet Change UA-XXXXX-X to be your site's ID -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">\x3C/script>')</script>
|
||||
<!-- Scripts -->
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
|
||||
<!--[if (lt IE 9) & (!IEMobile)]>
|
||||
<script src="js/libs/DOMAssistantCompressed-2.8.js"></script>
|
||||
<script src="js/libs/selectivizr-1.0.1.js"></script>
|
||||
<script src="js/libs/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- http://t.co/HZe9oJ4 -->
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; // Change UA-XXXXX-X to be your site's ID
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
|
||||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
<noscript>Your browser does not support JavaScript!</noscript>
|
||||
</body>
|
||||
</html>
|
||||
BIN
apple-touch-icon-114x114-precomposed.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
apple-touch-icon-57x57-precomposed.png
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
apple-touch-icon-72x72-precomposed.png
Normal file
|
After Width: | Height: | Size: 747 B |
BIN
apple-touch-icon-precomposed.png
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 640 B |
816
build/build.xml
Normal file
@ -0,0 +1,816 @@
|
||||
<?xml version="1.0"?>
|
||||
<project name="Boilerplate Build" default="build" basedir="../"> <!-- one back since we're in build/ -->
|
||||
|
||||
|
||||
<!-- Load in Ant-Contrib to give us access to some very useful tasks! -->
|
||||
<!-- the .jar file is located in the tools directory -->
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
||||
<classpath>
|
||||
<pathelement location="${basedir}/build/tools/ant-contrib-1.0b3.jar"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
|
||||
<!-- load shell environment -->
|
||||
<property environment="ENV" />
|
||||
|
||||
<!-- load property files -->
|
||||
<property file="build/config/project.properties"/>
|
||||
<property file="build/config/default.properties"/>
|
||||
|
||||
<!-- merge the stylesheet properties -->
|
||||
<var name="stylesheet-files" value="${file.stylesheets}, ${file.default.stylesheets}"/>
|
||||
|
||||
<!-- merge the pages properties -->
|
||||
<var name="page-files" value="${file.pages}, ${file.pages.default.include}"/>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
*************************************************
|
||||
* BASE TARGETS *
|
||||
*************************************************
|
||||
-->
|
||||
<target name="basics">
|
||||
<if>
|
||||
<equals arg1="${env}" arg2="dev"/>
|
||||
<then>
|
||||
<!-- Build a dev environment -->
|
||||
<echo message="Building a Development Environment..."/>
|
||||
<antcall target="-basics.dev"/>
|
||||
</then>
|
||||
|
||||
<elseif>
|
||||
<equals arg1="${env}" arg2="test"/>
|
||||
<then>
|
||||
<!-- Build a test environment -->
|
||||
<echo message="Building a Test Environment..."/>
|
||||
<antcall target="-basics.test"/>
|
||||
</then>
|
||||
</elseif>
|
||||
|
||||
<else>
|
||||
<!-- Build a production environment -->
|
||||
<echo message="Building a Production Environment..."/>
|
||||
<antcall target="-basics.production"/>
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="text">
|
||||
<if>
|
||||
<equals arg1="${env}" arg2="dev"/>
|
||||
<then>
|
||||
<!-- Build a dev environment -->
|
||||
<echo message="Building a Development Environment..."/>
|
||||
<antcall target="-text.dev"/>
|
||||
</then>
|
||||
|
||||
<elseif>
|
||||
<equals arg1="${env}" arg2="test"/>
|
||||
<then>
|
||||
<!-- Build a test environment -->
|
||||
<echo message="Building a Test Environment..."/>
|
||||
<antcall target="-text.test"/>
|
||||
</then>
|
||||
</elseif>
|
||||
|
||||
<else>
|
||||
<!-- Build a production environment -->
|
||||
<echo message="Building a Production Environment..."/>
|
||||
<antcall target="-text.production"/>
|
||||
</else>
|
||||
</if>
|
||||
<!-- funky order due to jpegtran being a jerk. See comment at top of imagesjpg task -->
|
||||
<antcall target="-jpgcopy"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="buildkit">
|
||||
<if>
|
||||
<equals arg1="${env}" arg2="dev"/>
|
||||
<then>
|
||||
<!-- Build a dev environment -->
|
||||
<echo message="Building a Development Environment..."/>
|
||||
<antcall target="-buildkit.dev"/>
|
||||
</then>
|
||||
|
||||
<elseif>
|
||||
<equals arg1="${env}" arg2="test"/>
|
||||
<then>
|
||||
<!-- Build a test environment -->
|
||||
<echo message="Building a Test Environment..."/>
|
||||
<antcall target="-buildkit.test"/>
|
||||
</then>
|
||||
</elseif>
|
||||
|
||||
<else>
|
||||
<!-- Build a production environment -->
|
||||
<echo message="Building a Production Environment..."/>
|
||||
<antcall target="-buildkit.production"/>
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="build">
|
||||
<if>
|
||||
<equals arg1="${env}" arg2="dev"/>
|
||||
<then>
|
||||
<!-- Build a dev environment -->
|
||||
<echo message="Building a Development Environment..."/>
|
||||
<antcall target="-build.dev" />
|
||||
</then>
|
||||
|
||||
<elseif>
|
||||
<equals arg1="${env}" arg2="test"/>
|
||||
<then>
|
||||
<!-- Build a test environment -->
|
||||
<echo message="Building a Test Environment..."/>
|
||||
<antcall target="-build.test" />
|
||||
</then>
|
||||
</elseif>
|
||||
|
||||
<else>
|
||||
<!-- Build a production environment -->
|
||||
<echo message="Building a Production Environment..."/>
|
||||
<antcall target="-build.production" />
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="minify">
|
||||
<if>
|
||||
<equals arg1="${env}" arg2="dev"/>
|
||||
<then>
|
||||
<!-- Build a dev environment -->
|
||||
<echo message="Building a Development Environment..."/>
|
||||
<antcall target="-minify.dev"/>
|
||||
</then>
|
||||
|
||||
<elseif>
|
||||
<equals arg1="${env}" arg2="test"/>
|
||||
<then>
|
||||
<!-- Build a test environment -->
|
||||
<echo message="Building a Test Environment..."/>
|
||||
<antcall target="-minify.test"/>
|
||||
</then>
|
||||
</elseif>
|
||||
|
||||
<else>
|
||||
<!-- Build a production environment -->
|
||||
<echo message="Building a Production Environment..."/>
|
||||
<antcall target="-minify.production"/>
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
|
||||
<!--
|
||||
*************************************************
|
||||
* BUILD TARGETS *
|
||||
*************************************************
|
||||
-->
|
||||
|
||||
<!-- Target: basics -->
|
||||
<target name="-basics.dev"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-copy"/>
|
||||
|
||||
<target name="-basics.test"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-copy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-css,
|
||||
-html"/>
|
||||
|
||||
<target name="-basics.production"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-copy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-strip-console.log,
|
||||
-css,
|
||||
-html"/>
|
||||
|
||||
<!-- Target: text -->
|
||||
<target name="-text.dev"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-copy"/>
|
||||
|
||||
<target name="-text.test"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-copy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-css,
|
||||
-html,
|
||||
-htmlclean"/>
|
||||
|
||||
<target name="-text.production"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-copy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-strip-console.log,
|
||||
-css,
|
||||
-html,
|
||||
-htmlclean"/>
|
||||
|
||||
<!-- Target: buildkit -->
|
||||
<target name="-buildkit.dev"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<target name="-buildkit.test"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-css,
|
||||
-html,
|
||||
-htmlbuildkit,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<target name="-buildkit.production"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-strip-console.log,
|
||||
-css,
|
||||
-html,
|
||||
-htmlbuildkit,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<!-- Target: build -->
|
||||
<target name="-build.dev"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<target name="-build.test"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-css,
|
||||
-html,
|
||||
-htmlclean,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<target name="-build.production"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-strip-console.log,
|
||||
-css,
|
||||
-html,
|
||||
-htmlclean,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<!-- Target: minify -->
|
||||
<target name="-minify.dev"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<target name="-minify.test"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-css,
|
||||
-html,
|
||||
-htmlcompress,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<target name="-minify.production"
|
||||
depends="-rev,
|
||||
-clean,
|
||||
-prodcopy,
|
||||
-usemin,
|
||||
-js.all.minify,
|
||||
-js.main.concat,
|
||||
-js.mylibs.concat,
|
||||
-js.scripts.concat,
|
||||
-js.delete,
|
||||
-strip-console.log,
|
||||
-css,
|
||||
-html,
|
||||
-htmlcompress,
|
||||
-imagespng,
|
||||
-imagesjpg"/>
|
||||
|
||||
<!--
|
||||
*************************************************
|
||||
* FUNCTION TARGETS *
|
||||
*************************************************
|
||||
-->
|
||||
<target name="-load-build-info" description="(PRIVATE) Loads the build versioning information">
|
||||
<property file="./${dir.build}/config/${build.version.info}"/>
|
||||
</target>
|
||||
|
||||
<target name="-clean" description="(PRIVATE) Wipe the previous build (Deletes the dir.publish directory">
|
||||
<!-- This is a private target -->
|
||||
|
||||
<echo message="Cleaning up previous build directory..."/>
|
||||
<delete dir="./${dir.publish}/"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-rev" description="(PRIVATE) Increase the current build number by one and set build date">
|
||||
<!-- This is a private target -->
|
||||
|
||||
<echo message="====================================================================="/>
|
||||
<echo message="Welcome to the HTML5 Boilerplate Build Script!"/>
|
||||
<echo message=" "/>
|
||||
<echo message="We're going to get your site all ship-shape and ready for prime time."/>
|
||||
<echo message=" "/>
|
||||
<echo message="This should take somewhere between 15 seconds and a few minutes,"/>
|
||||
<echo message="mostly depending on how many images we're going to compress."/>
|
||||
<echo message=" "/>
|
||||
<echo message="Feel free to come back or stay here and follow along."/>
|
||||
<echo message="====================================================================="/>
|
||||
<echo message=" "/>
|
||||
<echo message=" "/>
|
||||
|
||||
|
||||
<echo message="Increasing the build number..."/>
|
||||
<propertyfile file="./${dir.build}/config/${build.version.info}" comment="Build Information File - DO NOT CHANGE">
|
||||
<entry key="build.number" type="int" default="0000" operation="+" pattern="0000"/>
|
||||
<entry key="build.date" type="date" value="now" pattern="dd.MM.yyyy HH:mm"/>
|
||||
</propertyfile>
|
||||
<property file="./${dir.build}/config/${build.version.info}"/>
|
||||
<echo>Creating build ${build.number}</echo>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="current-number" depends="-load-build-info" description="(PUBLIC) Returns the current build number">
|
||||
<echo>Current build number: ${build.number}</echo>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-copy" depends="-load-build-info">
|
||||
<!-- This is a private target -->
|
||||
|
||||
<echo message="Copying over new files..."/>
|
||||
<!-- combine the 2 exclude properties -->
|
||||
<var name="excluded-files" value="${file.default.exclude}, ${file.exclude}"/>
|
||||
|
||||
<copy todir="./${dir.publish}">
|
||||
<fileset dir="${dir.source}/" excludes="${excluded-files}"/>
|
||||
</copy>
|
||||
|
||||
<echo message="A copy of all non-dev files are now in: ./${dir.publish}."/>
|
||||
</target>
|
||||
|
||||
<target name="-prodcopy" depends="-load-build-info">
|
||||
<!-- This is a private target -->
|
||||
|
||||
<echo message="Copying over new files..."/>
|
||||
<!-- combine the 2 exclude properties -->
|
||||
<var name="prod-excluded-files" value="${file.default.exclude}, ${file.jpg.exclude}, ${file.exclude}"/>
|
||||
|
||||
<copy todir="./${dir.publish}">
|
||||
<fileset dir="${dir.source}/" excludes="${prod-excluded-files}"/>
|
||||
</copy>
|
||||
|
||||
<echo message="A copy of all non-dev files are now in: ./${dir.publish}."/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- JAVASCRIPT -->
|
||||
<target name="-js.main.concat" depends="-load-build-info" description="(PRIVATE) Concatenates the JS files in dir.js">
|
||||
<echo message="Concatenating Main JS scripts..."/>
|
||||
<concat destfile="./${dir.publish}/${dir.js}/scripts-${build.number}.js">
|
||||
<fileset dir="./${dir.publish}/">
|
||||
<include name="**/${dir.js.main}/*.min.js"/>
|
||||
<exclude name="**/${dir.js.mylibs}/*.js"/>
|
||||
<exclude name="**/${dir.js.libs}/*.js"/>
|
||||
</fileset>
|
||||
</concat>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-js.mylibs.concat" depends="-load-build-info" description="(PRIVATE) Concatenates the JS files in dir.js.mylibs">
|
||||
<echo message="Concatenating JS libraries"/>
|
||||
<concat destfile="./${dir.publish}/${dir.js}/libs-${build.number}.js">
|
||||
<fileset dir="./${dir.publish}/${dir.js.mylibs}/">
|
||||
<include name="**/*.min.js"/>
|
||||
</fileset>
|
||||
</concat>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-js.scripts.concat" depends="-load-build-info" if="build.concat.scripts">
|
||||
<echo message="Concatenating library file with main script file"/>
|
||||
<concat destfile="./${dir.publish}/${dir.js}/scripts-${build.number}.min.js">
|
||||
<fileset dir="./${dir.publish}/${dir.js}/">
|
||||
<include name="libs-${build.number}.js"/>
|
||||
<include name="scripts-${build.number}.js"/>
|
||||
</fileset>
|
||||
</concat>
|
||||
|
||||
<echo message="Concatenating library file with main debug script file"/>
|
||||
<concat destfile="./${dir.publish}/${dir.js}/scripts-${build.number}-debug.min.js">
|
||||
<fileset dir="./${dir.publish}/${dir.js}/">
|
||||
<include name="libs-${build.number}.js"/>
|
||||
<include name="scripts-${build.number}-debug.js"/>
|
||||
</fileset>
|
||||
</concat>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-js.all.minify" depends="-js.libs.minify" description="(PRIVATE) Minifies the scripts.js files created by js.scripts.concat">
|
||||
<echo message="Minifying concatenated script- and library-file"/>
|
||||
<apply executable="java" parallel="false">
|
||||
<fileset dir="./${dir.publish}/${dir.js}">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="**/*.min.js"/>
|
||||
<exclude name="**/${dir.js.libs}/*.js"/>
|
||||
</fileset>
|
||||
<arg line="-jar"/>
|
||||
<arg path="./${dir.build.tools}/${tool.yuicompressor}"/>
|
||||
<srcfile/>
|
||||
<arg line="--line-break"/>
|
||||
<arg line="4000"/>
|
||||
<arg line="-o"/>
|
||||
<mapper type="glob" from="*.js" to="../${dir.publish}/${dir.js}/*.min.js"/>
|
||||
<targetfile/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-js.libs.minify" depends="-load-build-info" description="(PRIVATE) Minifies the helper files in dir.js.libs">
|
||||
<echo message="Minifying helper JS files..."/>
|
||||
|
||||
<apply executable="java" parallel="false">
|
||||
<fileset dir="./${dir.publish}/${dir.js.libs}/" includes="*.js" excludes="*.min.js"/>
|
||||
<arg line="-jar"/>
|
||||
<arg path="./${dir.build.tools}/${tool.yuicompressor}"/>
|
||||
<srcfile/>
|
||||
<arg line="-o"/>
|
||||
<mapper type="glob" from="*.js" to="../${dir.publish}/${dir.js.libs}/*-${build.number}.min.js"/>
|
||||
<targetfile/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-js.delete" depends="-load-build-info" description="(PRIVATE) Deletes the unoptimized js files from build if set">
|
||||
<if>
|
||||
<equals arg1="${build.delete.unoptimized}" arg2="true"/>
|
||||
<then>
|
||||
<echo message="Deleting unoptimized files..."/>
|
||||
<delete file="./${dir.publish}/${dir.js}/scripts-${build.number}.js"/>
|
||||
<delete file="./${dir.publish}/${dir.js}/scripts-${build.number}-debug.js"/>
|
||||
<!--
|
||||
<delete dir="./${dir.publish}/${dir.js.lib}/"/>
|
||||
<delete file="./${dir.publish}/${dir.js}/libs-${build.number}.js"/>
|
||||
this guy probably COULD be on but I think it's better if we keep him off for now. ^pi
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="./${dir.publish}/${dir.js.libs}/" includes="*.js" excludes="*.min.js"/>
|
||||
</delete>
|
||||
-->
|
||||
</then>
|
||||
</if>
|
||||
|
||||
<if>
|
||||
<and>
|
||||
<equals arg1="${build.delete.unoptimized}" arg2="true"/>
|
||||
<equals arg1="${build.concat.scripts}" arg2="true"/>
|
||||
</and>
|
||||
<then>
|
||||
<delete file="./${dir.publish}/${dir.js}/libs-${build.number}.js"/>
|
||||
<delete file="./${dir.publish}/${dir.js}/scripts-${build.number}.js"/>
|
||||
</then>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-strip-console.log" description="(PRIVATE)Comments out any console.log statements">
|
||||
<echo message="Commenting out console.log lines"/>
|
||||
|
||||
|
||||
<replaceregexp match="(console.log\(.*\))" replace="/\*\1\*/" flags="g" >
|
||||
<fileset dir="./${dir.publish}/${dir.js}/">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="**/*.min.js"/>
|
||||
</fileset>
|
||||
</replaceregexp>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- HTML -->
|
||||
<target name="-usemin" depends="-serverconfig" description="(PRIVATE) Replaces references to non-minified scripts">
|
||||
<echo message="Switching to minified js files..."/>
|
||||
|
||||
<!-- switch from a regular jquery to minified -->
|
||||
<replaceregexp match="jquery-(\d|\d(\.\d)+)\.js" replace="jquery-\1.min.js" flags="g">
|
||||
<fileset dir="./${dir.publish}" includes="${page-files}"/>
|
||||
</replaceregexp>
|
||||
<!-- switch any google CDN reference to minified -->
|
||||
<replaceregexp match="(\d|\d(\.\d)+)\/jquery\.js" replace="\1/jquery.min.js" flags="g">
|
||||
<fileset dir="./${dir.publish}" includes="${page-files}"/>
|
||||
</replaceregexp>
|
||||
|
||||
<echo>Kill off those versioning flags: ?v=2</echo>
|
||||
<replaceregexp match='\?v=\d+">' replace='">' flags="g">
|
||||
<fileset dir="./${dir.publish}" includes="${page-files}"/>
|
||||
</replaceregexp>
|
||||
|
||||
<echo>Remove favicon.ico reference if it is pointing to the root</echo>
|
||||
<replaceregexp match="<link rel="shortcut icon" href="/favicon\.ico">" replace="">
|
||||
<fileset dir="./${dir.publish}" includes="${page-files}"/>
|
||||
</replaceregexp>
|
||||
<!-- we maintain the apple-touch-icon reference for Android 2.2 www.ravelrumba.com/blog/android-apple-touch-icon
|
||||
<replace token="<link rel="apple-touch-icon" href="/apple-touch-icon.png">" value="">
|
||||
<fileset dir="./${dir.publish}" includes="${page-files}"/>
|
||||
</replace>
|
||||
-->
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-html" depends="-load-build-info" description="(PRIVATE) Very basic clean up of the HTML">
|
||||
<echo message="Update the HTML to reference our concatenated script file: scripts-${build.number}.min.js"/>
|
||||
<!-- style.css replacement handled as a replacetoken above -->
|
||||
<replaceregexp match="<!-- scripts concatenated [\d\w\s\W]*?!-- end ((scripts)|(concatenated and minified scripts))-->" replace="<script src='${dir.js}/scripts-${build.number}.min.js\'></script>" flags="m">
|
||||
<fileset dir="./${dir.publish}" includes="${page-files}"/>
|
||||
</replaceregexp>
|
||||
<!--[! use comments like this one to avoid having them get minified -->
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-htmlclean">
|
||||
<echo message="Run htmlcompressor on the HTML"/>
|
||||
<echo message=" - maintaining whitespace"/>
|
||||
<echo message=" - removing html comments"/>
|
||||
<echo message=" - compressing inline style/script tag contents"/>
|
||||
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
|
||||
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
|
||||
<arg value="-jar"/>
|
||||
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
|
||||
<arg line="--type html"/>
|
||||
<arg line="--preserve-multi-spaces"/>
|
||||
<arg line="--remove-quotes"/>
|
||||
<arg line="--compress-js"/>
|
||||
<arg line="--compress-css"/>
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<mapper type="glob" from="*.html" to="../${dir.publish}/*.html"/>
|
||||
<targetfile/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-htmlbuildkit">
|
||||
<echo message="Run htmlcompressor on the HTML"/>
|
||||
<echo message=" - maintaining whitespace"/>
|
||||
<echo message=" - retain html comments"/>
|
||||
<echo message=" - compressing inline style/script tag contents"/>
|
||||
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
|
||||
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
|
||||
<arg value="-jar"/>
|
||||
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
|
||||
<arg value="--preserve-comments"/>
|
||||
<arg line="--preserve-multi-spaces"/>
|
||||
<arg line="--type html"/>
|
||||
<arg line="--compress-js"/>
|
||||
<arg line="--compress-css"/>
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<mapper type="glob" from="*.html" to="../${dir.publish}/*.html"/>
|
||||
<targetfile/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-htmlcompress">
|
||||
<echo message="Run htmlcompressor on the HTML"/>
|
||||
<echo message=" - removing unnecessary whitespace"/>
|
||||
<echo message=" - removing html comments"/>
|
||||
<echo message=" - compressing inline style/script tag contents"/>
|
||||
<apply executable="java" parallel="false" force="true" dest="./${dir.publish}/" >
|
||||
<fileset dir="./${dir.publish}/" includes="${page-files}"/>
|
||||
<arg value="-jar"/>
|
||||
<arg path="./${dir.build}/tools/${tool.htmlcompressor}"/>
|
||||
<arg line="--type html"/>
|
||||
<arg line="--remove-quotes"/>
|
||||
<arg line="--compress-js"/>
|
||||
<arg line="--compress-css"/>
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<mapper type="glob" from="*.html" to="../${dir.publish}/*.html"/>
|
||||
<targetfile/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-serverconfig" description="(PRIVATE) Upgrades expires headers">
|
||||
<echo message="Upgrading expires header timeouts for js/css to 1yr..."/>
|
||||
<replace file="./${dir.publish}/${file.serverconfig}" token="access plus 2 months" value="access plus 1 year"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- CSS -->
|
||||
<target name="-css" depends="-load-build-info" description="Concatenates and Minifies any stylesheets listed in the file.stylesheets property">
|
||||
<echo message="Concatenating css..."/>
|
||||
|
||||
<concat destfile="./${dir.publish}/${dir.css}/style-${build.number}.css">
|
||||
<filelist dir="./${dir.publish}/${dir.css}" files="${stylesheet-files}"/>
|
||||
</concat>
|
||||
|
||||
<echo message="Minifying css..."/>
|
||||
|
||||
<apply executable="java" parallel="false">
|
||||
<fileset dir="./${dir.publish}/${dir.css}/" includes="style-${build.number}.css"/>
|
||||
<arg line="-jar"/>
|
||||
<arg path="./${dir.build.tools}/${tool.yuicompressor}"/>
|
||||
<srcfile/>
|
||||
<arg line="-o"/>
|
||||
<mapper type="glob" from="style-${build.number}.css" to="../${dir.publish}/${dir.css}/style-${build.number}.min.css"/>
|
||||
<targetfile/>
|
||||
</apply>
|
||||
|
||||
<echo message="Updating the HTML with the new css filename"/>
|
||||
|
||||
<replace token="style.css" value="style-${build.number}.min.css" dir="${dir.publish}" includes="${page-files}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- IMAGES -->
|
||||
<target name="-imagespng" description="(PRIVATE) Optimizes .png images using optipng">
|
||||
<echo message="Optimizing images..."/>
|
||||
<echo message="This part might take a while. But everything else is already done."/>
|
||||
<echo message=" "/>
|
||||
|
||||
|
||||
<echo message="First, we run optipng on the .png files..."/>
|
||||
|
||||
<!-- osfamily=unix is actually true on OS X as well -->
|
||||
<!-- On *nix's and OS X, check for optipng and give a helpful message if it's not installed -->
|
||||
<if>
|
||||
<and>
|
||||
<os family="unix" />
|
||||
<available file="optipng" filepath="${ENV.PATH}" />
|
||||
</and>
|
||||
<then>
|
||||
<apply executable="optipng" osfamily="unix">
|
||||
<arg value="-quiet"/>
|
||||
<arg value="-o7"/>
|
||||
<fileset dir="./${dir.publish}/">
|
||||
<include name="**/*.png"/>
|
||||
</fileset>
|
||||
</apply>
|
||||
</then>
|
||||
<elseif>
|
||||
<os family="unix" />
|
||||
<then>
|
||||
<echo message="*** optipng NOT INSTALLED. SKIPPING OPTIMIZATION OF PNGs." />
|
||||
<echo message="*** Install optipng to enable png optimization." />
|
||||
<echo message="*** For instructions see 'Dependencies' at: http://html5boilerplate.com/docs/#Build-script#dependencies" />
|
||||
</then>
|
||||
</elseif>
|
||||
</if>
|
||||
|
||||
<apply executable="tools/optipng-0.6.4-exe/optipng.exe" osfamily="windows">
|
||||
<arg value="-o7"/>
|
||||
<arg value="-quiet"/>
|
||||
<fileset dir="./${dir.publish}/">
|
||||
<include name="**/*.png"/>
|
||||
</fileset>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-imagesjpg" description="(PRIVATE) Optimizes .jpg images using jpegtan">
|
||||
<echo message="Now, we clean up those jpgs..."/>
|
||||
|
||||
<!-- jpegtran is a little weird in that it assumes a pre-existing file means it's already optimized. -->
|
||||
<!-- why? good question. To combat this, we skipped copying over the ${dir.images}/*.jpg earlier in the -->
|
||||
<!-- copy task. Now, we're using jpegtran to copy the files over while we crunch 'em. -->
|
||||
|
||||
<if>
|
||||
<equals arg1="${images.strip.metadata}" arg2="true"/>
|
||||
<then>
|
||||
<var name="strip-meta-tags" value="none"/>
|
||||
</then>
|
||||
<else>
|
||||
<var name="strip-meta-tags" value="all"/>
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<!-- On *nix's and OS X, check for jpegtran and give a helpful message if it's not installed -->
|
||||
<if>
|
||||
<and>
|
||||
<os family="unix" />
|
||||
<available file="jpegtran" filepath="${ENV.PATH}" />
|
||||
</and>
|
||||
<then>
|
||||
<apply executable="jpegtran" osfamily="unix">
|
||||
<fileset dir="${dir.source}/${dir.images}" includes="*.jpg"/>
|
||||
<arg value="-copy"/>
|
||||
<arg value="${strip-meta-tags}"/>
|
||||
<arg value="-optimize"/>
|
||||
<srcfile/>
|
||||
<redirector>
|
||||
<outputmapper type="glob" from="*.jpg" to="./${dir.publish}/${dir.images}/*.jpg"/>
|
||||
</redirector>
|
||||
<!-- you may want to flag optimized images. If so, do it here. Otherwise change this to type="identity" -->
|
||||
</apply>
|
||||
</then>
|
||||
<elseif>
|
||||
<os family="unix" />
|
||||
<then>
|
||||
<echo message="*** jpegtran NOT INSTALLED. SKIPPING OPTIMIZATION OF JPEGs." />
|
||||
<echo message="*** Install jpegtran to enable jpeg optimization." />
|
||||
<echo message="*** For instructions see 'Dependencies' at: http://html5boilerplate.com/docs/#Build-script#dependencies" />
|
||||
</then>
|
||||
</elseif>
|
||||
</if>
|
||||
|
||||
<apply executable="tools/jpegtran.exe" osfamily="windows">
|
||||
<fileset dir="${dir.source}/${dir.images}" includes="*.jpg"/>
|
||||
<arg value="-copy"/>
|
||||
<arg value="${strip-meta-tags}"/>
|
||||
<arg value="-optimize"/>
|
||||
<srcfile/>
|
||||
<targetfile/>
|
||||
<!-- you may want to flag optimized images. If so, do it here. Otherwise change this to type="identity" -->
|
||||
<mapper type="glob" from="*.jpg" to="../${dir.publish}/${dir.images}/*.jpg"/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-jpgcopy">
|
||||
<echo message="Copying over the unmodified jpegs."/>
|
||||
|
||||
<copy todir="./${dir.publish}/${dir.images}">
|
||||
<fileset dir="${dir.source}/${dir.images}" includes="*.jpg"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
||||
80
build/config/default.properties
Normal file
@ -0,0 +1,80 @@
|
||||
#
|
||||
# Default Build Settings
|
||||
# you can override these settings on a project basis in a project.properties file
|
||||
# so probably best not to touch these as they could be overwritten in later versions!
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Directory Paths
|
||||
#
|
||||
dir.source = .
|
||||
dir.publish = publish
|
||||
dir.build = build
|
||||
dir.build.tools = ${dir.build}/tools
|
||||
dir.test = test
|
||||
dir.demo = demo
|
||||
dir.js = js
|
||||
dir.js.main = ${dir.js}
|
||||
# scripts in the lib direcotry will only be minified, not concatenated together
|
||||
dir.js.libs = ${dir.js}/libs
|
||||
dir.js.mylibs = ${dir.js}/mylibs
|
||||
dir.css = css
|
||||
dir.images = img
|
||||
|
||||
|
||||
#
|
||||
# HTML, PHP, etc files to clean and update script/css references
|
||||
#
|
||||
file.pages.default.include = index.html, 404.html
|
||||
|
||||
# You will need to include the property file.pages.include in your project.properties file
|
||||
# and add any extra pages you want to be updated by the scripts in a comma separated lis
|
||||
|
||||
|
||||
# the server configuration you're going with. If you don't use apache,
|
||||
# get a different one here: github.com/paulirish/html5-boilerplate-server-configs
|
||||
|
||||
file.serverconfig = .htaccess
|
||||
|
||||
#
|
||||
# Files not to be copied over by the script to the publish directory
|
||||
#
|
||||
file.default.exclude = .gitignore, .project, .settings, README.markdown, README.md, **/.git/**, **/.svn/**, **/${dir.build}/**, **/${dir.test}/**, **/${dir.demo}/**
|
||||
file.jpg.exclude = ${dir.images}/*.jpg
|
||||
# Declare the file.exclude property in your project.properties file if you want to exclude files / folders you have added
|
||||
# Note: you cannot decalre an empty file.exclude property
|
||||
|
||||
|
||||
#
|
||||
# Default Styleshee
|
||||
#
|
||||
file.default.stylesheets = style.css
|
||||
|
||||
#
|
||||
# Script Optimisation
|
||||
#
|
||||
# If set, concat libraries with main scripts file, producing single script file
|
||||
build.concat.scripts = true
|
||||
# If set, delete minified but unconcatted files.
|
||||
build.delete.unoptimized = true
|
||||
|
||||
|
||||
#
|
||||
# Image Optimisation
|
||||
#
|
||||
images.strip.metadata = true
|
||||
# Seting this to true will strip the metadata from all jpeg files.
|
||||
# YOU SHOULD ONLY DO THIS IF YOU OWN THE COPYRIGHT TO ALL THE IMAGES IN THE BUILD
|
||||
|
||||
|
||||
# Build Info
|
||||
build.version.info = buildinfo.properties
|
||||
build.scripts.dir = ${dir.build}/build-scripts
|
||||
|
||||
# Tools
|
||||
tool.yuicompressor = yuicompressor-2.4.2.jar
|
||||
tool.htmlcompressor = htmlcompressor-0.9.9.jar
|
||||
tool.csscompressor = css-compressor/cli.php
|
||||
|
||||
|
||||
56
build/config/project.properties
Normal file
@ -0,0 +1,56 @@
|
||||
# project.properties file defines overrides for default.properties
|
||||
|
||||
# Explanation: This file should be created by each user as and when he or she needs to override particular values.
|
||||
# Consequently, it should not be placed under version control.
|
||||
|
||||
|
||||
# Stylesheets
|
||||
#
|
||||
# Note: Stylesheets will be concatenated in the order they are listed in the file.stylesheets property (i.e. the las
|
||||
# file listed will be at the end of the concatenated file), so it probably makes sense to have the main style.css file
|
||||
# as the first entry
|
||||
# Example:
|
||||
# file.stylesheets = style.css, lightbox.css, plugin.css
|
||||
#
|
||||
file.stylesheets =
|
||||
|
||||
|
||||
# Web Pages
|
||||
#
|
||||
# These are the pages (files) that will be served to users (.html, .php, .asp, etc). Files in this property will
|
||||
# be minified / optimised and have any stylesheet or javascript references updated to the minified examples
|
||||
#
|
||||
# The paths need to be relative
|
||||
#
|
||||
# Files can be added in a comma separated form
|
||||
file.pages =
|
||||
|
||||
|
||||
|
||||
# Excluded files and dirs
|
||||
#
|
||||
# Add any files or directories you add to the project and do not want to be copied to the publish directory as a
|
||||
# comma separated lis
|
||||
# These files are ignored in addition to the default ones specified in default.properties.
|
||||
file.exclude =
|
||||
|
||||
|
||||
# Specify an environment to build
|
||||
#
|
||||
# By Default, it builds a production environmen
|
||||
# Set to dev if buidling a development environmen
|
||||
# Set to test if building a test environmen
|
||||
env =
|
||||
|
||||
|
||||
# Directory Structure
|
||||
#
|
||||
# Override any directory paths specific to this projec
|
||||
#
|
||||
# dir.publish
|
||||
# dir.js
|
||||
# dir.js.libs
|
||||
# dir.js.mylibs
|
||||
# dir.css
|
||||
# dir.images
|
||||
|
||||
42
build/createproject.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#Generate a new project from your HTML5 Boilerplate repo clone
|
||||
#Created 2010-10-13, Rick Waldron
|
||||
|
||||
|
||||
##first run
|
||||
# $ cd html5-boilerplate/build
|
||||
# $ chmod +x createproject.sh && ./createproject.sh
|
||||
|
||||
##usage
|
||||
# $ cd html5-boilerplate/build
|
||||
# $ ./createproject.sh
|
||||
|
||||
# find project root (also ensure script is ran from within repo)
|
||||
src=$(git rev-parse --show-toplevel) || exit 1
|
||||
|
||||
# get a name for new project
|
||||
while [[ -z $name ]]
|
||||
do
|
||||
echo "To create a new html5-boilerplate project, enter a new directory name:"
|
||||
read name || exit
|
||||
done
|
||||
dst=$src/../$name
|
||||
|
||||
if [[ -d $dst ]]
|
||||
then
|
||||
echo "$dst exists"
|
||||
else
|
||||
#create new project
|
||||
mkdir "$dst" || exit 1
|
||||
|
||||
#sucess message
|
||||
echo "Created Directory: $dst"
|
||||
|
||||
cd "$src"
|
||||
cp -vr css js img build test *.html *.xml *.txt *.png *.ico .htaccess "$dst"
|
||||
|
||||
#sucess message
|
||||
echo "Created Project: $dst"
|
||||
fi
|
||||
|
||||
5
build/runbuildscript.bat
Normal file
@ -0,0 +1,5 @@
|
||||
# This is for windows users only.
|
||||
# If you're on a mac or linux, just run `ant build` from this folder in Terminal
|
||||
|
||||
set MYDIR=%~dp0
|
||||
ant build
|
||||
BIN
build/tools/ant-contrib-1.0b3.jar
Normal file
BIN
build/tools/htmlcompressor-0.9.9.jar
Normal file
BIN
build/tools/jpegtran.exe
Normal file
21
build/tools/optipng-0.6.4-exe/LICENSE.txt
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
Copyright (C) 2001-2010 Cosmin Truta.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the author(s) be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
BIN
build/tools/optipng-0.6.4-exe/optipng.exe
Normal file
BIN
build/tools/yuicompressor-2.4.2.jar
Normal file
25
crossdomain.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
|
||||
<cross-domain-policy>
|
||||
|
||||
|
||||
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
|
||||
|
||||
<!-- Most restrictive policy: -->
|
||||
<site-control permitted-cross-domain-policies="none"/>
|
||||
|
||||
|
||||
|
||||
<!-- Least restrictive policy: -->
|
||||
<!--
|
||||
<site-control permitted-cross-domain-policies="all"/>
|
||||
<allow-access-from domain="*" to-ports="*" secure="false"/>
|
||||
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
|
||||
-->
|
||||
<!--
|
||||
If you host a crossdomain.xml file with allow-access-from domain=“*”
|
||||
and don’t understand all of the points described here, you probably
|
||||
have a nasty security vulnerability. ~ simon willison
|
||||
-->
|
||||
|
||||
</cross-domain-policy>
|
||||
13
css/handheld.css
Normal file
@ -0,0 +1,13 @@
|
||||
/* Handheld
|
||||
|
||||
_____________________________________________________
|
||||
|
||||
320 and Up boilerplate extension
|
||||
|
||||
Author: Andy Clarke
|
||||
Version: 0.9b
|
||||
URL: http://stuffandnonsense.co.uk/projects/320andup/
|
||||
License: http://creativecommons.org/licenses/MIT/
|
||||
_____________________________________________________
|
||||
|
||||
*/
|
||||
130
css/mylibs/forms.css
Normal file
@ -0,0 +1,130 @@
|
||||
/* Forms
|
||||
|
||||
_____________________________________________________
|
||||
|
||||
320 and Up boilerplate extension
|
||||
|
||||
Author: Andy Clarke
|
||||
Version: 0.9b
|
||||
URL: http://stuffandnonsense.co.uk/projects/320andup/
|
||||
License: http://creativecommons.org/licenses/MIT/
|
||||
_____________________________________________________
|
||||
|
||||
*/
|
||||
|
||||
form {
|
||||
margin-bottom : 1.5em; }
|
||||
|
||||
fieldset {
|
||||
margin-bottom : 1.5em;
|
||||
padding : 0;
|
||||
border-width : 0; }
|
||||
|
||||
legend {
|
||||
margin-top : -.2em 0 1em 0;
|
||||
font-weight : bold;
|
||||
font-size : 1.2em; }
|
||||
|
||||
label {
|
||||
font-weight : normal; }
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
margin : 0; }
|
||||
|
||||
label,
|
||||
input[type="button"],
|
||||
input[type="submit"],
|
||||
input[type="image"],
|
||||
button {
|
||||
cursor : pointer; }
|
||||
|
||||
input,
|
||||
select {
|
||||
vertical-align : middle; }
|
||||
|
||||
input[type=text],
|
||||
input[type=password],
|
||||
input[type=tel],
|
||||
input[type=email],
|
||||
input[type=url],
|
||||
input[type=search],
|
||||
textarea {
|
||||
padding : 2px;
|
||||
width : 100%;
|
||||
background-color : rgb(255,255,255);
|
||||
border : 1px solid rgb(200,200,200);
|
||||
font-family : inherit;
|
||||
font-size : inherit; }
|
||||
|
||||
input[type=text]:focus,
|
||||
input[type=password]:focus,
|
||||
input[type=tel]:focus,
|
||||
input[type=email]:focus,
|
||||
input[type=url]:focus,
|
||||
input[type=search]:focus,
|
||||
textarea:focus {
|
||||
border-color : rgb(100,100,100); }
|
||||
|
||||
input[type="radio"] {
|
||||
vertical-align : text-bottom; }
|
||||
|
||||
input[type="checkbox"] {
|
||||
vertical-align : bottom; }
|
||||
|
||||
/* Colors for form validity */
|
||||
input:valid,
|
||||
textarea:valid {
|
||||
/* Styles */ }
|
||||
|
||||
input:invalid,
|
||||
textarea:invalid {
|
||||
-webkit-box-shadow : 0 0 2px rgb(255,0,0);
|
||||
-moz-box-shadow : 0 0 2px rgb(255,0,0);
|
||||
box-shadow : 0 0 2px rgb(255,0,0); }
|
||||
|
||||
.no-boxshadow input:invalid,
|
||||
.no-boxshadow textarea:invalid {
|
||||
background-color : rgb(240,221,221); }
|
||||
|
||||
select {
|
||||
margin : .5em 0;
|
||||
background-color : rgb(255,255,255);
|
||||
border-width : 1px;
|
||||
border-style : solid; }
|
||||
|
||||
textarea {
|
||||
overflow : auto;
|
||||
padding : 2px; }
|
||||
|
||||
button {
|
||||
width : auto;
|
||||
padding : 8px 12px 9px;
|
||||
overflow : visible;
|
||||
background-color : rgb(227,227,227);
|
||||
border : 1px solid rgb(204,204,204);
|
||||
border-bottom-color : rgb(187,187,187);
|
||||
font-family : "Helvetica Neue", Helvetica, Arial;
|
||||
font-size : .875em;
|
||||
font-weight: bold;
|
||||
text-align : center;
|
||||
line-height : 1;
|
||||
color : rgb(51,51,51);
|
||||
text-shadow : 0 1px 0 rgb(255,255,255); }
|
||||
|
||||
button:hover {
|
||||
cursor : pointer;
|
||||
background-color : rgb(217,217,217); }
|
||||
|
||||
.ie6 legend,
|
||||
.ie7 legend {
|
||||
margin-left : -7px; }
|
||||
|
||||
.ie6 input {
|
||||
vertical-align : text-bottom; }
|
||||
|
||||
.ie7 input[type="checkbox"],
|
||||
.iem7 input[type="checkbox"] {
|
||||
vertical-align : baseline; }
|
||||
553
css/style.css
Normal file
@ -0,0 +1,553 @@
|
||||
/* _________________________________________________
|
||||
|
||||
Dan Barber CV Styles
|
||||
Based on:
|
||||
320 and Up boilerplate extension
|
||||
|
||||
Author: Andy Clarke
|
||||
Version: 0.9b
|
||||
URL: http://stuffandnonsense.co.uk/projects/320andup/
|
||||
_____________________________________________________
|
||||
|
||||
1.ROOT
|
||||
2.HEADINGS
|
||||
3.TYPOGRAPHY
|
||||
4.LINKS
|
||||
5.FIGURES & IMAGES
|
||||
6.TABLES
|
||||
7.FORMS (See css/mylibs/forms.css)
|
||||
8.BANNER header[role="banner"]
|
||||
9.NAVIGATION nav[role="navigation"]
|
||||
10.CONTENT
|
||||
11.MAIN div[role="main"]
|
||||
12.COMPLIMENTARY div[role="complementary"]
|
||||
13.CONTENTINFO footer[role="contentinfo"]
|
||||
14.GLOBAL OBJECTS
|
||||
15.VENDOR-SPECIFIC
|
||||
16.TEMPLATE SPECIFICS
|
||||
17.MODERNIZR
|
||||
|
||||
COLOURS
|
||||
|
||||
*/
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
border : 0;
|
||||
font-size : 100%;
|
||||
font : inherit;
|
||||
vertical-align : baseline; }
|
||||
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display : block; }
|
||||
|
||||
abbr[title] {
|
||||
border-bottom : 1px dotted;
|
||||
cursor : help; }
|
||||
|
||||
/* 1.ROOT */
|
||||
|
||||
html {
|
||||
overflow-y : scroll;
|
||||
background : rgb(255,255,255) /* url(../img/tmp/grid.png) repeat-y 50% 0 */; }
|
||||
|
||||
body {
|
||||
margin : 0 auto;
|
||||
padding : 24px 0;
|
||||
width : 90% /* 252px */;
|
||||
font : 100%/1.4 Cambria, Georgia, Times, "Times New Roman";
|
||||
color : rgb(40,40,40);
|
||||
background-color : transparent; }
|
||||
|
||||
/* 2.HEADINGS */
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 { font-family : "Helvetica Neue", Helvetica, Arial; font-weight : bold; }
|
||||
|
||||
h1 { margin-bottom : .75em; font-size : 3em; /* 48 / 16 = 3 */ line-height : 1.2; }
|
||||
|
||||
h2 {
|
||||
margin-bottom : .75em;
|
||||
font-size : 2em; /* 36 / 16 = 2 */
|
||||
line-height : 1.2; }
|
||||
|
||||
h3 {
|
||||
margin-bottom : 1em;
|
||||
font-size : 1.5em; /* 24 / 16 = 1.5 */
|
||||
line-height : 1.3; }
|
||||
|
||||
h4 {
|
||||
margin-bottom : 1.25em;
|
||||
font-size : 1.25em; /* 20 / 16 = 1.25 */
|
||||
line-height : 1.25; }
|
||||
|
||||
h5 {
|
||||
margin-bottom : 1.5em;
|
||||
font-size : 1em; /* 16 / 16 = 1 */ }
|
||||
|
||||
h6 {
|
||||
font-size : 1em; /* 16 / 16 = 1 */ }
|
||||
|
||||
/* 3.TYPOGRAPHY */
|
||||
|
||||
p,
|
||||
ol,
|
||||
ul,
|
||||
dl,
|
||||
address {
|
||||
margin-bottom : 1.5em;
|
||||
font-size : 1em; /* 16 / 16 = 1 */ }
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin : 0 0 1.5em -24px;
|
||||
padding-left : 24px; }
|
||||
|
||||
ul {
|
||||
list-style-type : disc; }
|
||||
|
||||
ol {
|
||||
list-style-type : decimal; }
|
||||
|
||||
li ul,
|
||||
li ol {
|
||||
margin : 0;
|
||||
font-size : 1em; /* 16 / 16 = 1 */ }
|
||||
|
||||
dl,
|
||||
dd {
|
||||
margin-bottom : 1.5em; }
|
||||
|
||||
dt {
|
||||
font-weight : normal; }
|
||||
|
||||
blockquote {
|
||||
margin : 0 0 1.5em -24px;
|
||||
padding-left : 24px;
|
||||
border-left : 1px solid rgb(200,200,200);
|
||||
font-style : italic; }
|
||||
|
||||
blockquote:before,
|
||||
blockquote:after,
|
||||
q:before,
|
||||
q:after {
|
||||
content : '';
|
||||
content : none; }
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight : bold; }
|
||||
|
||||
i,
|
||||
em {
|
||||
font-style : italic; }
|
||||
|
||||
sup,
|
||||
sub {
|
||||
position : relative;
|
||||
font-size : 75%;
|
||||
line-height : 0; }
|
||||
|
||||
sup {
|
||||
top : -.5em; }
|
||||
|
||||
sub {
|
||||
bottom : -.25em; }
|
||||
|
||||
address {
|
||||
font-style : normal; }
|
||||
|
||||
pre {
|
||||
margin-bottom : 1.5em;
|
||||
white-space : pre;
|
||||
white-space : pre-wrap;
|
||||
word-wrap : break-word; }
|
||||
|
||||
pre,
|
||||
code {
|
||||
font : .875em 'andale mono', 'lucida console', monospace;
|
||||
line-height : 1.5; }
|
||||
|
||||
small {
|
||||
font-size : 1em; /* 16 / 16 = 1 */ }
|
||||
|
||||
/* 4.LINKS */
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
outline : none;
|
||||
color : rgb(23,119,175);
|
||||
text-decoration : none; }
|
||||
|
||||
a:hover {
|
||||
outline : none;
|
||||
color : rgb(40,40,40);
|
||||
text-decoration : underline; }
|
||||
|
||||
a:active,
|
||||
a:focus {
|
||||
outline : none;
|
||||
color : rgb(0,0,0); }
|
||||
|
||||
/* 5.FIGURES & IMAGES */
|
||||
|
||||
figure {
|
||||
margin-bottom : 1.5em; }
|
||||
|
||||
figure img,
|
||||
figure object,
|
||||
figure embed {
|
||||
margin-bottom : .75em;
|
||||
max-width : 100%; }
|
||||
|
||||
figcaption {
|
||||
display : block;
|
||||
font-weight : normal; }
|
||||
|
||||
/* 6.TABLES */
|
||||
|
||||
table {
|
||||
border-collapse : collapse;
|
||||
border-spacing : 0;
|
||||
margin-bottom : 1.4em;
|
||||
width : 100%;
|
||||
font-size : .875em; /* 14 / 16 = .875 */ }
|
||||
|
||||
th {
|
||||
font-weight : bold; }
|
||||
|
||||
th, td, caption {
|
||||
padding : .25em 10px .25em 5px; }
|
||||
|
||||
tfoot {
|
||||
font-style : italic; }
|
||||
|
||||
caption {
|
||||
background-color : transparent; }
|
||||
|
||||
/* 7.FORMS (See css/mylibs/forms.css) */
|
||||
|
||||
/* 8.BANNER */
|
||||
/* 9.NAVIGATION */
|
||||
/* 10.CONTENT */
|
||||
/* 11.MAIN */
|
||||
/* 12.COMPLIMENTARY */
|
||||
/* 13.CONTENTINFO */
|
||||
|
||||
/* 14.GLOBAL OBJECTS */
|
||||
|
||||
.clearfix {
|
||||
zoom : 1; }
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content : "\0020";
|
||||
display : block;
|
||||
height : 0;
|
||||
overflow : hidden; }
|
||||
|
||||
.clearfix:after {
|
||||
clear : both; }
|
||||
|
||||
/* 15.VENDOR-SPECIFIC */
|
||||
|
||||
body {
|
||||
-webkit-text-size-adjust : 100%;
|
||||
-ms-text-size-adjust : 100%; }
|
||||
|
||||
a:link {
|
||||
-webkit-tap-highlight-color : rgb(52,158,219); }
|
||||
|
||||
::-webkit-selection {
|
||||
background : rgb(23,119,175);
|
||||
color : rgb(250,250,250);
|
||||
text-shadow : none; }
|
||||
|
||||
::-moz-selection {
|
||||
background : rgb(23,119,175);
|
||||
color : rgb(250,250,250);
|
||||
text-shadow : none; }
|
||||
|
||||
::selection {
|
||||
background : rgb(23,119,175);
|
||||
color : rgb(250,250,250);
|
||||
text-shadow : none; }
|
||||
|
||||
/* input[type=search] {
|
||||
-webkit-appearance : none; }
|
||||
|
||||
input[type="search"]::-webkit-search-decoration,
|
||||
input[type="search"]::-webkit-search-cancel-button {
|
||||
display : none; } */
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
padding : 10px;
|
||||
font-size : .875em;
|
||||
line-height : 1.4; }
|
||||
|
||||
input:-moz-placeholder {
|
||||
padding : 10px;
|
||||
font-size : .875em;
|
||||
line-height : 1.4; }
|
||||
|
||||
.ie7 img,
|
||||
.iem7 img {
|
||||
-ms-interpolation-mode : bicubic; }
|
||||
|
||||
div,
|
||||
input,
|
||||
textarea {
|
||||
-webkit-box-sizing : border-box;
|
||||
-moz-box-sizing : border-box;
|
||||
-o-box-sizing : border-box;
|
||||
box-sizing : border-box; }
|
||||
|
||||
/* Non-semantic helper classes */
|
||||
|
||||
/* Image replacement */
|
||||
.ir {
|
||||
display : block;
|
||||
text-indent : -999em;
|
||||
overflow : hidden;
|
||||
background-repeat : no-repeat;
|
||||
text-align : left;
|
||||
direction : ltr; }
|
||||
|
||||
/* Hide for screenreaders and visual browsers */
|
||||
.hidden {
|
||||
display : none;
|
||||
visibility : hidden; }
|
||||
|
||||
/* Hide visually */
|
||||
.visuallyhidden {
|
||||
position : absolute;
|
||||
clip : rect(0 0 0 0);
|
||||
overflow : hidden;
|
||||
margin: -1px;
|
||||
padding : 0;
|
||||
height : 1px;
|
||||
width : 1px;
|
||||
border : 0; }
|
||||
|
||||
/* Allow an element to be focusable via keyboard */
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus {
|
||||
position : static;
|
||||
clip : auto;
|
||||
overflow : visible;
|
||||
height : auto;
|
||||
margin : 0;
|
||||
width : auto; }
|
||||
|
||||
/* Hide but maintain layout */
|
||||
.invisible {
|
||||
visibility : hidden; }
|
||||
|
||||
/* 16.TEMPLATE SPECIFICS */
|
||||
|
||||
#goog-fixurl ul {
|
||||
list-style-type : none; }
|
||||
|
||||
#goog-fixurl input {
|
||||
margin-bottom : 1.5em; }
|
||||
|
||||
/* 17.MODERNIZR */
|
||||
|
||||
/* MEDIA QUERIES */
|
||||
|
||||
/*Print __________________________________________________________________________________________________________ */
|
||||
@media print {
|
||||
* {
|
||||
background : transparent !important;
|
||||
color : black !important;
|
||||
text-shadow : none !important;
|
||||
filter : none !important;
|
||||
-ms-filter : none !important; }
|
||||
|
||||
a, a:visited {
|
||||
color : #444 !important;
|
||||
text-decoration : underline; }
|
||||
|
||||
a[href]:after {
|
||||
content : " (" attr(href) ")"; }
|
||||
|
||||
abbr[title]:after {
|
||||
content : " (" attr(title) ")"; }
|
||||
|
||||
a[href^="javascript:"]:after,
|
||||
a[href^="#"]:after {
|
||||
content : ""; }
|
||||
|
||||
pre, blockquote {
|
||||
border : 1px solid #999;
|
||||
page-break-inside : avoid; }
|
||||
|
||||
thead {
|
||||
display : table-header-group; }
|
||||
|
||||
tr, img {
|
||||
page-break-inside : avoid; }
|
||||
|
||||
@page {
|
||||
margin : .5cm; }
|
||||
|
||||
p, h2, h3 {
|
||||
orphans : 3;
|
||||
widows : 3; }
|
||||
|
||||
h2, h3 {
|
||||
page-break-after : avoid; }
|
||||
}/*/mediaquery*/
|
||||
|
||||
/*480px __________________________________________________________________________________________________________ */
|
||||
@media only screen and (min-width: 480px) {
|
||||
|
||||
/* 1.ROOT */
|
||||
/* 2.HEADINGS */
|
||||
/* 3.TYPOGRAPHY */
|
||||
/* 4.LINKS */
|
||||
/* 5.FIGURES & IMAGES */
|
||||
/* 6.TABLES */
|
||||
/* 7.FORMS */
|
||||
/* 8.BANNER */
|
||||
/* 9.NAVIGATION */
|
||||
/* 10.CONTENT */
|
||||
/* 11.MAIN */
|
||||
/* 12.COMPLIMENTARY */
|
||||
/* 13.CONTENTINFO */
|
||||
/* 14.GLOBAL OBJECTS */
|
||||
/* 15.VENDOR-SPECIFIC */
|
||||
/* 16.TEMPLATE SPECIFICS */
|
||||
/* 17.MODERNIZR */
|
||||
|
||||
}/*/mediaquery*/
|
||||
|
||||
/*768px __________________________________________________________________________________________________________ */
|
||||
@media only screen and (min-width: 768px) {
|
||||
|
||||
/* 1.ROOT */
|
||||
|
||||
/* 1.ROOT */
|
||||
/* 2.HEADINGS */
|
||||
/* 3.TYPOGRAPHY */
|
||||
/* 4.LINKS */
|
||||
/* 5.FIGURES & IMAGES */
|
||||
/* 6.TABLES */
|
||||
/* 7.FORMS */
|
||||
/* 8.BANNER */
|
||||
/* 9.NAVIGATION */
|
||||
/* 10.CONTENT */
|
||||
/* 11.MAIN */
|
||||
/* 12.COMPLIMENTARY */
|
||||
/* 13.CONTENTINFO */
|
||||
/* 14.GLOBAL OBJECTS */
|
||||
/* 15.VENDOR-SPECIFIC */
|
||||
/* 16.TEMPLATE SPECIFICS */
|
||||
/* 17.MODERNIZR */
|
||||
|
||||
}/*/mediaquery*/
|
||||
|
||||
/*992px __________________________________________________________________________________________________________ */
|
||||
@media only screen and (min-width: 992px) {
|
||||
|
||||
/* 1.ROOT */
|
||||
/* 2.HEADINGS */
|
||||
/* 3.TYPOGRAPHY */
|
||||
/* 4.LINKS */
|
||||
/* 5.FIGURES & IMAGES */
|
||||
/* 6.TABLES */
|
||||
/* 7.FORMS */
|
||||
/* 8.BANNER */
|
||||
/* 9.NAVIGATION */
|
||||
/* 10.CONTENT */
|
||||
/* 11.MAIN */
|
||||
/* 12.COMPLIMENTARY */
|
||||
/* 13.CONTENTINFO */
|
||||
/* 14.GLOBAL OBJECTS */
|
||||
/* 15.VENDOR-SPECIFIC */
|
||||
/* 16.TEMPLATE SPECIFICS */
|
||||
/* 17.MODERNIZR */
|
||||
|
||||
}/*/mediaquery*/
|
||||
|
||||
/*1382px __________________________________________________________________________________________________________ */
|
||||
@media only screen and (min-width: 1382px) {
|
||||
|
||||
/* 1.ROOT */
|
||||
/* 2.HEADINGS */
|
||||
/* 3.TYPOGRAPHY */
|
||||
/* 4.LINKS */
|
||||
/* 5.FIGURES & IMAGES */
|
||||
/* 6.TABLES */
|
||||
/* 7.FORMS */
|
||||
/* 8.BANNER */
|
||||
/* 9.NAVIGATION */
|
||||
/* 10.CONTENT */
|
||||
/* 11.MAIN */
|
||||
/* 12.COMPLIMENTARY */
|
||||
/* 13.CONTENTINFO */
|
||||
/* 14.GLOBAL OBJECTS */
|
||||
/* 15.VENDOR-SPECIFIC */
|
||||
/* 16.TEMPLATE SPECIFICS */
|
||||
/* 17.MODERNIZR */
|
||||
|
||||
}/*/mediaquery*/
|
||||
|
||||
/*2x __________________________________________________________________________________________________________ */
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
|
||||
|
||||
/* 1.ROOT */
|
||||
/* 2.HEADINGS */
|
||||
/* 3.TYPOGRAPHY */
|
||||
/* 4.LINKS */
|
||||
/* 5.FIGURES & IMAGES */
|
||||
/* 6.TABLES */
|
||||
/* 7.FORMS */
|
||||
/* 8.BANNER */
|
||||
/* 9.NAVIGATION */
|
||||
/* 10.CONTENT */
|
||||
/* 11.MAIN */
|
||||
/* 12.COMPLIMENTARY */
|
||||
/* 13.CONTENTINFO */
|
||||
/* 14.GLOBAL OBJECTS */
|
||||
/* 15.VENDOR-SPECIFIC */
|
||||
/* 16.TEMPLATE SPECIFICS */
|
||||
/* 17.MODERNIZR */
|
||||
|
||||
}/*/mediaquery*/
|
||||
|
||||
/*
|
||||
Sources:
|
||||
http://meyerweb.com/eric/tools/css/reset
|
||||
http://people.opera.com/patrickl/experiments/keyboard/test
|
||||
http://gist.github.com/413930
|
||||
http://pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap
|
||||
http://sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars
|
||||
http://tjkdesign.com/ez-css/css/base.css
|
||||
http://viget.com/inspire/styling-the-button-element-in-internet-explorer
|
||||
http://code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing
|
||||
http://html5doctor.com/html-5-reset-stylesheet/
|
||||
http://praegnanz.de/weblog/htmlcssjs-kickstart/
|
||||
http://camendesign.com/design/
|
||||
http://yui.yahooapis.com/2.8.1/build/base/base.css
|
||||
http://webaim.org/techniques/css/invisiblecontent/
|
||||
http://drupal.org/node/897638
|
||||
*/
|
||||
BIN
favicon.ico
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
43
humans.txt
Normal file
@ -0,0 +1,43 @@
|
||||
/* the humans responsible & colophon */
|
||||
/* humanstxt.org */
|
||||
|
||||
|
||||
/* TEAM */
|
||||
<your title>: <your name>
|
||||
Site:
|
||||
Twitter:
|
||||
Location:
|
||||
|
||||
/* THANKS */
|
||||
Names (& URL):
|
||||
|
||||
/* SITE */
|
||||
Standards: HTML5, CSS3
|
||||
Components: Modernizr, jQuery
|
||||
Software:
|
||||
|
||||
|
||||
|
||||
-o/-
|
||||
+oo//-
|
||||
:ooo+//:
|
||||
-ooooo///-
|
||||
/oooooo//:
|
||||
:ooooooo+//-
|
||||
-+oooooooo///-
|
||||
-://////////////+oooooooooo++////////////::
|
||||
:+ooooooooooooooooooooooooooooooooooooo+:::-
|
||||
-/+ooooooooooooooooooooooooooooooo+/::////:-
|
||||
-:+oooooooooooooooooooooooooooo/::///////:-
|
||||
--/+ooooooooooooooooooooo+::://////:-
|
||||
-:+ooooooooooooooooo+:://////:--
|
||||
/ooooooooooooooooo+//////:-
|
||||
-ooooooooooooooooooo////-
|
||||
/ooooooooo+oooooooooo//:
|
||||
:ooooooo+/::/+oooooooo+//-
|
||||
-oooooo/::///////+oooooo///-
|
||||
/ooo+::://////:---:/+oooo//:
|
||||
-o+/::///////:- -:/+o+//-
|
||||
:-:///////:- -:/://
|
||||
-////:- --//:
|
||||
-- -:
|
||||
BIN
img/h/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
img/h/splash.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
img/l/apple-touch-icon-precomposed.png
Normal file
|
After Width: | Height: | Size: 720 B |
BIN
img/l/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 720 B |
BIN
img/l/splash.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
img/m/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
img/tmp/grid.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
222
index.html
Normal file
@ -0,0 +1,222 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<!--
|
||||
320 and Up boilerplate extension
|
||||
Author: Andy Clarke
|
||||
Version: 0.9b
|
||||
URL: http://stuffandnonsense.co.uk/projects/320andup
|
||||
-->
|
||||
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7" manifest="default.appcache?v=1"><![endif]-->
|
||||
<!--[if lt IE 7 ]><html class="no-js ie6" lang="en"><![endif]-->
|
||||
<!--[if IE 7 ]><html class="no-js ie7" lang="en"><![endif]-->
|
||||
<!--[if IE 8 ]><html class="no-js ie8" lang="en"><![endif]-->
|
||||
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" manifest="default.appcache?v=1" lang="en"><!--<![endif]-->
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>320 and up</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1">
|
||||
|
||||
<!-- For less capable mobile browsers
|
||||
<link rel="stylesheet" media="handheld" href="css/handheld.css?v=1"> -->
|
||||
|
||||
<!-- For all browsers -->
|
||||
<link rel="stylesheet" href="css/style.css?v=1">
|
||||
|
||||
<!-- JavaScript at bottom except for Modernizr -->
|
||||
<script src="js/libs/modernizr-1.7.min.js"></script>
|
||||
|
||||
<!-- For iPhone 4 -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/h/apple-touch-icon.png">
|
||||
<!-- For iPad 1-->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/m/apple-touch-icon.png">
|
||||
<!-- For iPhone 3G, iPod Touch and Android -->
|
||||
<link rel="apple-touch-icon-precomposed" href="img/l/apple-touch-icon-precomposed.png">
|
||||
<!-- For Nokia -->
|
||||
<link rel="shortcut icon" href="img/l/apple-touch-icon.png">
|
||||
<!-- For everything else -->
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
|
||||
<!--iOS. Delete if not required -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="apple-touch-startup-image" href="img/splash.png">
|
||||
|
||||
<!--Microsoft. Delete if not required -->
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
|
||||
<!-- http://t.co/y1jPVnT -->
|
||||
<link rel="canonical" href="/">
|
||||
</head>
|
||||
|
||||
<body class="clearfix">
|
||||
|
||||
<header role="banner" class="clearfix">
|
||||
<h1>Dan Barber</h1>
|
||||
<h2>Web Designer & Developer</h2>
|
||||
</header>
|
||||
|
||||
<div class="content clearfix">
|
||||
|
||||
<div role="main">
|
||||
<section>
|
||||
<h3>Profile</h3>
|
||||
<p>10 years of experience building web sites and web applications. I focus on simple, usable interfaces and prefer to work by prototyping ideas.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Skills</h3>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<h4>HTML/CSS</h4>
|
||||
<p>Excellent knowledge of standards and browser engines.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>PHP</h4>
|
||||
<p>Expert level.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>SQL/MySQL/PostgreSQL</h4>
|
||||
<p>Excellent knowledge of SQL and configuration.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Javascript/jQuery</h4>
|
||||
<p>Sound working knowledge</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Typography</h4>
|
||||
<p>Good working knowledge.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Photoshop/GIMP</h4>
|
||||
<p>Good working knowledge.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Linux Servers</h4>
|
||||
<p>Web (Apache), MySQL, PostgreSQL, DNS, Samba</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Networking</h4>
|
||||
<p>Good knowledge of cabling, routing and protocols.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Experience</h3>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<h4>Abiquo</h4>
|
||||
<p>June 2010–Present</p>
|
||||
<p>[to be confimed]</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Deep Blue Sound</h4>
|
||||
<p>Aug 2008–June 2010</p>
|
||||
<p>Administering and augmenting the existing web systems including Moodle, SugarCRM and others.
Deputising for the System Administrator.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Footwork Solutions</h4>
|
||||
<p>Nov 2002–Aug 2008</p>
|
||||
<p><a href="http://footworksolutions.co.uk">footworksolutions.co.uk</a><br />I was a lead developer and designer on the Halo care co-ordination system, including training and documentation and support.
I was also the System Administrator for both the local network and remote server farm.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Granite Internet</h4>
|
||||
<p>2000–2002</p>
|
||||
<p>Designed and developed and maintained several property company websites based on a single code base. Setup Windows, Linux and FreeBSD servers.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>North Devon Journal</h4>
|
||||
<p>1998–2000</p>
|
||||
<p>Set basic adverts using QuarkXpress and was responsible for laying out the classified pages.
Learnt a lot about typography.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Portfolio</h3>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<h4>NeoMPC</h4>
|
||||
<p><a href="http://pixelhum.com/neompc">pixelhum.com/neompc</a></p>
|
||||
<p>Web based MPD client. Design and execution. Built on PHP and jQuery and uses mpd.class.php.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Footwork Solutions</h4>
|
||||
<p><a href="http://footworksolutions.co.uk">footworksolutions.co.uk</a></p>
|
||||
<p>Company logo and site design. I built the HTML for the Drupal template.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Halo</h4>
|
||||
<p>haloteam.com</p>
|
||||
<p>Hosted care co-ordination system for drug treatment agencies. Design, initial implementation and ongoing development of key modules.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Dan Barber Photo</h4>
|
||||
<p><a href="http://danbarberphoto.com">danbarberphoto.com</a></p>
|
||||
<p>My own photography portfolio site. Designed and implemented the whole site using Ruby on Rails and jQuery, including backend admin pages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h4>Dan & Katie</h4>
|
||||
<p><a href="http://wedding.coweyes.co.uk">wedding.coweyes.co.uk</a></p>
|
||||
<p>My own wedding photo site. Design and implementation of theme for ZenPhoto.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Interests</h3>
|
||||
|
||||
<ul>
|
||||
<li>Drumming</li>
|
||||
<li>Music</li>
|
||||
<li>Sound Engineering & Recording</li>
|
||||
<li>Photography</li>
|
||||
<li>Cycling</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div role="complementary">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer role="contentinfo" class="clearfix">
|
||||
</footer>
|
||||
|
||||
<!-- mathiasbynens.be/notes/async-analytics-snippet Change UA-XXXXX-X to be your site's ID -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">\x3C/script>')</script>
|
||||
<!-- Scripts -->
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
|
||||
<!--[if (lt IE 9) & (!IEMobile)]>
|
||||
<script src="js/libs/DOMAssistantCompressed-2.8.js"></script>
|
||||
<script src="js/libs/selectivizr-1.0.1.js"></script>
|
||||
<script src="js/libs/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- http://t.co/HZe9oJ4 -->
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; // Change UA-XXXXX-X to be your site's ID
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
|
||||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
<noscript>Your browser does not support JavaScript!</noscript>
|
||||
</body>
|
||||
</html>
|
||||
BIN
js/.DS_Store
vendored
Normal file
4
js/libs/DOMAssistantCompressed-2.8.js
Normal file
61
js/libs/imgsizer.js
Normal file
@ -0,0 +1,61 @@
|
||||
var imgSizer = {
|
||||
Config : {
|
||||
imgCache : []
|
||||
,spacer : "/path/to/your/spacer.gif"
|
||||
}
|
||||
|
||||
,collate : function(aScope) {
|
||||
var isOldIE = (document.all && !window.opera && !window.XDomainRequest) ? 1 : 0;
|
||||
if (isOldIE && document.getElementsByTagName) {
|
||||
var c = imgSizer;
|
||||
var imgCache = c.Config.imgCache;
|
||||
|
||||
var images = (aScope && aScope.length) ? aScope : document.getElementsByTagName("img");
|
||||
for (var i = 0; i < images.length; i++) {
|
||||
images[i].origWidth = images[i].offsetWidth;
|
||||
images[i].origHeight = images[i].offsetHeight;
|
||||
|
||||
imgCache.push(images[i]);
|
||||
c.ieAlpha(images[i]);
|
||||
images[i].style.width = "100%";
|
||||
}
|
||||
|
||||
if (imgCache.length) {
|
||||
c.resize(function() {
|
||||
for (var i = 0; i < imgCache.length; i++) {
|
||||
var ratio = (imgCache[i].offsetWidth / imgCache[i].origWidth);
|
||||
imgCache[i].style.height = (imgCache[i].origHeight * ratio) + "px";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
,ieAlpha : function(img) {
|
||||
var c = imgSizer;
|
||||
if (img.oldSrc) {
|
||||
img.src = img.oldSrc;
|
||||
}
|
||||
var src = img.src;
|
||||
img.style.width = img.offsetWidth + "px";
|
||||
img.style.height = img.offsetHeight + "px";
|
||||
img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
|
||||
img.oldSrc = src;
|
||||
img.src = c.Config.spacer;
|
||||
}
|
||||
|
||||
// Ghettomodified version of Simon Willison's addLoadEvent() -- http://simonwillison.net/2004/May/26/addLoadEvent/
|
||||
,resize : function(func) {
|
||||
var oldonresize = window.onresize;
|
||||
if (typeof window.onresize != 'function') {
|
||||
window.onresize = func;
|
||||
} else {
|
||||
window.onresize = function() {
|
||||
if (oldonresize) {
|
||||
oldonresize();
|
||||
}
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
js/libs/jquery-1.5.1.min.js
vendored
Normal file
2
js/libs/modernizr-1.7.min.js
vendored
Normal file
7
js/libs/respond.min.js
vendored
Executable file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* respond.js - A small and fast polyfill for min/max-width CSS3 Media Queries
|
||||
* Copyright 2011, Scott Jehl, scottjehl.com
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Usage: Check out the readme file or github.com/scottjehl/respond
|
||||
*/
|
||||
(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length;for(var z=0;z<w;z++){var y=B[z],x=y.href,A=y.media,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:x,media:A})}else{o[x]=true}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,v.media);o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media ([^\{]+)\{([\S\s]+?)(?=\}\/\*\/mediaquery\*\/)/gmi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x;if(v.length){v+="/"}if(y){H=1}for(var B=0;B<H;B++){var C;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}var z=C.split(","),F=z.length;for(var A=0;A<F;A++){var D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:\s?(\s?[0-9]+)px\s?\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:\s?(\s?[0-9]+)px\s?\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send()},c=(function(){var v=false,w=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new XMLHttpRequest()}],y=w.length;while(y--){try{v=w[y]()}catch(x){continue}break}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(g){if(g.matchMedia){return true}var c,f=document,a=f.documentElement,b=a.firstElementChild||a.firstChild,e=f.createElement("body"),h=f.createElement("div"),d="only all";h.id="mq-test-1";h.style.cssText="position:absolute;top:-99em";e.appendChild(h);h.innerHTML='_<style media="'+d+'"> #mq-test-1 { width: 9px; }</style>';a.insertBefore(e,b);h.removeChild(h.firstChild);c=h.offsetWidth==9;a.removeChild(e);return c})(this));
|
||||
278
js/libs/respond.src.js
Executable file
@ -0,0 +1,278 @@
|
||||
/*
|
||||
* respond.js - A small and fast polyfill for min/max-width CSS3 Media Queries
|
||||
* Copyright 2011, Scott Jehl, scottjehl.com
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Usage: Check out the readme file or github.com/scottjehl/respond
|
||||
*/
|
||||
(function( win, mqSupported ){
|
||||
//exposed namespace
|
||||
win.respond = {};
|
||||
|
||||
//define update even in native-mq-supporting browsers, to avoid errors
|
||||
respond.update = function(){};
|
||||
|
||||
//expose media query support flag for external use
|
||||
respond.mediaQueriesSupported = mqSupported;
|
||||
|
||||
//if media queries are supported, exit here
|
||||
if( mqSupported ){ return; }
|
||||
|
||||
//define vars
|
||||
var doc = win.document,
|
||||
docElem = doc.documentElement,
|
||||
mediastyles = [],
|
||||
rules = [],
|
||||
appendedEls = [],
|
||||
parsedSheets = {},
|
||||
resizeThrottle = 30,
|
||||
head = doc.getElementsByTagName( "head" )[0] || docElem,
|
||||
links = head.getElementsByTagName( "link" ),
|
||||
requestQueue = [],
|
||||
|
||||
//loop stylesheets, send text content to translate
|
||||
ripCSS = function(){
|
||||
var sheets = links,
|
||||
sl = sheets.length;
|
||||
|
||||
for( var i = 0; i < sl; i++ ){
|
||||
var sheet = sheets[ i ],
|
||||
href = sheet.href,
|
||||
media = sheet.media,
|
||||
isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
||||
|
||||
//only links plz and prevent re-parsing
|
||||
if( !!href && isCSS && !parsedSheets[ href ] ){
|
||||
if( !/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test( href )
|
||||
|| href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
|
||||
requestQueue.push( {
|
||||
href: href,
|
||||
media: media
|
||||
} );
|
||||
}
|
||||
else{
|
||||
parsedSheets[ href ] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
makeRequests();
|
||||
|
||||
},
|
||||
|
||||
//recurse through request queue, get css text
|
||||
makeRequests = function(){
|
||||
if( requestQueue.length ){
|
||||
var thisRequest = requestQueue.shift();
|
||||
|
||||
ajax( thisRequest.href, function( styles ){
|
||||
translate( styles, thisRequest.href, thisRequest.media );
|
||||
parsedSheets[ thisRequest.href ] = true;
|
||||
makeRequests();
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
//find media blocks in css text, convert to style blocks
|
||||
translate = function( styles, href, media ){
|
||||
var qs = styles.match( /@media ([^\{]+)\{([\S\s]+?)(?=\}\/\*\/mediaquery\*\/)/gmi ),
|
||||
ql = qs && qs.length || 0,
|
||||
//try to get CSS path
|
||||
href = href.substring( 0, href.lastIndexOf( "/" )),
|
||||
repUrls = function( css ){
|
||||
return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
|
||||
},
|
||||
useMedia = !ql && media;
|
||||
|
||||
//if path exists, tack on trailing slash
|
||||
if( href.length ){ href += "/"; }
|
||||
|
||||
//if no internal queries exist, but media attr does, use that
|
||||
//note: this currently lacks support for situations where a media attr is specified on a link AND
|
||||
//its associated stylesheet has internal CSS media queries.
|
||||
//In those cases, the media attribute will currently be ignored.
|
||||
if( useMedia ){
|
||||
ql = 1;
|
||||
}
|
||||
|
||||
|
||||
for( var i = 0; i < ql; i++ ){
|
||||
var fullq;
|
||||
|
||||
//media attr
|
||||
if( useMedia ){
|
||||
fullq = media;
|
||||
rules.push( repUrls( styles ) );
|
||||
}
|
||||
//parse for styles
|
||||
else{
|
||||
fullq = qs[ i ].match( /@media ([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
|
||||
rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
|
||||
}
|
||||
|
||||
var eachq = fullq.split( "," ),
|
||||
eql = eachq.length;
|
||||
|
||||
for( var j = 0; j < eql; j++ ){
|
||||
var thisq = eachq[ j ];
|
||||
mediastyles.push( {
|
||||
media : thisq.match( /(only\s+)?([a-zA-Z]+)(\sand)?/ ) && RegExp.$2,
|
||||
rules : rules.length - 1,
|
||||
minw : thisq.match( /\(min\-width:\s?(\s?[0-9]+)px\s?\)/ ) && parseFloat( RegExp.$1 ),
|
||||
maxw : thisq.match( /\(max\-width:\s?(\s?[0-9]+)px\s?\)/ ) && parseFloat( RegExp.$1 )
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
applyMedia();
|
||||
},
|
||||
|
||||
lastCall,
|
||||
|
||||
resizeDefer,
|
||||
|
||||
//enable/disable styles
|
||||
applyMedia = function( fromResize ){
|
||||
var name = "clientWidth",
|
||||
docElemProp = docElem[ name ],
|
||||
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
|
||||
styleBlocks = {},
|
||||
dFrag = doc.createDocumentFragment(),
|
||||
lastLink = links[ links.length-1 ],
|
||||
now = (new Date()).getTime();
|
||||
|
||||
//throttle resize calls
|
||||
if( fromResize && lastCall && now - lastCall < resizeThrottle ){
|
||||
clearTimeout( resizeDefer );
|
||||
resizeDefer = setTimeout( applyMedia, resizeThrottle );
|
||||
return;
|
||||
}
|
||||
else {
|
||||
lastCall = now;
|
||||
}
|
||||
|
||||
for( var i in mediastyles ){
|
||||
var thisstyle = mediastyles[ i ];
|
||||
if( !thisstyle.minw && !thisstyle.maxw ||
|
||||
( !thisstyle.minw || thisstyle.minw && currWidth >= thisstyle.minw ) &&
|
||||
(!thisstyle.maxw || thisstyle.maxw && currWidth <= thisstyle.maxw ) ){
|
||||
if( !styleBlocks[ thisstyle.media ] ){
|
||||
styleBlocks[ thisstyle.media ] = [];
|
||||
}
|
||||
styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
|
||||
}
|
||||
}
|
||||
|
||||
//remove any existing respond style element(s)
|
||||
for( var i in appendedEls ){
|
||||
if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){
|
||||
head.removeChild( appendedEls[ i ] );
|
||||
}
|
||||
}
|
||||
|
||||
//inject active styles, grouped by media type
|
||||
for( var i in styleBlocks ){
|
||||
var ss = doc.createElement( "style" ),
|
||||
css = styleBlocks[ i ].join( "\n" );
|
||||
|
||||
ss.type = "text/css";
|
||||
ss.media = i;
|
||||
|
||||
if ( ss.styleSheet ){
|
||||
ss.styleSheet.cssText = css;
|
||||
}
|
||||
else {
|
||||
ss.appendChild( doc.createTextNode( css ) );
|
||||
}
|
||||
dFrag.appendChild( ss );
|
||||
appendedEls.push( ss );
|
||||
}
|
||||
|
||||
//append to DOM at once
|
||||
head.insertBefore( dFrag, lastLink.nextSibling );
|
||||
},
|
||||
//tweaked Ajax functions from Quirksmode
|
||||
ajax = function( url, callback ) {
|
||||
var req = xmlHttp();
|
||||
if (!req){
|
||||
return;
|
||||
}
|
||||
req.open( "GET", url, true );
|
||||
req.onreadystatechange = function () {
|
||||
if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){
|
||||
return;
|
||||
}
|
||||
callback( req.responseText );
|
||||
}
|
||||
if ( req.readyState == 4 ){
|
||||
return;
|
||||
}
|
||||
req.send();
|
||||
},
|
||||
//define ajax obj
|
||||
xmlHttp = (function() {
|
||||
var xmlhttpmethod = false,
|
||||
attempts = [
|
||||
function(){ return new ActiveXObject("Microsoft.XMLHTTP") },
|
||||
function(){ return new ActiveXObject("Msxml3.XMLHTTP") },
|
||||
function(){ return new ActiveXObject("Msxml2.XMLHTTP") },
|
||||
function(){ return new XMLHttpRequest() }
|
||||
],
|
||||
al = attempts.length;
|
||||
|
||||
while( al-- ){
|
||||
try {
|
||||
xmlhttpmethod = attempts[ al ]();
|
||||
}
|
||||
catch(e) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return function(){
|
||||
return xmlhttpmethod;
|
||||
};
|
||||
})();
|
||||
|
||||
//translate CSS
|
||||
ripCSS();
|
||||
|
||||
//expose update for re-running respond later on
|
||||
respond.update = ripCSS;
|
||||
|
||||
//adjust on resize
|
||||
function callMedia(){
|
||||
applyMedia( true );
|
||||
}
|
||||
if( win.addEventListener ){
|
||||
win.addEventListener( "resize", callMedia, false );
|
||||
}
|
||||
else if( win.attachEvent ){
|
||||
win.attachEvent( "onresize", callMedia );
|
||||
}
|
||||
})(
|
||||
this,
|
||||
(function( win ){
|
||||
|
||||
//for speed, flag browsers with window.matchMedia support and IE 9 as supported
|
||||
if( win.matchMedia ){ return true; }
|
||||
|
||||
var bool,
|
||||
doc = document,
|
||||
docElem = doc.documentElement,
|
||||
refNode = docElem.firstElementChild || docElem.firstChild,
|
||||
// fakeBody required for <FF4 when executed in <head>
|
||||
fakeBody = doc.createElement( "body" ),
|
||||
div = doc.createElement( "div" ),
|
||||
q = "only all";
|
||||
|
||||
div.id = "mq-test-1";
|
||||
div.style.cssText = "position:absolute;top:-99em";
|
||||
fakeBody.appendChild( div );
|
||||
|
||||
div.innerHTML = '_<style media="'+q+'"> #mq-test-1 { width: 9px; }</style>';
|
||||
docElem.insertBefore( fakeBody, refNode );
|
||||
div.removeChild( div.firstChild );
|
||||
bool = div.offsetWidth == 9;
|
||||
docElem.removeChild( fakeBody );
|
||||
return bool;
|
||||
})( this )
|
||||
);
|
||||
5
js/libs/selectivizr-1.0.1.js
Normal file
@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* selectivizr v1.0.1 - (c) Keith Clark, freely distributable under the terms of the MIT license.
|
||||
* selectivizr.com
|
||||
*/
|
||||
var k=true,p=false;(function(A){function N(a){return a.replace(O,q).replace(P,function(b,e,c){b=c.split(",");c=0;for(var g=b.length;c<g;c++){var h=Q(b[c].replace(R,q).replace(S,q))+w,f=[];b[c]=h.replace(T,function(d,l,m,j,i){if(l){if(f.length>0){d=f;var x;i=h.substring(0,i).replace(U,o);if(i==o||i.charAt(i.length-1)==w)i+="*";try{x=y(i)}catch(ha){}if(x){i=0;for(m=x.length;i<m;i++){j=x[i];for(var B=j.className,C=0,V=d.length;C<V;C++){var r=d[C];if(!RegExp("(^|\\s)"+r.className+"(\\s|$)").test(j.className))if(r.b&&(r.b===k||r.b(j)===k))B=E(B,r.className,k)}j.className=B}}f=[]}return l}else{if(l=m?W(m):!F||F.test(j)?{className:G(j),b:k}:null){f.push(l);return"."+l.className}return d}})}return e+b.join(",")})}function W(a){var b=k,e=G(a.slice(1)),c=a.substring(0,5)==":not(",g,h;if(c)a=a.slice(5,-1);var f=a.indexOf("(");if(f>-1)a=a.substring(0,f);if(a.charAt(0)==":")switch(a.slice(1)){case "root":b=function(d){return c?d!=H:d==H};break;case "target":if(s==8){b=function(d){function l(){var m=location.hash,j=m.slice(1);return c?m==""||d.id!=j:m!=""&&d.id==j}t(A,"hashchange",function(){u(d,e,l())});return l()};break}return p;case "checked":b=function(d){X.test(d.type)&&t(d,"propertychange",function(){event.propertyName=="checked"&&u(d,e,d.checked!==c)});return d.checked!==c};break;case "disabled":c=!c;case "enabled":b=function(d){if(Y.test(d.tagName)){t(d,"propertychange",function(){event.propertyName=="$disabled"&&u(d,e,d.a===c)});z.push(d);d.a=d.disabled;return d.disabled===c}return a==":enabled"?c:!c};break;case "focus":g="focus";h="blur";case "hover":if(!g){g="mouseenter";h="mouseleave"}b=function(d){t(d,c?h:g,function(){u(d,e,k)});t(d,c?g:h,function(){u(d,e,p)});return c};break;default:if(!Z.test(a))return p}return{className:e,b:b}}function G(a){return I+"-"+(s==6&&$?aa++:a.replace(ba,function(b){return b.charCodeAt(0)}))}function Q(a){return a.replace(J,q).replace(ca,w)}function u(a,b,e){var c=a.className;b=E(c,b,e);if(b!=c){a.className=b;a.parentNode.className+=o}}function E(a,b,e){var c=RegExp("(^|\\s)"+b+"(\\s|$)"),g=c.test(a);return e?g?a:a+w+b:g?a.replace(c,q).replace(J,q):a}function t(a,b,e){a.attachEvent("on"+b,e)}function D(a,b){if(/^https?:\/\//i.test(a))return b.substring(0,b.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return b.substring(0,b.indexOf("/",8))+a;var e=b.split("?")[0];if(a.charAt(0)!="?"&&e.charAt(e.length-1)!="/")e=e.substring(0,e.lastIndexOf("/")+1);return e+a}function K(a){if(a){v.open("GET",a,p);v.send();return(v.status==200?v.responseText:o).replace(da,o).replace(ea,function(b,e,c,g,h){return K(D(c||h,a))}).replace(fa,function(b,e,c){e=e||"";return" url("+e+D(c,a)+e+") "})}return o}function ga(){var a,b;a=n.getElementsByTagName("BASE");for(var e=a.length>0?a[0].href:n.location.href,c=0;c<n.styleSheets.length;c++){b=n.styleSheets[c];if(b.href!=o)if(a=D(b.href,e))b.cssText=N(K(a))}z.length>0&&setInterval(function(){for(var g=0,h=z.length;g<h;g++){var f=z[g];if(f.disabled!==f.a)if(f.disabled){f.disabled=p;f.a=k;f.disabled=k}else f.a=f.disabled}},250)}if(!/*@cc_on!@*/true){var n=document,H=n.documentElement,v=function(){if(A.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return null}}(),s=/MSIE ([\d])/.exec(navigator.userAgent)[1];if(!(n.compatMode!="CSS1Compat"||s<6||s>8||!v)){var L={NW:"*.Dom.select",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",MooTools:"$$",Sizzle:"*",jQuery:"*",dojo:"*.query"},y,z=[],aa=0,$=k,I="slvzr",M=I+"DOMReady",da=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,ea=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,fa=/\burl\(\s*(["']?)([^"')]+)\1\s*\)/g,Z=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,O=/:(:first-(?:line|letter))/g,P=/(^|})\s*([^\{]*?[\[:][^{]+)/g,T=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,U=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,ba=/[^\w-]/g,Y=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,X=/^(checkbox|radio)$/,F=s>6?/[\$\^*]=(['"])\1/:null,R=/([(\[+~])\s+/g,S=/\s+([)\]+~])/g,ca=/\s+/g,J=/^\s*((?:[\S\s]*\S)?)\s*$/,o="",w=" ",q="$1";n.write("<script id="+M+" defer src='//:'><\/script>");n.getElementById(M).onreadystatechange=function(){if(this.readyState=="complete"){a:{var a,b;for(b in L)if(A[b]&&(a=eval(L[b].replace("*",b)))){y=a;break a}y=p}if(y){ga();this.parentNode.removeChild(this)}}}}}})(this);
|
||||
121
js/mylibs/helper.js
Normal file
@ -0,0 +1,121 @@
|
||||
/*
|
||||
* MBP - Mobile boilerplate helper functions
|
||||
*/
|
||||
|
||||
|
||||
window.MBP = window.MBP || {};
|
||||
|
||||
// Hide URL Bar for iOS
|
||||
// http://remysharp.com/2010/08/05/doing-it-right-skipping-the-iphone-url-bar/
|
||||
|
||||
MBP.hideUrlBar = function () {
|
||||
/mobile/i.test(navigator.userAgent) && !pageYOffset && !location.hash && setTimeout(function () {
|
||||
window.scrollTo(0, 1);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
|
||||
// Fast Buttons
|
||||
// http://code.google.com/mobile/articles/fast_buttons.html
|
||||
|
||||
MBP.fastButton = function (element, handler) {
|
||||
this.element = element;
|
||||
this.handler = handler;
|
||||
element.addEventListener('touchstart', this, false);
|
||||
element.addEventListener('click', this, false);
|
||||
};
|
||||
|
||||
MBP.fastButton.prototype.handleEvent = function(event) {
|
||||
switch (event.type) {
|
||||
case 'touchstart': this.onTouchStart(event); break;
|
||||
case 'touchmove': this.onTouchMove(event); break;
|
||||
case 'touchend': this.onClick(event); break;
|
||||
case 'click': this.onClick(event); break;
|
||||
}
|
||||
};
|
||||
|
||||
MBP.fastButton.prototype.onTouchStart = function(event) {
|
||||
event.stopPropagation();
|
||||
this.element.addEventListener('touchend', this, false);
|
||||
document.body.addEventListener('touchmove', this, false);
|
||||
this.startX = event.touches[0].clientX;
|
||||
this.startY = event.touches[0].clientY;
|
||||
this.element.style.backgroundColor = "rgba(0,0,0,.7)";
|
||||
};
|
||||
|
||||
MBP.fastButton.prototype.onTouchMove = function(event) {
|
||||
if(Math.abs(event.touches[0].clientX - this.startX) > 10 || Math.abs(event.touches[0].clientY - this.startY) > 10) {
|
||||
this.reset();
|
||||
}
|
||||
};
|
||||
MBP.fastButton.prototype.onClick = function(event) {
|
||||
event.stopPropagation();
|
||||
this.reset();
|
||||
this.handler(event);
|
||||
if(event.type == 'touchend') {
|
||||
MBP.preventGhostClick(this.startX, this.startY);
|
||||
}
|
||||
this.element.style.backgroundColor = "";
|
||||
};
|
||||
MBP.fastButton.prototype.reset = function() {
|
||||
this.element.removeEventListener('touchend', this, false);
|
||||
document.body.removeEventListener('touchmove', this, false);
|
||||
this.element.style.backgroundColor = "";
|
||||
};
|
||||
MBP.preventGhostClick = function (x, y) {
|
||||
MBP.coords.push(x, y);
|
||||
window.setTimeout(function (){
|
||||
MBP.coords.splice(0, 2);
|
||||
}, 2500);
|
||||
};
|
||||
;
|
||||
MBP.ghostClickHandler = function (event) {
|
||||
for(var i = 0, len = MBP.coords.length; i < len; i += 2) {
|
||||
var x = MBP.coords[i];
|
||||
var y = MBP.coords[i + 1];
|
||||
if(Math.abs(event.clientX - x) < 25 && Math.abs(event.clientY - y) < 25) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
};
|
||||
document.addEventListener('click', MBP.ghostClickHandler, true);
|
||||
MBP.coords = [];
|
||||
|
||||
|
||||
// iOS Startup Image
|
||||
// https://github.com/shichuan/mobile-html5-boilerplate/issues#issue/2
|
||||
|
||||
MBP.splash = function () {
|
||||
var filename = navigator.platform === 'iPad' ? 'h/' : 'l/';
|
||||
document.write('<link rel="apple-touch-startup-image" href="/img/' + filename + 'splash.png" />' );
|
||||
}
|
||||
|
||||
|
||||
// Autogrow
|
||||
// http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series.html
|
||||
|
||||
MBP.autogrow = function (element, lh) {
|
||||
|
||||
function handler(e){
|
||||
var newHeight = this.scrollHeight,
|
||||
currentHeight = this.clientHeight;
|
||||
if (newHeight > currentHeight) {
|
||||
this.style.height = newHeight + 3 * textLineHeight + "px";
|
||||
}
|
||||
}
|
||||
|
||||
var setLineHeight = (lh) ? lh : 12,
|
||||
textLineHeight = element.currentStyle ? element.currentStyle.lineHeight :
|
||||
getComputedStyle(element, null).lineHeight;
|
||||
|
||||
textLineHeight = (textLineHeight.indexOf("px") == -1) ? setLineHeight :
|
||||
parseInt(textLineHeight, 10);
|
||||
|
||||
element.style.overflow = "hidden";
|
||||
element.addEventListener ? element.addEventListener('keyup', handler, false) :
|
||||
element.attachEvent('onkeyup', handler);
|
||||
}
|
||||
|
||||
|
||||
|
||||
114
js/plugins.js
Normal file
@ -0,0 +1,114 @@
|
||||
// Plugins
|
||||
|
||||
// usage: log('inside coolFunc', this, arguments);
|
||||
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
|
||||
window.log = function(){
|
||||
log.history = log.history || []; // store logs to an array for reference
|
||||
log.history.push(arguments);
|
||||
arguments.callee = arguments.callee.caller;
|
||||
if(this.console) console.log( Array.prototype.slice.call(arguments) );
|
||||
};
|
||||
|
||||
// make it safe to use console.log always
|
||||
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info, log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});
|
||||
|
||||
// jQuery/helper plugins
|
||||
|
||||
/*!
|
||||
* HTML5 Placeholder jQuery Plugin v1.8.2
|
||||
* @link http://github.com/mathiasbynens/Placeholder-jQuery-Plugin
|
||||
* @author Mathias Bynens <http://mathiasbynens.be/>
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
||||
var isInputSupported = 'placeholder' in document.createElement('input'),
|
||||
isTextareaSupported = 'placeholder' in document.createElement('textarea');
|
||||
if (isInputSupported && isTextareaSupported) {
|
||||
$.fn.placeholder = function() {
|
||||
return this;
|
||||
};
|
||||
$.fn.placeholder.input = $.fn.placeholder.textarea = true;
|
||||
} else {
|
||||
$.fn.placeholder = function() {
|
||||
return this.filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
|
||||
.bind('focus.placeholder', clearPlaceholder)
|
||||
.bind('blur.placeholder', setPlaceholder)
|
||||
.trigger('blur.placeholder').end();
|
||||
};
|
||||
$.fn.placeholder.input = isInputSupported;
|
||||
$.fn.placeholder.textarea = isTextareaSupported;
|
||||
}
|
||||
|
||||
function args(elem) {
|
||||
// Return an object of element attributes
|
||||
var newAttrs = {},
|
||||
rinlinejQuery = /^jQuery\d+$/;
|
||||
$.each(elem.attributes, function(i, attr) {
|
||||
if (attr.specified && !rinlinejQuery.test(attr.name)) {
|
||||
newAttrs[attr.name] = attr.value;
|
||||
}
|
||||
});
|
||||
return newAttrs;
|
||||
}
|
||||
|
||||
function clearPlaceholder() {
|
||||
var $input = $(this);
|
||||
if ($input.val() === $input.attr('placeholder') && $input.hasClass('placeholder')) {
|
||||
if ($input.data('placeholder-password')) {
|
||||
$input.hide().next().attr('id', $input.removeAttr('id').data('placeholder-id')).show().focus();
|
||||
} else {
|
||||
$input.val('').removeClass('placeholder');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setPlaceholder(elem) {
|
||||
var $replacement,
|
||||
$input = $(this),
|
||||
$origInput = $input,
|
||||
id = this.id;
|
||||
if ($input.val() === '') {
|
||||
if ($input.is(':password')) {
|
||||
if (!$input.data('placeholder-textinput')) {
|
||||
try {
|
||||
$replacement = $input.clone().attr({ type: 'text' });
|
||||
} catch(e) {
|
||||
$replacement = $('<input>').attr($.extend(args(this), { type: 'text' }));
|
||||
}
|
||||
$replacement
|
||||
.removeAttr('name')
|
||||
// We could just use the `.data(obj)` syntax here, but that wouldn’t work in pre-1.4.3 jQueries
|
||||
.data('placeholder-password', true)
|
||||
.data('placeholder-id', id)
|
||||
.bind('focus.placeholder', clearPlaceholder);
|
||||
$input
|
||||
.data('placeholder-textinput', $replacement)
|
||||
.data('placeholder-id', id)
|
||||
.before($replacement);
|
||||
}
|
||||
$input = $input.removeAttr('id').hide().prev().attr('id', id).show();
|
||||
}
|
||||
$input.addClass('placeholder').val($input.attr('placeholder'));
|
||||
} else {
|
||||
$input.removeClass('placeholder');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// Look for forms
|
||||
$('form').bind('submit.placeholder', function() {
|
||||
// Clear the placeholder values so they don’t get submitted
|
||||
var $inputs = $('.placeholder', this).each(clearPlaceholder);
|
||||
setTimeout(function() {
|
||||
$inputs.each(setPlaceholder);
|
||||
}, 10);
|
||||
});
|
||||
});
|
||||
|
||||
// Clear placeholder values upon page reload
|
||||
$(window).bind('unload.placeholder', function() {
|
||||
$('.placeholder').val('');
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
9
js/script.js
Normal file
@ -0,0 +1,9 @@
|
||||
if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
|
||||
var viewportmeta = document.querySelectorAll('meta[name="viewport"]')[0];
|
||||
if (viewportmeta) {
|
||||
viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
|
||||
document.body.addEventListener('gesturestart', function() {
|
||||
viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
5
robots.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# www.robotstxt.org/
|
||||
# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
|
||||
|
||||
User-agent: *
|
||||
|
||||
31
test/index.html
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>QUnit Tests</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" media="screen">
|
||||
|
||||
<!-- reference your own javascript files here -->
|
||||
|
||||
<script src="../js/libs/modernizr-1.7.min.js"></script>
|
||||
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
|
||||
<script src="../js/plugins.js"></script>
|
||||
<script src="../js/script.js"></script>
|
||||
|
||||
|
||||
<!-- test runner files -->
|
||||
<script src="qunit/qunit.js"></script>
|
||||
<script src="tests.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="flora">
|
||||
<h1 id="qunit-header">QUnit Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
148
test/qunit/qunit.css
Executable file
@ -0,0 +1,148 @@
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-tests li ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
|
||||
background-color: #0d3349;
|
||||
|
||||
border-radius: 15px 15px 0 0;
|
||||
-moz-border-radius: 15px 15px 0 0;
|
||||
-webkit-border-top-right-radius: 15px;
|
||||
-webkit-border-top-left-radius: 15px;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0em 0 0.5em 2em;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 0 0.5em 2.5em;
|
||||
background-color: #2b81af;
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 0.5em 0.4em 2.5em;
|
||||
border-bottom: 1px solid #fff;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li ol {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #fff;
|
||||
|
||||
border-radius: 15px;
|
||||
-moz-border-radius: 15px;
|
||||
-webkit-border-radius: 15px;
|
||||
|
||||
box-shadow: inset 0px 2px 13px #999;
|
||||
-moz-box-shadow: inset 0px 2px 13px #999;
|
||||
-webkit-box-shadow: inset 0px 2px 13px #999;
|
||||
}
|
||||
|
||||
#qunit-tests li li {
|
||||
margin: 0.5em;
|
||||
padding: 0.4em 0.5em 0.4em 0.5em;
|
||||
background-color: #fff;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #5E740B;
|
||||
background-color: #fff;
|
||||
border-left: 26px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests li.pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests li.pass span.test-name { color: #366097; }
|
||||
|
||||
#qunit-tests li li.pass span.test-actual,
|
||||
#qunit-tests li li.pass span.test-expected { color: #999999; }
|
||||
|
||||
strong b.pass { color: #5E740B; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #fff;
|
||||
border-left: 26px solid #EE5757;
|
||||
}
|
||||
|
||||
#qunit-tests li.fail { color: #000000; background-color: #EE5757; }
|
||||
#qunit-tests li.fail span.test-name,
|
||||
#qunit-tests li.fail span.module-name { color: #000000; }
|
||||
|
||||
#qunit-tests li li.fail span.test-actual { color: #EE5757; }
|
||||
#qunit-tests li li.fail span.test-expected { color: green; }
|
||||
|
||||
strong b.fail { color: #710909; }
|
||||
|
||||
#qunit-banner.qunit-fail,
|
||||
#qunit-testrunner-toolbar { background-color: #EE5757; }
|
||||
|
||||
|
||||
/** Footer */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 0.5em 0.5em 2.5em;
|
||||
|
||||
color: #2b81af;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-radius: 0 0 15px 15px;
|
||||
-moz-border-radius: 0 0 15px 15px;
|
||||
-webkit-border-bottom-right-radius: 15px;
|
||||
-webkit-border-bottom-left-radius: 15px;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
}
|
||||
1265
test/qunit/qunit.js
Executable file
27
test/tests.js
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
// documentation on writing tests here: http://docs.jquery.com/QUnit
|
||||
// example tests: https://github.com/jquery/qunit/blob/master/test/same.js
|
||||
|
||||
// below are some general tests but feel free to delete them.
|
||||
|
||||
module("example tests");
|
||||
test("HTML5 Boilerplate is sweet",function(){
|
||||
expect(1);
|
||||
equals("boilerplate".replace("boilerplate","sweet"),"sweet","Yes. HTML5 Boilerplate is, in fact, sweet");
|
||||
|
||||
})
|
||||
|
||||
// these test things from plugins.js
|
||||
test("Environment is good",function(){
|
||||
expect(3);
|
||||
ok( !!window.log, "log function present");
|
||||
|
||||
var history = log.history && log.history.length || 0;
|
||||
log("logging from the test suite.")
|
||||
equals( log.history.length - history, 1, "log history keeps track" )
|
||||
|
||||
ok( !!window.Modernizr, "Modernizr global is present")
|
||||
})
|
||||
|
||||
|
||||
|
||||