Fork Me On Github

Getting Started

The assets folder contains the base structure for css, javascript and other static assets, such as images, fonts, audio and videos.

There is a package.json and a gulpfile in the project root, which when installed and run will automatically watch and compile JS and CSS. Browsersync is also included for local development. Gulpfile.js includes various config options which can be configured as you want them.

There are then several start folders containing skeleton HTML / PHP to get started with a website, web app or wordpress theme. Just copy the desired set of files into the source of your project in order to get started.

JS Source Overview

Config & Init

_config.js - app config

_init.js - app initialisation

App General Code - general app functions

a.auth.js - authorisation checks, run after a user logs in

a.checks.js - initialisation checks, run on start


b.docsize.js - handles functions that must run when document resizes

b.inputs.js - monitor focus, blur and change events on form inputs

b.nav.js - binds all events - clicks etc

b.scroll.js - handles scroll events

b.windowsize.js - handles functions that must run when window resizes or orientation changes


c.plupload.js - integrates plupload plugin for creation of rich ajax image uploading

c.socket.js - allows creation of connections


h.ajax.js - standard functions for AJAX calls

h.ajax_errors.js - handles ajax errors - analytics tracking, such as google or facebook

h.filter.js - swear filter

h.hijax.js - hijack url links with an AJAX call

h.motion.js - detect device motion - e.g. using gyroscope and accellerometer

h.preload.js - preload images etc

h.pushstate.js - check for HTML5 pushstate - include at top of page (doesn't require jquery)

h.videos.js - HTML5 video manager


m.all.js - general collection of data models

Standard Functions

s.all.js - standard functions
s.fastclick - standard fastclick function


v.pages.js - handles page switching and functions to run when loading each page

v.popups.js - handles popups and functions to run when loading each popup - social sharing functions

v.toggles.js - handles toggling of actions/data e.g. showing and hiding elements


w.all.js - watch for object changes

External API Wrappers

x.bitly.js - api

x.facebook.4.js - facebook open graph api

x.gmaps.js - google maps api - youtube api