JavaScript PHP CSS HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_archive
electron/v1/src
examples
node/v1
web
webapp
wordpress
.gitignore
README.md
favicon.ico
index.php
package-lock.json

README.md

SnowDrift

By Alex Bimpson @ Prrple

Visit online guide and examples


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

  • $config
    • errors
    • preload
  • $placeholders

_init.js - app initialisation

App General Code

a.app.js - general app functions

  • $app

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

  • $auth

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

  • $checks

Binders

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

  • $docsize

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

  • $inputs

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

  • $nav

b.scroll.js - handles scroll events

  • $scroll

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

  • $windowsize

Classes

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

  • $plupload

c.socket.js - allows creation of socket.io connections

  • $socket

Helpers

h.ajax.js - standard functions for AJAX calls

  • $ajax

h.ajax_errors.js - handles ajax errors

  • $errors

h.analytics.js - analytics tracking, such as google or facebook

  • $analytics

h.filter.js - swear filter

  • $filter

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

  • $hijax

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

  • $motion

h.preload.js - preload images etc

  • $preload

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

  • $pushstate

h.videos.js - HTML5 video manager

  • $videos

Models

m.all.js - general collection of data models

  • $m

Standard Functions

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

Views

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

  • $pages
  • $page

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

  • $popups
  • $popup

v.social.js - social sharing functions

  • $social

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

  • $toggles

Watchers

w.all.js - watch for object changes

  • $watchers

External API Wrappers

x.bitly.js - bit.ly api

  • $bitly

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

  • $facebook

x.gmaps.js - google maps api

  • $gmaps

x.youtube.js - youtube api

  • $youtube