Initialization

This commit is contained in:
Yann Esposito (Yogsototh) 2011-04-04 16:09:11 +02:00
commit a443134757
56 changed files with 12370 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
*.swp
.DS_Store
tmp/
.sass-cache

22
config.ru Normal file
View file

@ -0,0 +1,22 @@
require 'rubygems'
require 'rack'
require 'rack/contrib'
require 'rack/trystatic'
require 'mime/types'
use Rack::Deflater
use Rack::ETag
$rootdir="site"
use Rack::TryStatic,
:root => $rootdir, # static files root dir
:urls => %w[/], # match all requests
:try => ['.html', 'index.html', '/index.html'] # try these postfixes sequentially
errorFile='site/404.html'
run lambda { [404, {
"Last-Modified" => File.mtime(errorFile).httpdate,
"Content-Type" => "text/html",
"Content-Length" => File.size(errorFile).to_s
}, File.read(errorFile)] }

25
rack/trystatic.rb Normal file
View file

@ -0,0 +1,25 @@
require 'rubygems'
require 'rack'
module ::Rack
class TryStatic < Static
def initialize(app, options)
super
@try = ([''] + Array(options.delete(:try)) + [''])
end
def call(env)
@next = 0
while @next < @try.size && 404 == (resp = super(try_next(env)))[0]
@next += 1
end
404 == resp[0] ? @app.call : resp
end
private
def try_next(env)
env.merge('PATH_INFO' => env['PATH_INFO'] + @try[@next])
end
end
end

32
site/404.html Normal file
View file

@ -0,0 +1,32 @@
<!doctype html>
<title>Page Not Found</title>
<style>
body { text-align: center;}
h1 { font-size: 50px; text-align: center }
span[frown] { transform: rotate(90deg); display:inline-block; color: #bbb; }
body { font: 20px Constantia, "Hoefler Text", "Adobe Caslon Pro", Baskerville, Georgia, Times, serif; color: #999; text-shadow: 2px 2px 2px rgba(200, 200, 200, 0.5); }
::-moz-selection{ background:#FF5E99; color:#fff; }
::selection { background:#FF5E99; color:#fff; }
article {display:block; text-align: left; width: 500px; margin: 0 auto; }
a { color: rgb(36, 109, 56); text-decoration:none; }
a:hover { color: rgb(96, 73, 141) ; text-shadow: 2px 2px 2px rgba(36, 109, 56, 0.5); }
</style>
<article>
<h1>Not found <span frown>:(</span></h1>
<div>
<p>Sorry, but the page you were trying to view does not exist.</p>
<p>It looks like this was the result of either:</p>
<ul>
<li>a mistyped address</li>
<li>an out-of-date link</li>
</ul>
</div>
<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>
</article>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

BIN
site/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

816
site/build/build.xml Normal file
View 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="&lt;link rel=&quot;shortcut icon&quot; href=&quot;/favicon\.ico&quot;&gt;" 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="&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/apple-touch-icon.png&quot;>" 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="&lt;!-- scripts concatenated [\d\w\s\W]*?!-- end ((scripts)|(concatenated and minified scripts))--&gt;" replace="&lt;script src='${dir.js}/scripts-${build.number}.min.js\'&gt;&lt;/script&gt;" 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>

View 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

View 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
site/build/createproject.sh Executable file
View 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

View 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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.

Binary file not shown.

Binary file not shown.

11
site/config.rb Normal file
View file

@ -0,0 +1,11 @@
require 'less'
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "src"
images_dir = "img"
javascripts_dir = "js"
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

25
site/crossdomain.xml Normal file
View 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 dont understand all of the points described here, you probably
have a nasty security vulnerability. ~ simon willison
-->
</cross-domain-policy>

8
site/css/handheld.css Normal file
View file

@ -0,0 +1,8 @@
* {
float: none; /* Screens are not big enough to account for floats */
background: #fff; /* As much contrast as possible */
color: #000;
}
/* Slightly reducing font size to reduce need to scroll */
body { font-size: 80%; }

153
site/css/less.css Normal file
View file

@ -0,0 +1,153 @@
/* Less Framework 4
* http://lessframework.com
* by Joni Korpi
* License: http://creativecommons.org/licenses/MIT/ */
/* line 7, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em,
img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, hr,
dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figure, figcaption, hgroup,
menu, footer, header, nav, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
}
/* line 14, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
article, aside, canvas, figure, figure img, figcaption, hgroup,
footer, header, nav, section, audio, video {
display: block;
}
/* line 18, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
a img {
border: 0;
}
/* line 1, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.gigantic {
font-size: 110px;
line-height: 120px;
letter-spacing: -2px;
}
/* line 7, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.huge, h1 {
font-size: 68px;
line-height: 72px;
letter-spacing: -1px;
}
/* line 13, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.large, h2 {
font-size: 42px;
line-height: 48px;
}
/* line 18, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.bigger, h3 {
font-size: 26px;
line-height: 36px;
}
/* line 23, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.big, h4 {
font-size: 22px;
line-height: 30px;
}
/* line 28, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
body {
font: 16px/24px Georgia, serif;
}
/* line 32, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.small, small {
font-size: 13px;
line-height: 18px;
}
/* line 18, ../src/partials/_global.scss */
body {
background: #e8e8e8;
color: #3c3c3c;
-webkit-text-size-adjust: 100%;
}
/* line 34, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
::selection {
background: rgb(255,255,158);
}
/* line 35, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
::-moz-selection {
background: rgb(255,255,158);
}
/* line 36, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
img::selection {
background: transparent;
}
/* line 37, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
img::-moz-selection {
background: transparent;
}
/* line 38, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
body {
-webkit-tap-highlight-color: rgb(255,255,158);
}
/* Default Layout: 992px.
* Gutters: 24px.
* Outer margins: 48px.
* Leftover space for scrollbars @1024px: 32px. */
/* line 6, ../src/partials/_default.scss */
#container {
width: 896px;
padding: 72px 48px 84px;
}
/* Tablet Layout: 768px.
* Gutters: 24px.
* Outer margins: 28px.
* Inherits styles from: Default Layout. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
/* line 7, ../src/partials/_tablet.scss */
#container {
width: 712px;
padding: 48px 28px 60px;
}
}
/* Mobile Layout: 320px.
* Gutters: 24px.
* Outer margins: 34px.
* Inherits styles from: Default Layout. */
@media only screen and (max-width: 767px) {
/* line 7, ../src/partials/_mobile.scss */
#container {
width: 252px;
padding: 48px 34px 60px;
}
}
/* Wide Mobile Layout: 480px.
* Gutters: 24px.
* Outer margins: 22px.
* Inherits styles from: Default Layout, Mobile Layout. */
@media only screen and (min-width: 480px) and (max-width: 767px) {
/* line 7, ../src/partials/_wide-mobile.scss */
#container {
width: 436px;
padding: 36px 22px 48px;
}
}
/* Retina media query.
Overrides styles for devices with a
device-pixel-ratio of 2+, such as iPhone 4. */
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {}

5
site/css/main.css Normal file
View file

@ -0,0 +1,5 @@
/* line 1, ../src/main.scss */
#container {
margin: 0 auto;
border: 2px solid #800;
}

261
site/css/style.css Normal file
View file

@ -0,0 +1,261 @@
/**
* HTML5 Boilerplate
*
* style.css contains a reset, font normalization and some base styles.
*
* Credit is left where credit is due.
* Much inspiration was taken from these projects:
* - yui.yahooapis.com/2.8.1/build/base/base.css
* - camendesign.com/design/
* - praegnanz.de/weblog/htmlcssjs-kickstart
*/
/**
* html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
* v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
* html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, 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;
}
blockquote, q { quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after { content: ""; content: none; }
ins { background-color: #ff9; color: #000; text-decoration: none; }
mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
table { border-collapse: collapse; border-spacing: 0; }
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
input, select { vertical-align: middle; }
/**
* Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/* Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/**
* Minimal base styles.
*/
/* Always force a scrollbar in non-IE */
html { overflow-y: scroll; }
/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
a:hover, a:active { outline: none; }
ul, ol { margin-left: 2em; }
ol { list-style-type: decimal; }
/* Remove margins for navigation lists */
nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
small { font-size: 85%; }
strong, th { font-weight: bold; }
td { vertical-align: top; }
/* Set sub, sup without affecting line-height: gist.github.com/413930 */
sub, sup { font-size: 75%; line-height: 0; position: relative; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
pre {
/* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; white-space: pre-wrap; word-wrap: break-word;
padding: 15px;
}
textarea { overflow: auto; } /* www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left: -7px; }
/* Align checkboxes, radios, text inputs with their label by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
/* Hand cursor on clickable input elements */
label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
/* Webkit browsers add a 2px margin outside the chrome of form elements */
button, input, select, textarea { margin: 0; }
/* Colors for form validity */
input:valid, textarea:valid { }
input:invalid, textarea:invalid {
border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red;
}
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
/* These selection declarations have to be separate
No text-shadow: twitter.com/miketaylr/status/12228805301
Also: hot pink! */
::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
::selection { background:#FF5E99; color:#fff; text-shadow: none; }
/* j.mp/webkit-tap-highlight-color */
a:link { -webkit-tap-highlight-color: #FF5E99; }
/* Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
button { width: auto; overflow: visible; }
/* Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
.ie7 img { -ms-interpolation-mode: bicubic; }
/**
* You might tweak these..
*/
body, select, input, textarea {
/* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */
color: #444;
/* Set your base font here, to apply evenly */
/* font-family: Georgia, serif; */
}
/* Headers (h1, h2, etc) have no default font-size or margin; define those yourself */
h1, h2, h3, h4, h5, h6 { font-weight: bold; }
a, a:active, a:visited { color: #607890; }
a:hover { color: #036; }
/**
* Primary styles
*
* Author:
*/
/**
* Non-semantic helper classes: please define your styles before this section.
*/
/* For image replacement */
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
/* Hide for both screenreaders and browsers:
css-discuss.incutio.com/wiki/Screenreader_Visibility */
.hidden { display: none; visibility: hidden; }
/* Hide only visually, but have it available for screenreaders: by Jon Neal.
www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638 */
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }
/* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements.
j.mp/bestclearfix */
.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
.clearfix:after { clear: both; }
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
.clearfix { zoom: 1; }
/**
* Media queries for responsive design.
*
* These follow after primary styles so they will successfully override.
*/
@media all and (orientation:portrait) {
/* Style adjustments for portrait mode goes here */
}
@media all and (orientation:landscape) {
/* Style adjustments for landscape mode goes here */
}
/* Grade-A Mobile Browsers (Opera Mobile, Mobile Safari, Android Chrome)
consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
@media screen and (max-device-width: 480px) {
/* Uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you: j.mp/textsizeadjust */
/* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
}
/**
* Print styles.
*
* Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
-ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
a, a:visited { color: #444 !important; text-decoration: underline; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
}

21
site/example.html Normal file
View file

@ -0,0 +1,21 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title></title>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" media="all" href="stylesheets/less.css"/>
<link rel="stylesheet" media="all" href="stylesheets/main.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- Adding "maximum-scale=1" fixes the Mobile Safari auto-zoom bug: http://filamentgroup.com/examples/iosScaleBug/ -->
</head>
<body lang="en">
<div id="centraler">
<div id="container" style="margin: 0 auto;">
<div style="height: 600px; background: rgb(60,97,158)"></div>
</div>
</div>
</body>
</html>

BIN
site/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,36 @@
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
# OS or Editor folders
.DS_Store
.cache
.project
.settings
nbproject
thumbs.db
# Dreamweaver added files
_notes
dwsync.xml
# Komodo
*.komodoproject
.komodotools
# Folders to ignore
.hg
.svn
publish
.idea
# build script local files
build/buildinfo.properties
build/config/buildinfo.properties

View file

@ -0,0 +1,475 @@
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
# httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
###
### If you run a webserver other than apache, consider:
### github.com/paulirish/html5-boilerplate-server-configs
###
# ----------------------------------------------------------------------
# Better website experience for IE users
# ----------------------------------------------------------------------
# Force the latest IE version, in various cases when it may fall back to IE7 mode
# github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it's installed for a better experience for the poor IE folk
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
BrowserMatch MSIE ie
Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
</IfModule>
</IfModule>
<IfModule mod_headers.c>
# Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
# We need to inform proxies that content changes based on UA
Header append Vary User-Agent
# Cache control is set only if mod_headers is enabled, so that's unncessary to declare
</IfModule>
# ----------------------------------------------------------------------
# Cross-domain AJAX requests
# ----------------------------------------------------------------------
# Serve cross-domain ajax requests, disabled.
# enable-cors.org
# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
# <IfModule mod_headers.c>
# Header set Access-Control-Allow-Origin "*"
# </IfModule>
# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------
# allow access from all domains for webfonts
# alternatively you could only whitelist
# your subdomains like "sub.domain.com"
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------
# audio
AddType audio/ogg oga ogg
# video
AddType video/ogg ogv
AddType video/mp4 mp4
AddType video/webm webm
# Proper svg serving. Required for svg webfonts on iPad
# twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# webfonts
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
# assorted types
AddType image/x-icon ico
AddType image/webp webp
AddType text/cache-manifest appcache manifest
AddType text/x-component htc
AddType application/x-chrome-extension crx
AddType application/x-xpinstall xpi
AddType application/octet-stream safariextz
# ----------------------------------------------------------------------
# Allow concatenation from within specific js and css files
# ----------------------------------------------------------------------
# e.g. Inside of script.combined.js you could have
# <!--#include file="libs/jquery-1.5.0.min.js" -->
# <!--#include file="plugins/jquery.idletimer.js" -->
# and they would be included into this single file
# this is not in use in the boilerplate as it stands. you may
# choose to name your files in this way for this advantage
# or concatenate and minify them manually.
# Disabled by default.
# <FilesMatch "\.combined\.(js|css)$">
# Options +Includes
# SetOutputFilter INCLUDES
# </FilesMatch>
# ----------------------------------------------------------------------
# gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
# force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# html, txt, css, js, json, xml, htc:
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
FilterChain COMPRESS
FilterProtocol COMPRESS change=yes;byteranges=no
</IfModule>
<IfModule !mod_filter.c>
# Legacy versions of Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
</IfModule>
# webfonts and svg:
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
# these are pretty far-future expires headers
# they assume you control versioning with cachebusting query params like
# <script src="application.js?20100608">
# additionally, consider that outdated proxies may miscache
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
# if you don't use filenames to version, lower the css and js to something like
# "access plus 1 week" or so
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# your document html
ExpiresByType text/html "access plus 0 seconds"
# data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# rss feed
ExpiresByType application/rss+xml "access plus 1 hour"
# favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# htc files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# webfonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# css and javascript
ExpiresByType text/css "access plus 2 months"
ExpiresByType application/javascript "access plus 2 months"
ExpiresByType text/javascript "access plus 2 months"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
# Since we're sending far-future expires, we don't need ETags for
# static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
# ----------------------------------------------------------------------
# Stop screen flicker in IE on CSS rollovers
# ----------------------------------------------------------------------
# The following directives stop screen flicker in IE on CSS rollovers - in
# combination with the "ExpiresByType" rules for images (see above). If
# needed, un-comment the following rules.
# BrowserMatch "MSIE" brokenvary=1
# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
# BrowserMatch "Opera" !brokenvary
# SetEnvIf brokenvary 1 force-no-vary
# ----------------------------------------------------------------------
# Cookie setting from iframes
# ----------------------------------------------------------------------
# Allow cookies to be set from iframes (for IE only)
# If needed, uncomment and specify a path or regex in the Location directive
# <IfModule mod_headers.c>
# <Location />
# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
# </Location>
# </IfModule>
# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and features.
<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>
# ----------------------------------------------------------------------
# Suppress or force the "www." at the beginning of URLs
# ----------------------------------------------------------------------
# The same content should never be available under two different URLs - especially not with and
# without "www." at the beginning, since this can cause SEO problems (duplicate content).
# That's why you should choose one of the alternatives and redirect the other one.
# By default option 1 (no "www.") is activated. Remember: Shorter URLs are sexier.
# no-www.org/faq.php?q=class_b
# If you rather want to use option 2, just comment out all option 1 lines
# and uncomment option 2.
# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
# ----------------------------------------------------------------------
# Option 1:
# Rewrite "www.domain.com -> domain.com"
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>
# ----------------------------------------------------------------------
# Option 2:
# To rewrite "domain.com -> www.domain.com" uncomment the following lines.
# Be aware that the following rule might not be a good idea if you
# use "real" subdomains for certain parts of your website.
# <IfModule mod_rewrite.c>
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
# RewriteCond %{HTTP_HOST} (.+)$ [NC]
# RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
# </IfModule>
# ----------------------------------------------------------------------
# Add/remove trailing slash to (non-file) URLs
# ----------------------------------------------------------------------
# Google treats URLs with and without trailing slashes separately.
# Forcing a trailing slash is usually preferred, but all that's really
# important is that one correctly redirects to the other.
# By default option 1 (force trailing slash) is activated.
# http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
# http://www.alistapart.com/articles/slashforward/
# http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#url Trailing Slash Problem
# ----------------------------------------------------------------------
# Option 1:
# Rewrite "domain.com/foo -> domain.com/foo/"
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ /$1/ [R=301,L]
</IfModule>
# ----------------------------------------------------------------------
# Option 2:
# Rewrite "domain.com/foo/ -> domain.com/foo"
#<IfModule mod_rewrite.c>
# RewriteRule ^(.*)/$ /$1 [R=301,L]
#</IfModule>
# ----------------------------------------------------------------------
# Built-in filename-based cache busting
# ----------------------------------------------------------------------
# If you're not using the build script to manage your filename version revving,
# you might want to consider enabling this, which will route requests for
# /css/style.20110203.css to /css/style.css
# To understand why this is important and a better idea than all.css?v1231,
# read: github.com/paulirish/html5-boilerplate/wiki/Version-Control-with-Cachebusting
# Uncomment to enable.
# <IfModule mod_rewrite.c>
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
# </IfModule>
# ----------------------------------------------------------------------
# Prevent SSL cert warnings
# ----------------------------------------------------------------------
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.domain.com when your cert only allows https://secure.domain.com
# Uncomment the following lines to use this feature.
# <IfModule mod_rewrite.c>
# RewriteCond %{SERVER_PORT} !^443
# RewriteRule (.*) https://example-domain-please-change-me.com/$1 [R=301,L]
# </IfModule>
# ----------------------------------------------------------------------
# Prevent 404 errors for non-existing redirected folders
# ----------------------------------------------------------------------
# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist
# e.g. /blog/hello : webmasterworld.com/apache/3808792.htm
Options -MultiViews
# ----------------------------------------------------------------------
# custom 404 page
# ----------------------------------------------------------------------
# You can add custom pages to handle 500 or 403 pretty easily, if you like.
ErrorDocument 404 /404.html
# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------
# use utf-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8
# force utf-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss
# ----------------------------------------------------------------------
# A little more security
# ----------------------------------------------------------------------
# Do we want to advertise the exact version number of Apache we're running?
# Probably not.
## This can only be enabled if used in httpd.conf - It will not work in .htaccess
# ServerTokens Prod
# "-Indexes" will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn't allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
# Options -Indexes
# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
RewriteRule "(^|/)\." - [F]
</IfModule>
# If your server is not already configured as such, the following directive
# should be uncommented in order to set PHP's register_globals option to OFF.
# This closes a major security hole that is abused by most XSS (cross-site
# scripting) attacks. For more information: http://php.net/register_globals
#
# IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
#
# Your server does not allow PHP directives to be set via .htaccess. In that
# case you must make this change in your php.ini file instead. If you are
# using a commercial web host, contact the administrators for assistance in
# doing this. Not all servers allow local php.ini files, and they should
# include all PHP configurations (not just this one), or you will effectively
# reset everything to PHP defaults. Consult www.php.net for more detailed
# information about setting PHP directives.
# php_flag register_globals Off

43
site/humans.txt Normal file
View 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+//-
:-:///////:- -:/://
-////:- --//:
-- -:

2
site/img/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
!.gitignore

115
site/index.html Normal file
View file

@ -0,0 +1,115 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[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)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<!-- Place favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<!-- CSS: implied media="all" -->
<link rel="stylesheet" href="css/less.css"/>
<link rel="stylesheet" href="css/main.css">
<!-- Uncomment if you are specifically targeting less enabled mobile browsers
<link rel="stylesheet" media="handheld" href="css/handheld.css?v=2"> -->
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="js/libs/modernizr-1.7.min.js"></script>
</head>
<body>
<div id="metacontainer">
<div id="container">
<header>
<hgoup>
<h1>{title}</h1>
<h2>{subtitle}</h2>
</hgroup>
<nav id="mainnav">
<ul>
<li><a href="#">{item 1}</a></li>
<li><a href="#">{item 2}</a></li>
<li><a href="#">{item 3}</a></li>
</ul>
</nav>
</header>
<div id="main" role="main">
<article>
<header>
<hgroup>
<h2>{title}</h2>
<h3>{subtitle}</h3>
</hgroup>
</header>
<div class="intro">
<div class="tldr">{tldr}</div>
{introduction}
</div>
<div class="content">
{content}
</div>
<footer>
<ul class="article_metadata">
<li>Created: <time>{time}</time></li>
<li>Updated: <time>{time}</time></li>
<li>{copyright}</li>
</ul>
</footer>
</article>
</div>
<footer>
<div id="webpageinfo">
{copyright_infos}
</div>
</footer>
</div> <!--! end of #container -->
</div> <!--! end of #metacontainer -->
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
<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 concatenated and minified via ant build script-->
<script src="js/plugins.js"></script>
<script src="js/script.js"></script>
<!-- end scripts-->
<!--[if lt IE 7 ]>
<script src="js/libs/dd_belatedpng.js"></script>
<script>DD_belatedPNG.fix("img, .png_bg"); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
<![endif]-->
<!-- mathiasbynens.be/notes/async-analytics-snippet Change UA-XXXXX-X to be your site's ID -->
<script>
var _gaq=[["_setAccount","UA-XXXXX-X"],["_trackPageview"]];
(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>
</body>
</html>

File diff suppressed because one or more lines are too long

8316
site/js/libs/jquery-1.5.1.js vendored Normal file

File diff suppressed because it is too large Load diff

16
site/js/libs/jquery-1.5.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2
site/js/libs/modernizr-1.7.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2
site/js/mylibs/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
!.gitignore

15
site/js/plugins.js Normal file
View file

@ -0,0 +1,15 @@
// 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||{});
// place any jQuery/helper plugins in here, instead of separate, slower script files.

26
site/js/script.js Normal file
View file

@ -0,0 +1,26 @@
/* Author:
*/

5
site/robots.txt Normal file
View file

@ -0,0 +1,5 @@
# www.robotstxt.org/
# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
User-agent: *

21
site/src/less.scss Normal file
View file

@ -0,0 +1,21 @@
/* Less Framework 4
* http://lessframework.com
* by Joni Korpi
* License: http://creativecommons.org/licenses/MIT/ */
// Less Framework Compass Plugin
// by William Wells <less@hapa.me>
// https://github.com/willhw/compass-less-plugin
$less-grid-element: unquote("#container");
@import "less/reset";
@import "less/framework";
@import "less/typography/16px";
@import "partials/global";
@import "partials/default";
@import "partials/tablet";
@import "partials/mobile";
@import "partials/wide-mobile";
@import "partials/high-px-ratio";

4
site/src/main.scss Normal file
View file

@ -0,0 +1,4 @@
#container {
margin: 0 auto;
border: 2px solid #800;
}

View file

@ -0,0 +1,7 @@
/* Default Layout: 992px.
* Gutters: 24px.
* Outer margins: 48px.
* Leftover space for scrollbars @1024px: 32px. */
#{$less-grid-element} {
@include grid(10); }

View file

@ -0,0 +1,25 @@
// Global style definitions
h1 {
@extend .huge; }
h2 {
@extend .large; }
h3 {
@extend .bigger; }
h4 {
@extend .big; }
small {
@extend .small; }
body {
background: rgb(232, 232, 232);
color: rgb(60, 60, 60);
// Stops Mobile Safari from auto-adjusting font-sizes
-webkit-text-size-adjust: 100%; }
// Selection colors (easy to forget)
@include selection-color(unquote("rgb(255,255,158)"));

View file

@ -0,0 +1,8 @@
/* Retina media query.
Overrides styles for devices with a
device-pixel-ratio of 2+, such as iPhone 4. */
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
#{$less-grid-element} {
}
}

View file

@ -0,0 +1,8 @@
/* Mobile Layout: 320px.
* Gutters: 24px.
* Outer margins: 34px.
* Inherits styles from: Default Layout. */
@media only screen and (max-width: 767px) {
#{$less-grid-element} {
@include grid(3); } }

View file

@ -0,0 +1,8 @@
/* Tablet Layout: 768px.
* Gutters: 24px.
* Outer margins: 28px.
* Inherits styles from: Default Layout. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
#{$less-grid-element} {
@include grid(8); } }

View file

@ -0,0 +1,8 @@
/* Wide Mobile Layout: 480px.
* Gutters: 24px.
* Outer margins: 22px.
* Inherits styles from: Default Layout, Mobile Layout. */
@media only screen and (min-width: 480px) and (max-width: 767px) {
#{$less-grid-element} {
@include grid(5); } }

153
site/stylesheets/less.css Normal file
View file

@ -0,0 +1,153 @@
/* Less Framework 4
* http://lessframework.com
* by Joni Korpi
* License: http://creativecommons.org/licenses/MIT/ */
/* line 7, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em,
img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, hr,
dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figure, figcaption, hgroup,
menu, footer, header, nav, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
}
/* line 14, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
article, aside, canvas, figure, figure img, figcaption, hgroup,
footer, header, nav, section, audio, video {
display: block;
}
/* line 18, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
a img {
border: 0;
}
/* line 1, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.gigantic {
font-size: 110px;
line-height: 120px;
letter-spacing: -2px;
}
/* line 7, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.huge, h1 {
font-size: 68px;
line-height: 72px;
letter-spacing: -1px;
}
/* line 13, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.large, h2 {
font-size: 42px;
line-height: 48px;
}
/* line 18, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.bigger, h3 {
font-size: 26px;
line-height: 36px;
}
/* line 23, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.big, h4 {
font-size: 22px;
line-height: 30px;
}
/* line 28, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
body {
font: 16px/24px Georgia, serif;
}
/* line 32, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.small, small {
font-size: 13px;
line-height: 18px;
}
/* line 18, ../src/partials/_global.scss */
body {
background: #e8e8e8;
color: #3c3c3c;
-webkit-text-size-adjust: 100%;
}
/* line 34, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
::selection {
background: rgb(255,255,158);
}
/* line 35, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
::-moz-selection {
background: rgb(255,255,158);
}
/* line 36, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
img::selection {
background: transparent;
}
/* line 37, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
img::-moz-selection {
background: transparent;
}
/* line 38, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
body {
-webkit-tap-highlight-color: rgb(255,255,158);
}
/* Default Layout: 992px.
* Gutters: 24px.
* Outer margins: 48px.
* Leftover space for scrollbars @1024px: 32px. */
/* line 6, ../src/partials/_default.scss */
#container {
width: 896px;
padding: 72px 48px 84px;
}
/* Tablet Layout: 768px.
* Gutters: 24px.
* Outer margins: 28px.
* Inherits styles from: Default Layout. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
/* line 7, ../src/partials/_tablet.scss */
#container {
width: 712px;
padding: 48px 28px 60px;
}
}
/* Mobile Layout: 320px.
* Gutters: 24px.
* Outer margins: 34px.
* Inherits styles from: Default Layout. */
@media only screen and (max-width: 767px) {
/* line 7, ../src/partials/_mobile.scss */
#container {
width: 252px;
padding: 48px 34px 60px;
}
}
/* Wide Mobile Layout: 480px.
* Gutters: 24px.
* Outer margins: 22px.
* Inherits styles from: Default Layout, Mobile Layout. */
@media only screen and (min-width: 480px) and (max-width: 767px) {
/* line 7, ../src/partials/_wide-mobile.scss */
#container {
width: 436px;
padding: 36px 22px 48px;
}
}
/* Retina media query.
Overrides styles for devices with a
device-pixel-ratio of 2+, such as iPhone 4. */
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {}

View file

@ -0,0 +1,4 @@
/* line 1, ../src/main.scss */
#container {
margin: 0 auto;
}

31
site/test/index.html Normal file
View 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
site/test/qunit/qunit.css Executable file
View 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
site/test/qunit/qunit.js Executable file

File diff suppressed because it is too large Load diff

27
site/test/tests.js Normal file
View 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")
})