Add Ink Framework

This commit is contained in:
Timothy Warren 2014-09-24 17:57:25 -04:00
parent 21e43fa553
commit 02083af4a9
141 changed files with 90357 additions and 0 deletions

2036
public/css/font-awesome.css vendored Normal file

File diff suppressed because it is too large Load Diff

1
public/css/font-awesome.min.css vendored Normal file

File diff suppressed because one or more lines are too long

9690
public/css/ink-flex.css Normal file

File diff suppressed because it is too large Load Diff

1
public/css/ink-flex.min.css vendored Normal file

File diff suppressed because one or more lines are too long

896
public/css/ink-ie.css Normal file
View File

@ -0,0 +1,896 @@
/**
* Ink
*
* A set of tools for quick development of web interfaces.
*
* @package Ink
* @author Sapo Ink Team
* @license http://opensource.org/licenses/MIT MIT
* @link http://ink.sapo.pt
* @version 3.0.5
*/
/**
* Ink class names prefix
* Used in all of Inks components root elements
*/
/**
* Grid class names
*/
/**
* Alerts class names
*/
/**
* Badges class names
*/
/**
* Buttons class names
*/
/**
* Forms class names
*/
/**
* Labels class names
*/
/**
* Navigation class names
*/
/**
* Dropdown class names
*/
/**
* Tables class names
*/
/**
* Images class names
*/
/**
* JS UI components classe names
*/
/**
* Sets the grids maximum width
* @var $grid-max-width (pixels|ems|percentage)
*/
/*!
* Sets the grids breakpoint
*
* To add a new break point you'll need to add an element to the list.
*
* Here's an example: ( class-name-prefix, minimum-width, maximum-width, gutter-width, no-media-query).
*
* media: media type.
* class-name-prefix: this is the prefix used in tons of inks classes i.e.: large-100, small-40, etc.
* minimum-width: (pixels|null) the minimum width for the breakpoint
* maximum-width: (pixels|null) the maximum width for the breakpoint
* gutter-width: (ems) the width for the gutters (space between grid columns) for the breakpoint
* no-media-query: (true|false) if you need to support IE8 set this to true on a single breakpoint.
* Since IE8 does not support the @media statement leaving one of the breakpoints
* outside a @media query let's you use the grid in IE8.
*
*/
.ink-grid {
width: auto;
max-width: 1440px;
margin: 0 auto;
}
.ink-grid {
padding: 0 1.75em;
}
.column-group > [class*=large-] {
float: left;
clear: none;
}
.large-5 {
width: 5%;
}
.large-10 {
width: 10%;
}
.large-15 {
width: 15%;
}
.large-16 {
width: 16.66%;
}
.large-20 {
width: 20%;
}
.large-25 {
width: 25%;
}
.large-30 {
width: 30%;
}
.large-33 {
width: 33.33%;
}
.large-35 {
width: 35%;
}
.large-40 {
width: 40%;
}
.large-45 {
width: 45%;
}
.large-50 {
width: 50%;
}
.large-55 {
width: 55%;
}
.large-60 {
width: 60%;
}
.large-65 {
width: 65%;
}
.large-66 {
width: 66.66%;
}
.large-70 {
width: 70%;
}
.large-75 {
width: 75%;
}
.large-80 {
width: 80%;
}
.large-85 {
width: 85%;
}
.large-90 {
width: 90%;
}
.large-95 {
width: 95%;
}
.large-100 {
width: 100%;
}
[class*=large-100] {
float: none;
clear: both;
}
.column-group {
*zoom: 1;
}
.column-group:after {
content: "";
display: table;
clear: both;
}
.column-group.gutters {
margin-left: -1.75em;
}
.column-group.gutters > [class*=large-], .column-group.gutters > [class*=all-] {
padding-left: 1.75em;
margin-bottom: 1.75em;
}
.column-group.horizontal-gutters {
margin-left: -1.75em;
}
.column-group.horizontal-gutters > [class*=large-], .column-group.horizontal-gutters > [class*=all-] {
padding-left: 1.75em;
}
.column-group.vertical-gutters > [class*=large-], .column-group.vertical-gutters > [class*=all-] {
margin-bottom: 1.75em;
}
.column-group.double-gutters {
margin-left: -3.5em;
}
.column-group.double-gutters > [class*=large-], .column-group.double-gutters > [class*=all-] {
padding-left: 3.5em;
margin-bottom: 3.5em;
}
.column-group.double-horizontal-gutters {
margin-left: -3.5em;
}
.column-group.double-horizontal-gutters > [class*=large-], .column-group.double-horizontal-gutters > [class*=all-] {
padding-left: 3.5em;
}
.column-group.double-vertical-gutters > [class*=large-], .column-group.double-vertical-gutters > [class*=all-] {
margin-bottom: 3.5em;
}
.column-group.half-gutters {
margin-left: -0.875em;
}
.column-group.half-gutters > [class*=large-], .column-group.half-gutters > [class*=all-] {
padding-left: 0.875em;
margin-bottom: 0.875em;
}
.column-group.half-horizontal-gutters {
margin-left: -0.875em;
}
.column-group.half-horizontal-gutters > [class*=large-], .column-group.half-horizontal-gutters > [class*=all-] {
padding-left: 0.875em;
}
.column-group.half-vertical-gutters > [class*=large-], .column-group.half-vertical-gutters > [class*=all-] {
margin-bottom: 0.875em;
}
.column-group.quarter-gutters {
margin-left: -0.4375em;
}
.column-group.quarter-gutters > [class*=large-], .column-group.quarter-gutters > [class*=all-] {
padding-left: 0.4375em;
margin-bottom: 0.4375em;
}
.column-group.quarter-horizontal-gutters {
margin-left: -0.4375em;
}
.column-group.quarter-horizontal-gutters > [class*=large-], .column-group.quarter-horizontal-gutters > [class*=all-] {
padding-left: 0.4375em;
}
.column-group.quarter-vertical-gutters > [class*=large-], .column-group.quarter-vertical-gutters > [class*=all-] {
margin-bottom: 0.4375em;
}
.column-group.large-gutters {
margin-left: -1.75em;
}
.column-group.large-gutters > [class*=large-], .column-group.large-gutters > [class*=all-] {
padding-left: 1.75em;
margin-bottom: 1.75em;
}
.column-group.large-horizontal-gutters {
margin-left: -1.75em;
}
.column-group.large-horizontal-gutters > [class*=large-], .column-group.large-horizontal-gutters > [class*=all-] {
padding-left: 1.75em;
}
.column-group.large-vertical-gutters > [class*=large-], .column-group.large-vertical-gutters > [class*=all-] {
margin-bottom: 1.75em;
}
.column-group.large-double-gutters {
margin-left: -3.5em;
}
.column-group.large-double-gutters > [class*=large-], .column-group.large-double-gutters > [class*=all-] {
padding-left: 3.5em;
margin-bottom: 3.5em;
}
.column-group.large-double-horizontal-gutters {
margin-left: -3.5em;
}
.column-group.large-double-horizontal-gutters > [class*=large-], .column-group.large-double-horizontal-gutters > [class*=all-] {
padding-left: 3.5em;
}
.column-group.large-double-vertical-gutters > [class*=large-], .column-group.large-double-vertical-gutters > [class*=all-] {
margin-bottom: 3.5em;
}
.column-group.large-half-gutters {
margin-left: -0.875em;
}
.column-group.large-half-gutters > [class*=large-], .column-group.large-half-gutters > [class*=all-] {
padding-left: 0.875em;
margin-bottom: 0.875em;
}
.column-group.large-half-horizontal-gutters {
margin-left: -0.875em;
}
.column-group.large-half-horizontal-gutters > [class*=large-], .column-group.large-half-horizontal-gutters > [class*=all-] {
padding-left: 0.875em;
}
.column-group.large-half-vertical-gutters > [class*=large-], .column-group.large-half-vertical-gutters > [class*=all-] {
margin-bottom: 0.875em;
}
.column-group.large-quarter-gutters {
margin-left: -0.4375em;
}
.column-group.large-quarter-gutters > [class*=large-], .column-group.large-quarter-gutters > [class*=all-] {
padding-left: 0.4375em;
margin-bottom: 0.4375em;
}
.column-group.large-quarter-horizontal-gutters {
margin-left: -0.4375em;
}
.column-group.large-quarter-horizontal-gutters > [class*=large-], .column-group.large-quarter-horizontal-gutters > [class*=all-] {
padding-left: 0.4375em;
}
.column-group.large-quarter-vertical-gutters > [class*=large-], .column-group.large-quarter-vertical-gutters > [class*=all-] {
margin-bottom: 0.4375em;
}
.column-group.large-no-gutters {
margin-left: 0;
}
.column-group.large-no-gutters > [class*=large-], .column-group.large-no-gutters > [class*=all-] {
padding-left: 0;
margin-bottom: 0;
}
.ink-table td[class*=large-], .ink-table th[class*=large-], .ink-table tr[class*=large-], .ink-table thead[class*=large-], .ink-table tbody[class*=large-], .ink-table tfoot[class*=large-] {
float: none;
}
.large-push-left {
float: left;
}
.large-push-center {
float: none;
margin-left: auto;
margin-right: auto;
}
.large-push-right {
float: right;
}
.large-align-left {
text-align: left;
}
.large-align-center {
text-align: center;
}
.large-align-right {
text-align: right;
}
.large-no-margin {
margin: 0 !important;
}
.space {
margin: 1.75em;
}
.large-space {
margin: 1.75em;
}
.padding {
padding: 1.75em;
}
.large-padding {
padding: 1.75em;
}
.double-space {
margin: 3.5em;
}
.large-double-space {
margin: 3.5em;
}
.double-padding {
padding: 3.5em;
}
.large-double-padding {
padding: 3.5em;
}
.half-space {
margin: 0.875em;
}
.large-half-space {
margin: 0.875em;
}
.half-padding {
padding: 0.875em;
}
.large-half-padding {
padding: 0.875em;
}
.quarter-space {
margin: 0.4375em;
}
.large-quarter-space {
margin: 0.4375em;
}
.quarter-padding {
padding: 0.4375em;
}
.large-quarter-padding {
padding: 0.4375em;
}
.vertical-space {
margin-top: 1.75em;
margin-bottom: 1.75em;
}
.large-vertical-space {
margin-top: 1.75em;
margin-bottom: 1.75em;
}
.vertical-padding {
padding-top: 1.75em;
padding-bottom: 1.75em;
}
.large-vertical-padding {
padding-top: 1.75em;
padding-bottom: 1.75em;
}
.double-vertical-space {
margin-top: 3.5em;
margin-bottom: 3.5em;
}
.large-double-vertical-space {
margin-top: 3.5em;
margin-bottom: 3.5em;
}
.double-vertical-padding {
padding-top: 3.5em;
padding-bottom: 3.5em;
}
.large-double-vertical-padding {
padding-top: 3.5em;
padding-bottom: 3.5em;
}
.half-vertical-space {
margin-top: 0.875em;
margin-bottom: 0.875em;
}
.large-half-vertical-space {
margin-top: 0.875em;
margin-bottom: 0.875em;
}
.half-vertical-padding {
padding-top: 0.875em;
padding-bottom: 0.875em;
}
.large-half-vertical-padding {
padding-top: 0.875em;
padding-bottom: 0.875em;
}
.quarter-vertical-space {
margin-top: 0.4375em;
margin-bottom: 0.4375em;
}
.large-quarter-vertical-space {
margin-top: 0.4375em;
margin-bottom: 0.4375em;
}
.quarter-vertical-padding {
padding-top: 0.4375em;
padding-bottom: 0.4375em;
}
.large-quarter-vertical-padding {
padding-top: 0.4375em;
padding-bottom: 0.4375em;
}
.horizontal-space {
margin-left: 1.75em;
margin-right: 1.75em;
}
.large-horizontal-space {
margin-left: 1.75em;
margin-right: 1.75em;
}
.horizontal-padding {
padding-left: 1.75em;
padding-right: 1.75em;
}
.large-horizontal-padding {
padding-left: 1.75em;
padding-right: 1.75em;
}
.double-horizontal-space {
margin-left: 3.5em;
margin-right: 3.5em;
}
.large-double-horizontal-space {
margin-left: 3.5em;
margin-right: 3.5em;
}
.double-horizontal-padding {
padding-left: 3.5em;
padding-right: 3.5em;
}
.large-double-horizontal-padding {
padding-left: 3.5em;
padding-right: 3.5em;
}
.half-horizontal-space {
margin-left: 0.875em;
margin-right: 0.875em;
}
.large-half-horizontal-space {
margin-left: 0.875em;
margin-right: 0.875em;
}
.half-horizontal-padding {
padding-left: 0.875em;
padding-right: 0.875em;
}
.large-half-horizontal-padding {
padding-left: 0.875em;
padding-right: 0.875em;
}
.quarter-horizontal-space {
margin-left: 0.4375em;
margin-right: 0.4375em;
}
.large-quarter-horizontal-space {
margin-left: 0.4375em;
margin-right: 0.4375em;
}
.quarter-horizontal-padding {
padding-left: 0.4375em;
padding-right: 0.4375em;
}
.large-quarter-horizontal-padding {
padding-left: 0.4375em;
padding-right: 0.4375em;
}
.top-space {
margin-top: 1.75em;
}
.large-top-space {
margin-top: 1.75em;
}
.top-padding {
padding-top: 1.75em;
}
.large-top-padding {
padding-top: 1.75em;
}
.double-top-space {
margin-top: 3.5em;
}
.large-double-top-space {
margin-top: 3.5em;
}
.double-top-padding {
padding-top: 3.5em;
}
.large-double-top-padding {
padding-top: 3.5em;
}
.half-top-space {
margin-top: 0.875em;
}
.large-half-top-space {
margin-top: 0.875em;
}
.half-top-padding {
padding-top: 0.875em;
}
.large-half-top-padding {
padding-top: 0.875em;
}
.quarter-top-space {
margin-top: 0.4375em;
}
.large-quarter-top-space {
margin-top: 0.4375em;
}
.quarter-top-padding {
padding-top: 0.4375em;
}
.large-quarter-top-padding {
padding-top: 0.4375em;
}
.right-space {
margin-right: 1.75em;
}
.large-right-space {
margin-right: 1.75em;
}
.right-padding {
padding-right: 1.75em;
}
.large-right-padding {
padding-right: 1.75em;
}
.double-right-space {
margin-right: 3.5em;
}
.large-double-right-space {
margin-right: 3.5em;
}
.double-right-padding {
padding-right: 3.5em;
}
.large-double-right-padding {
padding-right: 3.5em;
}
.half-right-space {
margin-right: 0.875em;
}
.large-half-right-space {
margin-right: 0.875em;
}
.half-right-padding {
padding-right: 0.875em;
}
.large-half-right-padding {
padding-right: 0.875em;
}
.quarter-right-space {
margin-right: 0.4375em;
}
.large-quarter-right-space {
margin-right: 0.4375em;
}
.quarter-right-padding {
padding-right: 0.4375em;
}
.large-quarter-right-padding {
padding-right: 0.4375em;
}
.bottom-space {
margin-bottom: 1.75em;
}
.large-bottom-space {
margin-bottom: 1.75em;
}
.bottom-padding {
padding-bottom: 1.75em;
}
.large-bottom-padding {
padding-bottom: 1.75em;
}
.double-bottom-space {
margin-bottom: 3.5em;
}
.large-double-bottom-space {
margin-bottom: 3.5em;
}
.double-bottom-padding {
padding-bottom: 3.5em;
}
.large-double-bottom-padding {
padding-bottom: 3.5em;
}
.half-bottom-space {
margin-bottom: 0.875em;
}
.large-half-bottom-space {
margin-bottom: 0.875em;
}
.half-bottom-padding {
padding-bottom: 0.875em;
}
.large-half-bottom-padding {
padding-bottom: 0.875em;
}
.quarter-bottom-space {
margin-bottom: 0.4375em;
}
.large-quarter-bottom-space {
margin-bottom: 0.4375em;
}
.quarter-bottom-padding {
padding-bottom: 0.4375em;
}
.large-quarter-bottom-padding {
padding-bottom: 0.4375em;
}
.left-space {
margin-left: 1.75em;
}
.large-left-space {
margin-left: 1.75em;
}
.left-padding {
padding-left: 1.75em;
}
.large-left-padding {
padding-left: 1.75em;
}
.double-left-space {
margin-left: 3.5em;
}
.large-double-left-space {
margin-left: 3.5em;
}
.double-left-padding {
padding-left: 3.5em;
}
.large-double-left-padding {
padding-left: 3.5em;
}
.half-left-space {
margin-left: 0.875em;
}
.large-half-left-space {
margin-left: 0.875em;
}
.half-left-padding {
padding-left: 0.875em;
}
.large-half-left-padding {
padding-left: 0.875em;
}
.quarter-left-space {
margin-left: 0.4375em;
}
.large-quarter-left-space {
margin-left: 0.4375em;
}
.quarter-left-padding {
padding-left: 0.4375em;
}
.large-quarter-left-padding {
padding-left: 0.4375em;
}
.hide-large {
display: none !important;
}
.show-large {
display: inherit !important;
}
table.show-large {
display: table;
}
thead.show-large {
display: table-header-group;
}
tbody.show-large {
display: table-row-group;
}
tfoot.show-large {
display: table-footer-group;
}
tr.show-large {
display: table-row;
}
th.show-large,
td.show-large {
display: table-cell;
}

1
public/css/ink-ie.min.css vendored Normal file

File diff suppressed because one or more lines are too long

4685
public/css/ink-legacy.css Normal file

File diff suppressed because it is too large Load Diff

1
public/css/ink-legacy.min.css vendored Normal file

File diff suppressed because one or more lines are too long

8518
public/css/ink.css Normal file

File diff suppressed because it is too large Load Diff

1
public/css/ink.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,52 @@
/**
* Ink
*
* A set of tools for quick development of web interfaces.
*
* @package Ink
* @author Sapo Ink Team
* @license http://opensource.org/licenses/MIT MIT
* @link http://ink.sapo.pt
* @version 3.0.5
*/
/**
* Sets the grids maximum width
* @var $grid-max-width (pixels|ems|percentage)
*/
/*!
* Sets the grids breakpoint
*
* To add a new break point you'll need to add an element to the list.
*
* Here's an example: ( class-name-prefix, minimum-width, maximum-width, gutter-width, no-media-query).
*
* media: media type.
* class-name-prefix: this is the prefix used in tons of inks classes i.e.: large-100, small-40, etc.
* minimum-width: (pixels|null) the minimum width for the breakpoint
* maximum-width: (pixels|null) the maximum width for the breakpoint
* gutter-width: (ems) the width for the gutters (space between grid columns) for the breakpoint
* no-media-query: (true|false) if you need to support IE8 set this to true on a single breakpoint.
* Since IE8 does not support the @media statement leaving one of the breakpoints
* outside a @media query let's you use the grid in IE8.
*
*/
/* for xlarge screens */
@media screen and (min-width: 1261px) {
/* your css for xlarge screens goes here ... */
}
/* for large screens */
@media screen and (min-width: 961px) and (max-width: 1260px) {
/* your css for large screens goes here ... */
}
/* for medium screens */
@media screen and (min-width: 641px) and (max-width: 960px) {
/* your css for medium screens goes here ... */
}
/* for small screens */
@media screen and (min-width: 321px) and (max-width: 640px) {
/* your css for small screens goes here ... */
}
/* for tiny screens */
@media screen and (max-width: 320px) {
/* your css for tiny screens goes here ... */
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/img/SAPOlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
public/img/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

BIN
public/img/home_bkg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

BIN
public/img/home_logo_IE.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
public/img/icon_Sprite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
public/img/ink-favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
public/img/logo_home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

154
public/js/autoload.js Normal file
View File

@ -0,0 +1,154 @@
/**
* @module Ink.Autoload
* @version 1
* Create Ink UI components easily
*/
Ink.createModule('Ink.Autoload', 1, ['Ink.Dom.Selector_1', 'Ink.Util.Array_1', 'Ink.Dom.Loaded_1', 'Ink.UI.SmoothScroller_1', 'Ink.UI.Close_1'], function( Selector, InkArray, Loaded, Scroller, Close ){
'use strict';
/**
* @namespace Ink.Autoload
* @static
*/
var el = document.createElement('div');
// See if a selector is valid.
function validSelector(sel) {
try {
Selector.select(sel, el);
} catch(e) {
Ink.error(e);
return false;
}
return true;
}
var Autoload = {
/**
* Matches module names to default selectors.
*
* @property selectors {Object}
* @public
**/
selectors: {
/* Match module names to element classes (or more complex selectors)
* which get the UI modules instantiated automatically. */
'Animate_1' : '.ink-animate',
'Carousel_1' : '.ink-carousel',
'DatePicker_1' : '.ink-datepicker',
'Dropdown_1' : '.ink-dropdown',
'Gallery_1' : 'ul.ink-gallery-source',
'Modal_1' : '.ink-modal',
'ProgressBar_1' : '.ink-progress-bar',
'SortableList_1': '.ink-sortable-list',
'Spy_1' : '[data-spy="true"]',
'Stacker_1' : '.ink-stacker',
'Sticky_1' : '.ink-sticky, .sticky',
'Table_1' : '.ink-table',
'Tabs_1' : '.ink-tabs',
'Toggle_1' : '.ink-toggle, .toggle',
'Tooltip_1' : '.ink-tooltip, .tooltip',
'TreeView_1' : '.ink-tree-view'
},
defaultOptions: {},
/**
* Run Autoload on a specific element.
*
* Useful when you load something from AJAX and want it to have automatically loaded Ink modules.
* @method run
* @param {DOMElement} parentEl
* @param {Object} [options] Options object, containing:
* @param {Boolean} [options.forceAutoload] Autoload things on elements even if they have `data-autoload="false"`
* @param {Boolean} [options.createClose] Whether to create the Ink.UI.Close component. Defaults to `true`.
* @param {Boolean} [options.createSmoothScroller] Whether to create the Scroller component. Defaults to `true`.
* @param {Object} [options.selectors=Ink.Autoload.selectors] A hash mapping module names to selectors that match elements to load these modules. For example, `{ 'Modal_1': '.my-specific-modal' }`.
* @param {Boolean} [options.waitForDOMLoaded=false] Do nothing until the DOM is loaded. Uses Ink.Dom.Loaded.run();
* @public
* @sample Autoload_1.html
**/
run: function (parentEl, options){
options = Ink.extendObj({
// The below lines are not required because undefined is falsy anyway..
// forceAutoload: false,
// waitForDOMLoaded: false,
// createClose: false,
// createSmoothScroller: false,
selectors: Autoload.selectors
}, options || {});
for(var mod in options.selectors) if (options.selectors.hasOwnProperty(mod)) {
// `elements` need to be in a closure because requireModules is async.
findElements(mod);
}
if (options.createClose !== false) {
new Close();
}
if (options.createSmoothScroller !== false) {
Scroller.init();
}
function findElements(mod) {
var modName = 'Ink.UI.' + mod;
var elements = Selector.select( options.selectors[mod], parentEl );
elements = InkArray.filter(elements, autoloadElement);
if( elements.length ){
Ink.requireModules( [modName], function( Component ) {
InkArray.forEach(elements, function (el) {
new Component(el, Autoload.defaultOptions[modName]);
});
});
}
}
function autoloadElement(element) {
if (options.forceAutoload === true) { return true; }
if (typeof element.getAttribute === 'function') {
return element.getAttribute('data-autoload') !== 'false';
}
}
},
/**
* Add a new entry to be autoloaded.
* @method add
* @param moduleName {String}
* @param selector {String}
*/
add: function (moduleName, selector) {
if (!validSelector(selector)) { return false; }
if (Autoload.selectors[moduleName]) {
Autoload.selectors[moduleName] += ', ' + selector;
} else {
Autoload.selectors[moduleName] = selector;
}
},
/**
* Removes a module from autoload, making it not be automatically loaded.
* @method remove
* @param moduleName {String}
**/
remove: function (moduleName) {
delete Autoload.selectors[moduleName];
}
};
for (var k in Autoload.selectors) if (Autoload.selectors.hasOwnProperty(k)) {
Autoload.defaultOptions[k] = {};
}
if (!window.INK_NO_AUTO_LOAD) {
Loaded.run(function () {
Autoload.run(document, {
createSmoothScroller: true,
createClose: true
});
Autoload.firstRunDone = true;
});
}
return Autoload;
});

440
public/js/holder.js Normal file
View File

@ -0,0 +1,440 @@
/*
Holder - 1.9 - client side image placeholders
(c) 2012-2013 Ivan Malopinsky / http://imsky.co
Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
Commercial use requires attribution.
*/
var Holder = Holder || {};
(function (app, win) {
var preempted = false,
fallback = false,
canvas = document.createElement('canvas');
//getElementsByClassName polyfill
document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i<n.length;i++)r.test(n[i].className)&&s.push(n[i])}return s})
//getComputedStyle polyfill
window.getComputedStyle||(window.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this})
//http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}};
//https://gist.github.com/991057 by Jed Schmidt with modifications
function selector(a){
a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
var ret=[]; b!=null&&(b.length?ret=b:b.length==0?ret=b:ret=[b]); return ret;
}
//shallow object property extend
function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}
//hasOwnProperty polyfill
if (!Object.prototype.hasOwnProperty)
Object.prototype.hasOwnProperty = function(prop) {
var proto = this.__proto__ || this.constructor.prototype;
return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
}
function text_size(width, height, template) {
var dimension_arr = [height, width].sort();
var maxFactor = Math.round(dimension_arr[1] / 16),
minFactor = Math.round(dimension_arr[0] / 16);
var text_height = Math.max(template.size, maxFactor);
return {
height: text_height
}
}
function draw(ctx, dimensions, template, ratio) {
var ts = text_size(dimensions.width, dimensions.height, template);
var text_height = ts.height;
var width = dimensions.width * ratio,
height = dimensions.height * ratio;
var font = template.font ? template.font : "sans-serif";
canvas.width = width;
canvas.height = height;
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillStyle = template.background;
ctx.fillRect(0, 0, width, height);
ctx.fillStyle = template.foreground;
ctx.font = "bold " + text_height + "px " + font;
var text = template.text ? template.text : (dimensions.width + "x" + dimensions.height);
if (ctx.measureText(text).width / width > 1) {
text_height = template.size / (ctx.measureText(text).width / width);
}
//Resetting font size if necessary
ctx.font = "bold " + (text_height * ratio) + "px " + font;
ctx.fillText(text, (width / 2), (height / 2), width);
return canvas.toDataURL("image/png");
}
function render(mode, el, holder, src) {
var dimensions = holder.dimensions,
theme = holder.theme,
text = holder.text ? decodeURIComponent(holder.text) : holder.text;
var dimensions_caption = dimensions.width + "x" + dimensions.height;
theme = (text ? extend(theme, {
text: text
}) : theme);
theme = (holder.font ? extend(theme, {
font: holder.font
}) : theme);
if (mode == "image") {
el.setAttribute("data-src", src);
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
if (fallback || !holder.auto) {
el.style.width = dimensions.width + "px";
el.style.height = dimensions.height + "px";
}
if (fallback) {
el.style.backgroundColor = theme.background;
} else {
el.setAttribute("src", draw(ctx, dimensions, theme, ratio));
}
} else {
if (!fallback) {
el.style.backgroundImage = "url(" + draw(ctx, dimensions, theme, ratio) + ")";
el.style.backgroundSize = dimensions.width + "px " + dimensions.height + "px";
}
}
};
function fluid(el, holder, src) {
var dimensions = holder.dimensions,
theme = holder.theme,
text = holder.text;
var dimensions_caption = dimensions.width + "x" + dimensions.height;
theme = (text ? extend(theme, {
text: text
}) : theme);
var fluid = document.createElement("div");
if (el.fluidRef) {
fluid = el.fluidRef;
}
fluid.style.backgroundColor = theme.background;
fluid.style.color = theme.foreground;
fluid.className = el.className + " holderjs-fluid";
fluid.style.width = holder.dimensions.width + (holder.dimensions.width.indexOf("%") > 0 ? "" : "px");
fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%") > 0 ? "" : "px");
fluid.id = el.id;
el.style.width = 0;
el.style.height = 0;
if (!el.fluidRef) {
if (theme.text) {
fluid.appendChild(document.createTextNode(theme.text))
} else {
fluid.appendChild(document.createTextNode(dimensions_caption))
fluid_images.push(fluid);
setTimeout(fluid_update, 0);
}
}
el.fluidRef = fluid;
el.parentNode.insertBefore(fluid, el.nextSibling)
if (window.jQuery) {
jQuery(function ($) {
$(el).on("load", function () {
el.style.width = fluid.style.width;
el.style.height = fluid.style.height;
$(el).show();
$(fluid).remove();
});
})
}
}
function fluid_update() {
for (i in fluid_images) {
if (!fluid_images.hasOwnProperty(i)) continue;
var el = fluid_images[i],
label = el.firstChild;
el.style.lineHeight = el.offsetHeight + "px";
label.data = el.offsetWidth + "x" + el.offsetHeight;
}
}
function parse_flags(flags, options) {
var ret = {
theme: settings.themes.gray
}, render = false;
for (sl = flags.length, j = 0; j < sl; j++) {
var flag = flags[j];
if (app.flags.dimensions.match(flag)) {
render = true;
ret.dimensions = app.flags.dimensions.output(flag);
} else if (app.flags.fluid.match(flag)) {
render = true;
ret.dimensions = app.flags.fluid.output(flag);
ret.fluid = true;
} else if (app.flags.colors.match(flag)) {
ret.theme = app.flags.colors.output(flag);
} else if (options.themes[flag]) {
//If a theme is specified, it will override custom colors
ret.theme = options.themes[flag];
} else if (app.flags.text.match(flag)) {
ret.text = app.flags.text.output(flag);
} else if (app.flags.font.match(flag)) {
ret.font = app.flags.font.output(flag);
} else if (app.flags.auto.match(flag)) {
ret.auto = true;
}
}
return render ? ret : false;
};
if (!canvas.getContext) {
fallback = true;
} else {
if (canvas.toDataURL("image/png")
.indexOf("data:image/png") < 0) {
//Android doesn't support data URI
fallback = true;
} else {
var ctx = canvas.getContext("2d");
}
}
var dpr = 1, bsr = 1;
if(!fallback){
dpr = window.devicePixelRatio || 1,
bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
}
var ratio = dpr / bsr;
var fluid_images = [];
var settings = {
domain: "holder.js",
images: "img",
bgnodes: ".holderjs",
themes: {
"gray": {
background: "#eee",
foreground: "#aaa",
size: 12
},
"social": {
background: "#3a5a97",
foreground: "#fff",
size: 12
},
"industrial": {
background: "#434A52",
foreground: "#C2F200",
size: 12
},
"ink": {
background: "#222",
foreground: "#fff",
size: 18
}
},
stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}"
};
app.flags = {
dimensions: {
regex: /^(\d+)x(\d+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
width: +exec[1],
height: +exec[2]
}
}
},
fluid: {
regex: /^([0-9%]+)x([0-9%]+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
width: exec[1],
height: exec[2]
}
}
},
colors: {
regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
output: function (val) {
var exec = this.regex.exec(val);
return {
size: settings.themes.gray.size,
foreground: "#" + exec[2],
background: "#" + exec[1]
}
}
},
text: {
regex: /text\:(.*)/,
output: function (val) {
return this.regex.exec(val)[1];
}
},
font: {
regex: /font\:(.*)/,
output: function (val) {
return this.regex.exec(val)[1];
}
},
auto: {
regex: /^auto$/
}
}
for (var flag in app.flags) {
if (!app.flags.hasOwnProperty(flag)) continue;
app.flags[flag].match = function (val) {
return val.match(this.regex)
}
}
app.add_theme = function (name, theme) {
name != null && theme != null && (settings.themes[name] = theme);
return app;
};
app.add_image = function (src, el) {
var node = selector(el);
if (node.length) {
for (var i = 0, l = node.length; i < l; i++) {
var img = document.createElement("img")
img.setAttribute("data-src", src);
node[i].appendChild(img);
}
}
return app;
};
app.run = function (o) {
var options = extend(settings, o),
images = [], imageNodes = [], bgnodes = [];
if(typeof(options.images) == "string"){
imageNodes = selector(options.images);
}
else if (window.NodeList && options.images instanceof window.NodeList) {
imageNodes = options.images;
} else if (window.Node && options.images instanceof window.Node) {
imageNodes = [options.images];
}
if(typeof(options.bgnodes) == "string"){
bgnodes = selector(options.bgnodes);
} else if (window.NodeList && options.elements instanceof window.NodeList) {
bgnodes = options.bgnodes;
} else if (window.Node && options.bgnodes instanceof window.Node) {
bgnodes = [options.bgnodes];
}
preempted = true;
for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
var holdercss = document.getElementById("holderjs-style");
if (!holdercss) {
holdercss = document.createElement("style");
holdercss.setAttribute("id", "holderjs-style");
holdercss.type = "text/css";
document.getElementsByTagName("head")[0].appendChild(holdercss);
}
if (!options.nocss) {
if (holdercss.styleSheet) {
holdercss.styleSheet.cssText += options.stylesheet;
} else {
holdercss.appendChild(document.createTextNode(options.stylesheet));
}
}
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
for (var l = bgnodes.length, i = 0; i < l; i++) {
var src = window.getComputedStyle(bgnodes[i], null)
.getPropertyValue("background-image");
var flags = src.match(cssregex);
if (flags) {
var holder = parse_flags(flags[1].split("/"), options);
if (holder) {
render("background", bgnodes[i], holder, src);
}
}
}
for (l = images.length, i = 0; i < l; i++) {
var attr_src = attr_data_src = src = null;
try{
attr_src = images[i].getAttribute("src");
attr_datasrc = images[i].getAttribute("data-src");
}catch(e){}
if (attr_datasrc == null && !! attr_src && attr_src.indexOf(options.domain) >= 0) {
src = attr_src;
} else if ( !! attr_datasrc && attr_datasrc.indexOf(options.domain) >= 0) {
src = attr_datasrc;
}
if (src) {
var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1)
.split("/"), options);
if (holder) {
if (holder.fluid) {
fluid(images[i], holder, src);
} else {
render("image", images[i], holder, src);
}
}
}
}
return app;
};
contentLoaded(win, function () {
if (window.addEventListener) {
window.addEventListener("resize", fluid_update, false);
window.addEventListener("orientationchange", fluid_update, false);
} else {
window.attachEvent("onresize", fluid_update)
}
preempted || app.run();
});
if (typeof define === "function" && define.amd) {
define("Holder", [], function () {
return app;
});
}
})(Holder, window);

View File

@ -0,0 +1,11 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(j,f){function s(a,b){var c=a.createElement("p"),m=a.getElementsByTagName("head")[0]||a.documentElement;c.innerHTML="x<style>"+b+"</style>";return m.insertBefore(c.lastChild,m.firstChild)}function o(){var a=d.elements;return"string"==typeof a?a.split(" "):a}function n(a){var b=t[a[u]];b||(b={},p++,a[u]=p,t[p]=b);return b}function v(a,b,c){b||(b=f);if(e)return b.createElement(a);c||(c=n(b));b=c.cache[a]?c.cache[a].cloneNode():y.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);
return b.canHaveChildren&&!z.test(a)?c.frag.appendChild(b):b}function A(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!d.shivMethods?b.createElem(c):v(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+o().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(d,b.frag)}
function w(a){a||(a=f);var b=n(a);if(d.shivCSS&&!q&&!b.hasCSS)b.hasCSS=!!s(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}");e||A(a,b);return a}function B(a){for(var b,c=a.attributes,m=c.length,f=a.ownerDocument.createElement(l+":"+a.nodeName);m--;)b=c[m],b.specified&&f.setAttribute(b.nodeName,b.nodeValue);f.style.cssText=a.style.cssText;return f}function x(a){function b(){clearTimeout(d._removeSheetTimer);
c&&c.removeNode(!0);c=null}var c,f,d=n(a),e=a.namespaces,j=a.parentWindow;if(!C||a.printShived)return a;"undefined"==typeof e[l]&&e.add(l);j.attachEvent("onbeforeprint",function(){b();var g,i,d;d=a.styleSheets;for(var e=[],h=d.length,k=Array(h);h--;)k[h]=d[h];for(;d=k.pop();)if(!d.disabled&&D.test(d.media)){try{g=d.imports,i=g.length}catch(j){i=0}for(h=0;h<i;h++)k.push(g[h]);try{e.push(d.cssText)}catch(n){}}g=e.reverse().join("").split("{");i=g.length;h=RegExp("(^|[\\s,>+~])("+o().join("|")+")(?=[[\\s,>+~#.:]|$)",
"gi");for(k="$1"+l+"\\:$2";i--;)e=g[i]=g[i].split("}"),e[e.length-1]=e[e.length-1].replace(h,k),g[i]=e.join("}");e=g.join("{");i=a.getElementsByTagName("*");h=i.length;k=RegExp("^(?:"+o().join("|")+")$","i");for(d=[];h--;)g=i[h],k.test(g.nodeName)&&d.push(g.applyElement(B(g)));f=d;c=s(a,e)});j.attachEvent("onafterprint",function(){for(var a=f,c=a.length;c--;)a[c].removeNode();clearTimeout(d._removeSheetTimer);d._removeSheetTimer=setTimeout(b,500)});a.printShived=!0;return a}var r=j.html5||{},z=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
y=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q,u="_html5shiv",p=0,t={},e;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";q="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}e=b}catch(d){e=q=!0}})();var d={elements:r.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",
version:"3.7.0",shivCSS:!1!==r.shivCSS,supportsUnknownElements:e,shivMethods:!1!==r.shivMethods,type:"default",shivDocument:w,createElement:v,createDocumentFragment:function(a,b){a||(a=f);if(e)return a.createDocumentFragment();for(var b=b||n(a),c=b.frag.cloneNode(),d=0,j=o(),l=j.length;d<l;d++)c.createElement(j[d]);return c}};j.html5=d;w(f);var D=/^$|\b(?:all|print)\b/,l="html5shiv",C=!e&&function(){var a=f.documentElement;return!("undefined"==typeof f.namespaces||"undefined"==typeof f.parentWindow||
"undefined"==typeof a.applyElement||"undefined"==typeof a.removeNode||"undefined"==typeof j.attachEvent)}();d.type+=" print";d.shivPrint=x;x(f)})(this,document);

8
public/js/html5shiv.js vendored Normal file
View File

@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);

Some files were not shown because too many files have changed in this diff Show More