ZURB-foundation 2.1.5.2 → 2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.mkdn +35 -3
- data/lib/ZURB-foundation.rb +2 -2
- data/stylesheets/zurb/_buttons.sass +91 -59
- data/stylesheets/zurb/_forms.sass +62 -30
- data/stylesheets/zurb/_globals.sass +23 -35
- data/stylesheets/zurb/_grid.sass +18 -3
- data/stylesheets/zurb/_mobile.sass +66 -48
- data/stylesheets/zurb/_orbit.sass +16 -33
- data/stylesheets/zurb/_reveal.sass +20 -15
- data/stylesheets/zurb/_typography.sass +7 -13
- data/stylesheets/zurb/_ui.sass +149 -113
- data/stylesheets/zurb/shared/_colors.sass +1 -1
- data/stylesheets/zurb/shared/_mixins.sass +4 -4
- data/templates/project/MIT-LICENSE.txt +1 -1
- data/templates/project/humans.txt +1 -1
- data/templates/project/index.html +35 -23
- data/templates/project/javascripts/app.js +20 -2
- data/templates/project/javascripts/jquery.customforms.js +18 -4
- data/templates/project/javascripts/jquery.orbit-1.4.0.js +9 -3
- data/templates/project/javascripts/jquery.reveal.js +63 -37
- data/templates/project/javascripts/jquery.tooltips.js +126 -76
- data/templates/project/javascripts/modernizr.foundation.js +3 -3
- data/templates/project/manifest.rb +1 -1
- data/templates/project/sass/_settings.sass +15 -12
- data/templates/project/sass/app.sass +14 -7
- data/templates/project/sass/foundation.sass +17 -0
- data/templates/project/sass/ie.sass +15 -1
- metadata +5 -5
- data/templates/project/javascripts/forms.jquery.js +0 -58
@@ -1,17 +1,17 @@
|
|
1
1
|
// Compass imports
|
2
|
-
|
2
|
+
//------------------------------------------------
|
3
3
|
|
4
4
|
@import compass/css3
|
5
5
|
@import compass/utilities
|
6
6
|
|
7
7
|
// Font stack
|
8
|
-
|
8
|
+
//------------------------------------------------
|
9
9
|
|
10
10
|
@mixin HelveticaFontStack
|
11
11
|
font-family: $helvetica-font-stack
|
12
12
|
|
13
13
|
// Font size mixin to include px and rem
|
14
|
-
|
14
|
+
//------------------------------------------------
|
15
15
|
|
16
16
|
@mixin font-size($size, $is-important: false)
|
17
17
|
@if $is-important
|
@@ -22,7 +22,7 @@
|
|
22
22
|
font-size: ($size / 10) + rem
|
23
23
|
|
24
24
|
// WebKit font-smoothing
|
25
|
-
|
25
|
+
//------------------------------------------------
|
26
26
|
|
27
27
|
// References:
|
28
28
|
//
|
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
19
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -14,6 +14,7 @@
|
|
14
14
|
<title>Welcome to Foundation</title>
|
15
15
|
|
16
16
|
<!-- Included CSS Files -->
|
17
|
+
<link rel="stylesheet" href="stylesheets/foundation.css">
|
17
18
|
<link rel="stylesheet" href="stylesheets/app.css">
|
18
19
|
|
19
20
|
<!--[if lt IE 9]>
|
@@ -31,20 +32,19 @@
|
|
31
32
|
|
32
33
|
<!-- container -->
|
33
34
|
<div class="container">
|
34
|
-
|
35
|
+
|
35
36
|
<div class="row">
|
36
37
|
<div class="twelve columns">
|
37
38
|
<h2>Welcome to Foundation</h2>
|
38
|
-
<p>This is version 2.
|
39
|
-
|
39
|
+
<p>This is version 2.2 released on February 21, 2012</p>
|
40
40
|
<hr />
|
41
41
|
</div>
|
42
42
|
</div>
|
43
|
-
|
43
|
+
|
44
44
|
<div class="row">
|
45
45
|
<div class="eight columns">
|
46
46
|
<h3>The Grid</h3>
|
47
|
-
|
47
|
+
|
48
48
|
<!-- Grid Example -->
|
49
49
|
<div class="row">
|
50
50
|
<div class="twelve columns">
|
@@ -82,36 +82,48 @@
|
|
82
82
|
</div>
|
83
83
|
</div>
|
84
84
|
</div>
|
85
|
-
|
85
|
+
|
86
86
|
<h3>Tabs</h3>
|
87
87
|
<dl class="tabs">
|
88
88
|
<dd><a href="#simple1" class="active">Simple Tab 1</a></dd>
|
89
89
|
<dd><a href="#simple2">Simple Tab 2</a></dd>
|
90
90
|
<dd><a href="#simple3">Simple Tab 3</a></dd>
|
91
91
|
</dl>
|
92
|
-
|
92
|
+
|
93
93
|
<ul class="tabs-content">
|
94
94
|
<li class="active" id="simple1Tab">This is simple tab 1's content. Pretty neat, huh?</li>
|
95
95
|
<li id="simple2Tab">This is simple tab 2's content. Now you see it!</li>
|
96
96
|
<li id="simple3Tab">This is simple tab 3's content. It's, you know...okay.</li>
|
97
97
|
</ul>
|
98
|
-
|
98
|
+
|
99
99
|
<h3>Buttons</h3>
|
100
100
|
|
101
|
-
<
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
101
|
+
<div class="row">
|
102
|
+
<div class="six columns">
|
103
|
+
<p><a href="#" class="small blue button">Small Blue Button</a></p>
|
104
|
+
<p><a href="#" class="blue button">Medium Blue Button</a></p>
|
105
|
+
<p><a href="#" class="large blue button">Large Blue Button</a></p>
|
106
|
+
|
107
|
+
<p><a href="#" class="nice radius small blue button">Nice Blue Button</a></p>
|
108
|
+
<p><a href="#" class="nice radius blue button">Nice Blue Button</a></p>
|
109
|
+
<p><a href="#" class="nice radius large blue button">Nice Blue Button</a></p>
|
110
|
+
</div>
|
111
|
+
<div class="six columns">
|
112
|
+
<p><a href="#" class="small red button">Small Red Button</a></p>
|
113
|
+
<p><a href="#" class="green button">Medium Green Button</a></p>
|
114
|
+
<p><a href="#" class="large white button">Large White Button</a></p>
|
115
|
+
|
116
|
+
<p><a href="#" class="nice radius small red button">Nice Red Button</a></p>
|
117
|
+
<p><a href="#" class="nice radius green button">Nice Green Button</a></p>
|
118
|
+
<p><a href="#" class="nice radius large white button">Nice White Button</a></p>
|
119
|
+
</div>
|
120
|
+
</div>
|
109
121
|
</div>
|
110
122
|
|
111
|
-
<div class="four columns">
|
123
|
+
<div class="four columns">
|
112
124
|
<h4>Getting Started</h4>
|
113
125
|
<p>We're stoked you want to try Foundation! To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.</p>
|
114
|
-
|
126
|
+
|
115
127
|
<h4>Other Resources</h4>
|
116
128
|
<p>Once you've exhausted the fun in this document, you should check out:</p>
|
117
129
|
<ul class="disc">
|
@@ -121,11 +133,11 @@
|
|
121
133
|
</ul>
|
122
134
|
</div>
|
123
135
|
</div>
|
124
|
-
|
136
|
+
|
125
137
|
</div>
|
126
138
|
<!-- container -->
|
127
|
-
|
128
|
-
|
139
|
+
|
140
|
+
|
129
141
|
|
130
142
|
|
131
143
|
<!-- Included JS Files -->
|
@@ -133,11 +145,11 @@
|
|
133
145
|
<script src="javascripts/modernizr.foundation.js"></script>
|
134
146
|
<script src="javascripts/jquery.reveal.js"></script>
|
135
147
|
<script src="javascripts/jquery.orbit-1.4.0.js"></script>
|
136
|
-
<script src="javascripts/forms.jquery.js"></script>
|
137
148
|
<script src="javascripts/jquery.customforms.js"></script>
|
138
149
|
<script src="javascripts/jquery.placeholder.min.js"></script>
|
139
150
|
<script src="javascripts/jquery.tooltips.js"></script>
|
140
151
|
<script src="javascripts/app.js"></script>
|
141
|
-
|
152
|
+
|
142
153
|
</body>
|
154
|
+
</html>
|
143
155
|
</html>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
jQuery(document).ready(function ($) {
|
2
2
|
|
3
3
|
/* Use this js doc for all application specific JS */
|
4
4
|
|
@@ -15,7 +15,7 @@ $(document).ready(function () {
|
|
15
15
|
|
16
16
|
//Show Tab Content
|
17
17
|
$(contentLocation).closest('.tabs-content').children('li').hide();
|
18
|
-
$(contentLocation).
|
18
|
+
$(contentLocation).css('display', 'block');
|
19
19
|
}
|
20
20
|
|
21
21
|
$('dl.tabs').each(function () {
|
@@ -44,6 +44,9 @@ $(document).ready(function () {
|
|
44
44
|
|
45
45
|
$('input, textarea').placeholder();
|
46
46
|
|
47
|
+
/* TOOLTIPS ------------ */
|
48
|
+
$(this).tooltips();
|
49
|
+
|
47
50
|
|
48
51
|
|
49
52
|
/* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */
|
@@ -68,9 +71,24 @@ $(document).ready(function () {
|
|
68
71
|
}
|
69
72
|
lockNavBar = true;
|
70
73
|
});
|
74
|
+
if (Modernizr.touch) {
|
75
|
+
$('.nav-bar>li.has-flyout>a.main').css({
|
76
|
+
'padding-right' : '75px'
|
77
|
+
});
|
78
|
+
$('.nav-bar>li.has-flyout>a.flyout-toggle').css({
|
79
|
+
'border-left' : '1px dashed #eee'
|
80
|
+
});
|
81
|
+
} else {
|
82
|
+
$('.nav-bar>li.has-flyout').hover(function() {
|
83
|
+
$(this).children('.flyout').show();
|
84
|
+
}, function() {
|
85
|
+
$(this).children('.flyout').hide();
|
86
|
+
})
|
87
|
+
}
|
71
88
|
|
72
89
|
|
73
90
|
/* DISABLED BUTTONS ------------- */
|
74
91
|
/* Gives elements with a class of 'disabled' a return: false; */
|
92
|
+
|
75
93
|
|
76
94
|
});
|
@@ -33,7 +33,17 @@ jQuery(document).ready(function ($) {
|
|
33
33
|
$li;
|
34
34
|
|
35
35
|
if ($customSelect.length === 0) {
|
36
|
-
$
|
36
|
+
$customSelectSize = '';
|
37
|
+
if ($(sel).hasClass('small')) {
|
38
|
+
$customSelectSize = 'small';
|
39
|
+
} else if ($(sel).hasClass('medium')) {
|
40
|
+
$customSelectSize = 'medium';
|
41
|
+
} else if ($(sel).hasClass('large')) {
|
42
|
+
$customSelectSize = 'large';
|
43
|
+
} else if ($(sel).hasClass('expand')) {
|
44
|
+
$customSelectSize = 'expand';
|
45
|
+
}
|
46
|
+
$customSelect = $('<div class="custom dropdown ' + $customSelectSize + '"><a href="#" class="selector"></a><ul></ul></div>"');
|
37
47
|
$options.each(function () {
|
38
48
|
$li = $('<li>' + $(this).html() + '</li>');
|
39
49
|
$customSelect.find('ul').append($li);
|
@@ -68,8 +78,11 @@ jQuery(document).ready(function ($) {
|
|
68
78
|
}
|
69
79
|
$customSelect.removeClass('open');
|
70
80
|
});
|
71
|
-
|
72
|
-
|
81
|
+
|
82
|
+
if (!$customSelect.is('.small, .medium, .large, .expand')) {
|
83
|
+
$customSelect.css('width', maxWidth + 18 + 'px');
|
84
|
+
$customSelect.find('ul').css('width', maxWidth + 16 + 'px');
|
85
|
+
}
|
73
86
|
|
74
87
|
}
|
75
88
|
|
@@ -181,7 +194,7 @@ jQuery(document).ready(function ($) {
|
|
181
194
|
$select = $dropdown.prev();
|
182
195
|
|
183
196
|
event.preventDefault();
|
184
|
-
|
197
|
+
|
185
198
|
if (false == $select.is(':disabled')) {
|
186
199
|
$dropdown.toggleClass('open');
|
187
200
|
|
@@ -193,6 +206,7 @@ jQuery(document).ready(function ($) {
|
|
193
206
|
} else {
|
194
207
|
$(document).unbind('.customdropdown');
|
195
208
|
}
|
209
|
+
return false;
|
196
210
|
}
|
197
211
|
});
|
198
212
|
|
@@ -27,6 +27,8 @@
|
|
27
27
|
startClockOnMouseOut: false, // if clock should start on MouseOut
|
28
28
|
startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
|
29
29
|
directionalNav: true, // manual advancing directional navs
|
30
|
+
directionalNavRightText: 'Right', // text of right directional element for accessibility
|
31
|
+
directionalNavLeftText: 'Left', // text of left directional element for accessibility
|
30
32
|
captions: true, // do you want captions?
|
31
33
|
captionAnimation: 'fade', // fade, slideOpen, none
|
32
34
|
captionAnimationSpeed: 600, // if so how quickly should they animate in
|
@@ -48,7 +50,7 @@
|
|
48
50
|
wrapperHTML: '<div class="orbit-wrapper" />',
|
49
51
|
timerHTML: '<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',
|
50
52
|
captionHTML: '<div class="orbit-caption"></div>',
|
51
|
-
directionalNavHTML: '<div class="slider-nav"><span class="right"
|
53
|
+
directionalNavHTML: '<div class="slider-nav"><span class="right"></span><span class="left"></span></div>',
|
52
54
|
bulletHTML: '<ul class="orbit-bullets"></ul>',
|
53
55
|
|
54
56
|
init: function (element, options) {
|
@@ -355,9 +357,13 @@
|
|
355
357
|
},
|
356
358
|
|
357
359
|
setupDirectionalNav: function () {
|
358
|
-
var self = this
|
360
|
+
var self = this,
|
361
|
+
$directionalNav = $(this.directionalNavHTML);
|
362
|
+
|
363
|
+
$directionalNav.find('.right').html(this.options.directionalNavRightText);
|
364
|
+
$directionalNav.find('.left').html(this.options.directionalNavLeftText);
|
359
365
|
|
360
|
-
this.$wrapper.append(
|
366
|
+
this.$wrapper.append($directionalNav);
|
361
367
|
|
362
368
|
this.$wrapper.find('.left').click(function () {
|
363
369
|
self.stopClock();
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* Free to use under the MIT license.
|
6
6
|
* http://www.opensource.org/licenses/mit-license.php
|
7
7
|
*/
|
8
|
-
|
8
|
+
/*globals jQuery */
|
9
9
|
|
10
10
|
(function ($) {
|
11
11
|
$('a[data-reveal-id]').live('click', function (event) {
|
@@ -19,108 +19,134 @@
|
|
19
19
|
animation: 'fadeAndPop', // fade, fadeAndPop, none
|
20
20
|
animationSpeed: 300, // how fast animtions are
|
21
21
|
closeOnBackgroundClick: true, // if you click background will modal close?
|
22
|
-
dismissModalClass: 'close-reveal-modal' // the class of a button or element that will close an open modal
|
22
|
+
dismissModalClass: 'close-reveal-modal', // the class of a button or element that will close an open modal
|
23
|
+
open: $.noop,
|
24
|
+
opened: $.noop,
|
25
|
+
close: $.noop,
|
26
|
+
closed: $.noop
|
23
27
|
};
|
24
|
-
|
28
|
+
options = $.extend({}, defaults, options);
|
25
29
|
|
26
30
|
return this.each(function () {
|
27
31
|
var modal = $(this),
|
28
|
-
topMeasure = parseInt(modal.css('top')),
|
32
|
+
topMeasure = parseInt(modal.css('top'), 10),
|
29
33
|
topOffset = modal.height() + topMeasure,
|
30
34
|
locked = false,
|
31
|
-
modalBg = $('.reveal-modal-bg')
|
35
|
+
modalBg = $('.reveal-modal-bg'),
|
36
|
+
closeButton;
|
32
37
|
|
33
|
-
if (modalBg.length
|
38
|
+
if (modalBg.length === 0) {
|
34
39
|
modalBg = $('<div class="reveal-modal-bg" />').insertAfter(modal);
|
35
40
|
modalBg.fadeTo('fast', 0.8);
|
36
41
|
}
|
42
|
+
|
43
|
+
function unlockModal() {
|
44
|
+
locked = false;
|
45
|
+
}
|
46
|
+
|
47
|
+
function lockModal() {
|
48
|
+
locked = true;
|
49
|
+
}
|
37
50
|
|
38
51
|
function openAnimation() {
|
39
|
-
modalBg.unbind('click.modalEvent');
|
40
|
-
$('.' + options.dismissModalClass).unbind('click.modalEvent');
|
41
52
|
if (!locked) {
|
42
53
|
lockModal();
|
43
|
-
if (options.animation
|
54
|
+
if (options.animation === "fadeAndPop") {
|
44
55
|
modal.css({'top': $(document).scrollTop() - topOffset, 'opacity': 0, 'visibility': 'visible'});
|
45
56
|
modalBg.fadeIn(options.animationSpeed / 2);
|
46
57
|
modal.delay(options.animationSpeed / 2).animate({
|
47
58
|
"top": $(document).scrollTop() + topMeasure + 'px',
|
48
59
|
"opacity": 1
|
49
|
-
}, options.animationSpeed,
|
60
|
+
}, options.animationSpeed, function () {
|
61
|
+
modal.trigger('reveal:opened');
|
62
|
+
});
|
63
|
+
|
50
64
|
}
|
51
|
-
if (options.animation
|
65
|
+
if (options.animation === "fade") {
|
52
66
|
modal.css({'opacity': 0, 'visibility': 'visible', 'top': $(document).scrollTop() + topMeasure});
|
53
67
|
modalBg.fadeIn(options.animationSpeed / 2);
|
54
68
|
modal.delay(options.animationSpeed / 2).animate({
|
55
69
|
"opacity": 1
|
56
|
-
}, options.animationSpeed,
|
70
|
+
}, options.animationSpeed, function () {
|
71
|
+
modal.trigger('reveal:opened');
|
72
|
+
});
|
73
|
+
|
57
74
|
}
|
58
|
-
if (options.animation
|
75
|
+
if (options.animation === "none") {
|
59
76
|
modal.css({'visibility': 'visible', 'top': $(document).scrollTop() + topMeasure});
|
60
77
|
modalBg.css({"display": "block"});
|
61
|
-
|
78
|
+
modal.trigger('reveal:opened');
|
62
79
|
}
|
63
80
|
}
|
64
|
-
modal.unbind('reveal:open', openAnimation);
|
65
81
|
}
|
66
|
-
modal.bind('reveal:open', openAnimation);
|
82
|
+
modal.bind('reveal:open.reveal', openAnimation);
|
67
83
|
|
68
84
|
function closeAnimation() {
|
69
85
|
if (!locked) {
|
70
86
|
lockModal();
|
71
|
-
if (options.animation
|
72
|
-
modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed);
|
87
|
+
if (options.animation === "fadeAndPop") {
|
73
88
|
modal.animate({
|
74
89
|
"top": $(document).scrollTop() - topOffset + 'px',
|
75
90
|
"opacity": 0
|
76
91
|
}, options.animationSpeed / 2, function () {
|
77
92
|
modal.css({'top': topMeasure, 'opacity': 1, 'visibility': 'hidden'});
|
78
|
-
|
93
|
+
});
|
94
|
+
modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed, function () {
|
95
|
+
modal.trigger('reveal:closed');
|
79
96
|
});
|
80
97
|
}
|
81
|
-
if (options.animation
|
82
|
-
modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed);
|
98
|
+
if (options.animation === "fade") {
|
83
99
|
modal.animate({
|
84
100
|
"opacity" : 0
|
85
101
|
}, options.animationSpeed, function () {
|
86
102
|
modal.css({'opacity': 1, 'visibility': 'hidden', 'top': topMeasure});
|
87
|
-
|
103
|
+
});
|
104
|
+
modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed, function () {
|
105
|
+
modal.trigger('reveal:closed');
|
88
106
|
});
|
89
107
|
}
|
90
|
-
if (options.animation
|
108
|
+
if (options.animation === "none") {
|
91
109
|
modal.css({'visibility': 'hidden', 'top': topMeasure});
|
92
110
|
modalBg.css({'display': 'none'});
|
111
|
+
modal.trigger('reveal:closed');
|
93
112
|
}
|
94
113
|
}
|
95
|
-
modal.unbind('reveal:close', closeAnimation);
|
96
114
|
}
|
97
|
-
|
115
|
+
|
116
|
+
function destroy() {
|
117
|
+
modal.unbind('.reveal');
|
118
|
+
modalBg.unbind('.reveal');
|
119
|
+
$('.' + options.dismissModalClass).unbind('.reveal');
|
120
|
+
$('body').unbind('.reveal');
|
121
|
+
}
|
122
|
+
|
123
|
+
modal.bind('reveal:close.reveal', closeAnimation);
|
124
|
+
modal.bind('reveal:opened.reveal reveal:closed.reveal', unlockModal);
|
125
|
+
modal.bind('reveal:closed.reveal', destroy);
|
126
|
+
|
127
|
+
modal.bind('reveal:open.reveal', options.open);
|
128
|
+
modal.bind('reveal:opened.reveal', options.opened);
|
129
|
+
modal.bind('reveal:close.reveal', options.close);
|
130
|
+
modal.bind('reveal:closed.reveal', options.closed);
|
131
|
+
|
98
132
|
modal.trigger('reveal:open');
|
99
133
|
|
100
|
-
|
134
|
+
closeButton = $('.' + options.dismissModalClass).bind('click.reveal', function () {
|
101
135
|
modal.trigger('reveal:close');
|
102
136
|
});
|
103
137
|
|
104
138
|
if (options.closeOnBackgroundClick) {
|
105
139
|
modalBg.css({"cursor": "pointer"});
|
106
|
-
modalBg.bind('click.
|
140
|
+
modalBg.bind('click.reveal', function () {
|
107
141
|
modal.trigger('reveal:close');
|
108
142
|
});
|
109
143
|
}
|
110
144
|
|
111
|
-
$('body').keyup
|
145
|
+
$('body').bind('keyup.reveal', function (event) {
|
112
146
|
if (event.which === 27) { // 27 is the keycode for the Escape key
|
113
147
|
modal.trigger('reveal:close');
|
114
148
|
}
|
115
149
|
});
|
116
|
-
|
117
|
-
function unlockModal() {
|
118
|
-
locked = false;
|
119
|
-
}
|
120
|
-
|
121
|
-
function lockModal() {
|
122
|
-
locked = true;
|
123
|
-
}
|
124
150
|
});
|
125
151
|
};
|
126
|
-
}
|
152
|
+
} (jQuery));
|