Chauncey McAskill a0f74506d2 Added 'grunt-svg-sprite' plugin
The plugin replaces 'svgmin' and 'svgstore' with an all-in-one and highly flexible solution for managing SVG assets.

Changes:
- Deleted 'assets/images/sprite/', SVG images can live anywhere within the source image directory;
- When compiled to 'www/assets/images/sprite.svg', the plugin generates an HTML file in 'assets/images/sprite.symbol.html' that serves as an index of the spritesheet's contents;
- A separator ("--") is used when traversing a directory structure for the symbol ID (e.g, 'sprite.svg#icons--social--twitter');
2016-08-22 09:33:07 -04:00
2016-08-22 09:33:07 -04:00
2016-08-22 09:33:07 -04:00
2016-04-11 16:08:58 -04:00
2015-11-16 17:28:51 -05:00
2016-04-11 16:08:58 -04:00
2016-04-11 16:08:58 -04:00
2016-07-19 10:19:52 -04:00
2016-08-22 09:33:07 -04:00
2015-08-03 11:32:07 -04:00
2016-08-22 09:33:07 -04:00
2016-07-19 10:19:52 -04:00

Locomotive front-end boilerplate

Front-end Boilerplate for projects by Locomotive.

Requirements

Prerequisite How to check How to install
Node.js 4.1.1 node -v nodejs.org
Grunt >= 0.1.13 grunt -v npm install -g grunt-cli

Getting started

  1. Get the latest node modules

  2. npm install -g npm-check-updates

  3. npm-check-updates -u

  4. npm install

  5. Run grunt and start coding

  • grunt

Grunt

Each Grunt task has it's own file in the grunt_tasks folder.

BrowserSync

BrowserSync will automatically inject, refresh and sync all your browsers.

Run grunt sync

CSS

Sass import order

  • Settings: Global variables, site-wide settings, config switches, etc.
  • Tools: Site-wide mixins and functions.
  • Generic: Low-specificity, far-reaching rulesets (e.g. resets).
  • Base: Unclassed HTML elements (e.g. a {}, blockquote {}, address {}).
  • Objects: Objects, abstractions, and design patterns (e.g. .o-media {}).
  • Components: Discrete, complete chunks of UI (e.g. .c-carousel {}).
  • Trumps: High-specificity, very explicit selectors. Overrides and helper classes (e.g. .u-hidden {}).

Grid

We are using a simple inline-block grid system.

Usage

Insert a o-grid block and add o-grid_item elements inside it. No rows that contain floats, no twelve columns system; just the number of items you want, with the classes names you want, inside a single block.

  • Include the grid mixins in your components classes.
  • Create custom width grid items by including the grid_item mixin and adding the widths you need or just include the helpers mixins with fractions like names.
  • Add media queries, on the helpers mixins or on your custom components to change the grid items widths, for your content, on different screen sizes.

Demo

Form

We included some basic CSS styles and resets to the form elements so we can easily have custom style form elements that work on every browsers.

Demo

JavaScript

  • We use HTML data attributes to init our JavaScript modules: data-module
  • All DOM related JavaScript is hooked to js- prefixed HTML classes
  • jQuery is globally included
Description
九州官网
Readme 2.2 MiB
Languages
JavaScript 64.5%
SCSS 22.1%
HTML 7%
CSS 6.4%