zurb-foundation 2.2.1.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -2
- data/Capfile +5 -0
- data/Gemfile +1 -1
- data/LICENSE +22 -0
- data/README.md +87 -0
- data/Rakefile +1 -0
- data/config/deploy.rb +42 -0
- data/foundation.gemspec +17 -21
- data/index.html +138 -0
- data/lib/foundation/engine.rb +2 -2
- data/lib/foundation/sass_script_functions.rb +29 -0
- data/lib/foundation/version.rb +1 -2
- data/lib/zurb-foundation.rb +6 -3
- data/stylesheets/_foundation.scss +14 -0
- data/stylesheets/foundation/_base.scss +6 -0
- data/stylesheets/foundation/_mixins.scss +46 -0
- data/stylesheets/foundation/_modular-scale.sass +332 -0
- data/stylesheets/foundation/_semantic-grid.scss +67 -0
- data/stylesheets/foundation/_settings.scss +71 -0
- data/stylesheets/foundation/app.scss +26 -0
- data/stylesheets/foundation/buttons.scss +175 -0
- data/stylesheets/foundation/forms.scss +130 -0
- data/stylesheets/foundation/globals.scss +34 -0
- data/stylesheets/foundation/grid.scss +132 -0
- data/stylesheets/foundation/ie.scss +16 -0
- data/stylesheets/foundation/mobile.scss +32 -0
- data/stylesheets/foundation/navbar.scss +107 -0
- data/stylesheets/foundation/offcanvas.scss +57 -0
- data/{vendor/assets/stylesheets/foundation/orbit.css.scss → stylesheets/foundation/orbit.scss} +68 -68
- data/stylesheets/foundation/reveal.scss +54 -0
- data/stylesheets/foundation/tabs.scss +89 -0
- data/stylesheets/foundation/typography.scss +83 -0
- data/stylesheets/foundation/ui.scss +352 -0
- data/templates/project/.gitignore +44 -0
- data/templates/project/MIT-LICENSE.txt +20 -0
- data/templates/project/humans.txt +8 -0
- data/templates/project/index.html +133 -0
- data/templates/project/manifest.rb +51 -0
- data/templates/project/robots.txt +4 -0
- data/templates/project/sass/_settings.scss +48 -0
- data/templates/project/sass/app.scss +20 -0
- data/templates/project/sass/ie.scss +4 -0
- data/templates/project/stylesheets/app.css +0 -0
- data/templates/project/stylesheets/ie.css +0 -0
- data/test.html +758 -0
- data/type.html +153 -0
- data/vendor/assets/images/foundation/orbit/left-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow.png +0 -0
- data/vendor/assets/javascripts/foundation/app.js +92 -71
- data/vendor/assets/javascripts/foundation/index.js +8 -7
- data/vendor/assets/javascripts/foundation/jquery.customforms.js +74 -73
- data/vendor/assets/javascripts/foundation/jquery.min.js +4 -0
- data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +50 -0
- data/vendor/assets/javascripts/foundation/jquery.orbit-1.4.0.js +103 -101
- data/vendor/assets/javascripts/foundation/jquery.placeholder.min.js +0 -1
- data/vendor/assets/javascripts/foundation/jquery.reveal.js +39 -15
- data/vendor/assets/javascripts/foundation/jquery.tooltips.js +96 -90
- data/vendor/assets/javascripts/foundation/modernizr.foundation.js +3 -4
- metadata +101 -46
- data/README.markdown +0 -163
- data/build.rb +0 -49
- data/lib/foundation/generators/USAGE +0 -15
- data/lib/foundation/generators/install_generator.rb +0 -27
- data/lib/foundation/generators/layout_generator.rb +0 -28
- data/lib/foundation/generators/templates/application.css +0 -5
- data/lib/foundation/generators/templates/application.html.erb +0 -31
- data/lib/foundation/generators/templates/application.html.haml +0 -30
- data/lib/foundation/generators/templates/application.html.slim +0 -30
- data/lib/foundation/generators/templates/application.js +0 -4
- data/vendor/assets/images/foundation/misc/button-gloss.png +0 -0
- data/vendor/assets/images/foundation/misc/button-overlay.png +0 -0
- data/vendor/assets/images/foundation/misc/custom-form-sprites.png +0 -0
- data/vendor/assets/images/foundation/misc/input-bg-outset.png +0 -0
- data/vendor/assets/images/foundation/misc/input-bg.png +0 -0
- data/vendor/assets/images/foundation/misc/modal-gloss.png +0 -0
- data/vendor/assets/images/foundation/misc/table-sorter.png +0 -0
- data/vendor/assets/stylesheets/foundation/forms.css.scss +0 -134
- data/vendor/assets/stylesheets/foundation/globals.css.scss +0 -139
- data/vendor/assets/stylesheets/foundation/grid.css.scss +0 -129
- data/vendor/assets/stylesheets/foundation/ie.css.scss +0 -13
- data/vendor/assets/stylesheets/foundation/index.css +0 -10
- data/vendor/assets/stylesheets/foundation/mobile.css.scss +0 -222
- data/vendor/assets/stylesheets/foundation/reveal.css.scss +0 -100
- data/vendor/assets/stylesheets/foundation/typography.css.scss +0 -63
- data/vendor/assets/stylesheets/foundation/ui.css.scss +0 -418
data/type.html
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
4
|
+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
5
|
+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
|
6
|
+
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
|
7
|
+
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
|
8
|
+
<head>
|
9
|
+
<meta charset="utf-8" />
|
10
|
+
|
11
|
+
<!-- Set the viewport width to device width for mobile -->
|
12
|
+
<meta name="viewport" content="width=device-width" />
|
13
|
+
|
14
|
+
<title>Welcome to Foundation Typography with Vertical Rhythm</title>
|
15
|
+
|
16
|
+
<!-- Included CSS Files -->
|
17
|
+
<!-- Combine and Compress These CSS Files -->
|
18
|
+
<link rel="stylesheet" href="css/normalize.css">
|
19
|
+
<link rel="stylesheet" href="css/globals.css">
|
20
|
+
<link rel="stylesheet" href="css/typography.css">
|
21
|
+
<link rel="stylesheet" href="css/grid.css">
|
22
|
+
<link rel="stylesheet" href="css/ui.css">
|
23
|
+
<link rel="stylesheet" href="css/buttons.css">
|
24
|
+
<link rel="stylesheet" href="css/tabs.css">
|
25
|
+
<link rel="stylesheet" href="css/navbar.css">
|
26
|
+
<link rel="stylesheet" href="css/forms.css">
|
27
|
+
<link rel="stylesheet" href="css/orbit.css">
|
28
|
+
<link rel="stylesheet" href="css/reveal.css">
|
29
|
+
<link rel="stylesheet" href="css/mobile.css">
|
30
|
+
<!-- End Combine and Compress These CSS Files -->
|
31
|
+
<link rel="stylesheet" href="css/app.css">
|
32
|
+
|
33
|
+
<!--[if lt IE 9]>
|
34
|
+
<link rel="stylesheet" href="css/ie.css">
|
35
|
+
<![endif]-->
|
36
|
+
|
37
|
+
<script src="js/modernizr.foundation.js"></script>
|
38
|
+
|
39
|
+
<!-- IE Fix for HTML5 Tags -->
|
40
|
+
<!--[if lt IE 9]>
|
41
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
42
|
+
<![endif]-->
|
43
|
+
|
44
|
+
<style type="text/css">
|
45
|
+
|
46
|
+
.display-grid .row { background: #eee; margin-bottom: 8px; }
|
47
|
+
.display-grid .column, .display-grid .columns { background: #ddd; }
|
48
|
+
|
49
|
+
</style>
|
50
|
+
|
51
|
+
</head>
|
52
|
+
<body>
|
53
|
+
|
54
|
+
<!-- container -->
|
55
|
+
|
56
|
+
<div class="row">
|
57
|
+
<div class="twelve columns">
|
58
|
+
<h1>Foundation Testbed, What Does A Long Headline Look like? <small>Typography</small></h1>
|
59
|
+
<p class="lead">This page includes common elements and weird edge cases so we can <strong>test the crap out of stuff</strong>. It will probably change in each release to test new elements.</p>
|
60
|
+
<p>Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
61
|
+
|
62
|
+
<h2>Foundation Testbed, What Does A<br>Long Headline Look like? <small>Typography</small></h2>
|
63
|
+
<p class="lead">This page includes common elements and weird edge cases so we can <strong>test the crap out of stuff</strong>. It will probably change in each release to test new elements.</p>
|
64
|
+
<p>Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
65
|
+
|
66
|
+
<h3>Foundation Testbed, What Does A<br>Long Headline Look like? <small>Typography</small></h3>
|
67
|
+
<p class="lead">This page includes common elements and weird edge cases so we can <strong>test the crap out of stuff</strong>. It will probably change in each release to test new elements.</p>
|
68
|
+
<p>Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
69
|
+
|
70
|
+
<h4>Foundation Testbed, What Does A<br>Long Headline Look like? <small>Typography</small></h4>
|
71
|
+
<p>Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
72
|
+
|
73
|
+
<h5>Foundation Testbed, What Does A<br>Long Headline Look like? <small>Typography</small></h5>
|
74
|
+
<p>Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
75
|
+
|
76
|
+
<h6>Foundation Testbed, What Does A<br>Long Headline Look like? <small>Typography</small></h6>
|
77
|
+
<p>Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
<div class="row">
|
81
|
+
<div class="eight columns">
|
82
|
+
<h2>Heading Level 2 <small>Subheader</small></h2>
|
83
|
+
<p>Aenean lacinia <strong>bibendum nulla sed consectetur</strong>. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
84
|
+
<p>Praesent <em>commodo cursus magna, vel scelerisque nisl consectetur</em> et. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Cras justo odio, dapibus facilisis in, egestas eget quam. Nulla vitae elit libero, a pharetra augue.</p>
|
85
|
+
<p>List Heading:</p>
|
86
|
+
<ul class="disc">
|
87
|
+
<li>This is item number one in the list element.</li>
|
88
|
+
<li>This is item number two in the list element.</li>
|
89
|
+
<li>This is item number three in the list element.</li>
|
90
|
+
<li>This is item number four in the list element.</li>
|
91
|
+
</ul>
|
92
|
+
</div>
|
93
|
+
<div class="four columns">
|
94
|
+
<h4>Heading 4 <small>Subheader</small></h4>
|
95
|
+
<aside>
|
96
|
+
<p>Curabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Sed posuere consectetur est at lobortis. Praesent commodo cursus magna, vel scelerisque nisl <strong>consectetur</strong> et. Cras justo odio, dapibus ac facilisis in, egestas eget quam. <em>Cras justo odio, dapibus ac facilisis in, egestas eget quam.</em> Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nib.</p>
|
97
|
+
</aside>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
<div class="row">
|
101
|
+
<div class="twelve columns">
|
102
|
+
<h4>Heading Level 4 <small>Subheader</small></h4>
|
103
|
+
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Cras <strong>justo</strong> odio, dapibus ac facilisis in, egestas eget quam. Enean eu leo quam. <em>Pellentesque ornare sem lacinia quam venenatis</em> vestibulum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Nulla vitae elit libero, a pharetra augue.</p>
|
104
|
+
<blockquote><p>Donec ullamcorper nulla non metus auctor fringilla. Nulla <strong>vitae</strong> elit libero, a pharetra augue.</p><cite>Chris Michel</cite></blockquote>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
<div class="row">
|
108
|
+
<div class="six columns">
|
109
|
+
<h5>Heading Level 5 <small>Subheader</small></h5>
|
110
|
+
<p>Maecenas sed diam eget risus <strong>varius blandit sit amet</strong> non magna. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Enean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Nulla vitae elit libero, a pharetra augue.</p>
|
111
|
+
</div>
|
112
|
+
<div class="six columns">
|
113
|
+
<h6>Heading Level 6 <small>Subheader</small></h6>
|
114
|
+
<p>Maecenas sed diam eget risus varius <strong>blandit</strong> sit amet non magna. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Enean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Nulla vitae elit libero, a pharetra augue.</p>
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="row">
|
118
|
+
<div class="twelve columns">
|
119
|
+
<h3>Some Title</h3>
|
120
|
+
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. <img class="left" src="http://placehold.it/200x200"> Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vestibulum id ligula porta felis euismod semper. Cras mattis consectetur purus sit amet fermentum.</p>
|
121
|
+
<h4>Another Title</h4>
|
122
|
+
<p>Cras mattis consectetur purus sit amet fermentum. Maecenas faucibus mollis interdum. Cras mattis consectetur purus sit amet fermentum. Curabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Cras mattis consectetur purus sit amet fermentum.</p>
|
123
|
+
<p>Cras mattis consectetur purus sit amet fermentum. Maecenas faucibus mollis interdum. Cras mattis consectetur purus sit amet fermentum. Curabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Cras mattis consectetur purus sit amet fermentum.</p>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="row">
|
128
|
+
<div class="twelve column">
|
129
|
+
<h1>H1 Heading</h1>
|
130
|
+
<h2>H2 Heading</h2>
|
131
|
+
<h3>H3 Heading</h3>
|
132
|
+
<h4>H4 Heading</h4>
|
133
|
+
<h5>H5 Heading</h5>
|
134
|
+
<h6>H6 Heading</h6>
|
135
|
+
</div>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<!-- Included JS Files -->
|
142
|
+
<script src="js/jquery.min.js"></script>
|
143
|
+
<!-- Combine and Compress These JS Files -->
|
144
|
+
<script src="js/jquery.reveal.js"></script>
|
145
|
+
<script src="js/jquery.orbit-1.4.0.js"></script>
|
146
|
+
<script src="js/jquery.customforms.js"></script>
|
147
|
+
<script src="js/jquery.placeholder.min.js"></script>
|
148
|
+
<script src="js/jquery.tooltips.js"></script>
|
149
|
+
<!-- End Combine and Compress These JS Files -->
|
150
|
+
<script src="js/app.js"></script>
|
151
|
+
|
152
|
+
</body>
|
153
|
+
</html>
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,95 +1,116 @@
|
|
1
1
|
jQuery(document).ready(function ($) {
|
2
2
|
|
3
|
-
|
3
|
+
/* Use this js doc for all application specific JS */
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
/* TABS --------------------------------- */
|
6
|
+
/* Remove if you don't need :) */
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
// Strip off the current url that IE adds
|
13
|
-
contentLocation = contentLocation.replace(/^.+#/, '#');
|
8
|
+
function activateTab($tab) {
|
9
|
+
var $activeTab = $tab.closest('dl').find('dd.active'),
|
10
|
+
contentLocation = $tab.children('a').attr("href") + 'Tab';
|
14
11
|
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
// Strip off the current url that IE adds
|
13
|
+
contentLocation = contentLocation.replace(/^.+#/, '#');
|
14
|
+
|
15
|
+
//Make Tab Active
|
16
|
+
$activeTab.removeClass('active');
|
17
|
+
$tab.addClass('active');
|
18
18
|
|
19
19
|
//Show Tab Content
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
$(contentLocation).closest('.tabs-content').children('li').removeClass('active').hide();
|
21
|
+
$(contentLocation).css('display', 'block').addClass('active');
|
22
|
+
}
|
23
23
|
|
24
|
-
$('dl.tabs dd a').
|
25
|
-
activateTab($(this));
|
24
|
+
$('dl.tabs dd a').on('click.fndtn', function (event) {
|
25
|
+
activateTab($(this).parent('dd'));
|
26
26
|
});
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
if (window.location.hash) {
|
29
|
+
activateTab($('a[href="' + window.location.hash + '"]').parent('dd'));
|
30
|
+
$.foundation.customForms.appendCustomMarkup();
|
31
|
+
}
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
/* ALERT BOXES ------------ */
|
34
|
+
$(".alert-box").delegate("a.close", "click", function(event) {
|
35
35
|
event.preventDefault();
|
36
|
-
|
37
|
-
|
38
|
-
});
|
39
|
-
});
|
40
|
-
|
41
|
-
|
42
|
-
/* PLACEHOLDER FOR FORMS ------------- */
|
43
|
-
/* Remove this and jquery.placeholder.min.js if you don't need :) */
|
44
|
-
|
45
|
-
$('input, textarea').placeholder();
|
46
|
-
|
47
|
-
/* TOOLTIPS ------------ */
|
48
|
-
$(this).tooltips();
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
/* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */
|
53
|
-
// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
|
54
|
-
// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
|
55
|
-
// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'});
|
56
|
-
// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'});
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
/* DROPDOWN NAV ------------- */
|
61
|
-
|
62
|
-
var lockNavBar = false;
|
63
|
-
$('.nav-bar a.flyout-toggle').live('click', function(e) {
|
64
|
-
e.preventDefault();
|
65
|
-
var flyout = $(this).siblings('.flyout');
|
66
|
-
if (lockNavBar === false) {
|
67
|
-
$('.nav-bar .flyout').not(flyout).slideUp(500);
|
68
|
-
flyout.slideToggle(500, function(){
|
69
|
-
lockNavBar = false;
|
70
|
-
});
|
71
|
-
}
|
72
|
-
lockNavBar = true;
|
73
|
-
});
|
74
|
-
if (Modernizr.touch) {
|
75
|
-
$('.nav-bar>li.has-flyout>a.main').css({
|
76
|
-
'padding-right' : '75px'
|
36
|
+
$(this).closest(".alert-box").fadeOut(function(event){
|
37
|
+
$(this).remove();
|
77
38
|
});
|
78
|
-
|
79
|
-
|
39
|
+
});
|
40
|
+
|
41
|
+
/* PLACEHOLDER FOR FORMS ------------- */
|
42
|
+
/* Remove this and jquery.placeholder.min.js if you don't need :) */
|
43
|
+
$('input, textarea').placeholder();
|
44
|
+
|
45
|
+
/* TOOLTIPS ------------ */
|
46
|
+
$(this).tooltips();
|
47
|
+
|
48
|
+
/* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */
|
49
|
+
// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
|
50
|
+
// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
|
51
|
+
// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'});
|
52
|
+
// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'});
|
53
|
+
|
54
|
+
|
55
|
+
/* DROPDOWN NAV ------------- */
|
56
|
+
|
57
|
+
var lockNavBar = false;
|
58
|
+
/* Windows Phone, sadly, does not register touch events :( */
|
59
|
+
if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) {
|
60
|
+
$('.nav-bar a.flyout-toggle').on('click.fndtn touchstart.fndtn', function(e) {
|
61
|
+
e.preventDefault();
|
62
|
+
var flyout = $(this).siblings('.flyout').first();
|
63
|
+
if (lockNavBar === false) {
|
64
|
+
$('.nav-bar .flyout').not(flyout).slideUp(500);
|
65
|
+
flyout.slideToggle(500, function(){
|
66
|
+
lockNavBar = false;
|
67
|
+
});
|
68
|
+
}
|
69
|
+
lockNavBar = true;
|
80
70
|
});
|
71
|
+
$('.nav-bar>li.has-flyout').addClass('is-touch');
|
81
72
|
} else {
|
82
73
|
$('.nav-bar>li.has-flyout').hover(function() {
|
83
74
|
$(this).children('.flyout').show();
|
84
75
|
}, function() {
|
85
76
|
$(this).children('.flyout').hide();
|
86
|
-
})
|
77
|
+
});
|
87
78
|
}
|
88
79
|
|
80
|
+
/* DISABLED BUTTONS ------------- */
|
81
|
+
/* Gives elements with a class of 'disabled' a return: false; */
|
82
|
+
|
83
|
+
/* SPLIT BUTTONS/DROPDOWNS */
|
84
|
+
$('.button.dropdown > ul').addClass('no-hover');
|
85
|
+
|
86
|
+
$('.button.dropdown').on('click.fndtn touchstart.fndtn', function (e) {
|
87
|
+
e.stopPropagation();
|
88
|
+
});
|
89
|
+
$('.button.dropdown.split span').on('click.fndtn touchstart.fndtn', function (e) {
|
90
|
+
e.preventDefault();
|
91
|
+
$('.button.dropdown').not($(this).parent()).children('ul').removeClass('show-dropdown');
|
92
|
+
$(this).siblings('ul').toggleClass('show-dropdown');
|
93
|
+
});
|
94
|
+
$('.button.dropdown').not('.split').on('click.fndtn touchstart.fndtn', function (e) {
|
95
|
+
$('.button.dropdown').not(this).children('ul').removeClass('show-dropdown');
|
96
|
+
$(this).children('ul').toggleClass('show-dropdown');
|
97
|
+
});
|
98
|
+
$('body, html').on('click.fndtn touchstart.fndtn', function () {
|
99
|
+
$('.button.dropdown ul').removeClass('show-dropdown');
|
100
|
+
});
|
101
|
+
|
102
|
+
// Positioning the Flyout List
|
103
|
+
var normalButtonHeight = $('.button.dropdown:not(.large):not(.small):not(.tiny)').outerHeight() - 1,
|
104
|
+
largeButtonHeight = $('.button.large.dropdown').outerHeight() - 1,
|
105
|
+
smallButtonHeight = $('.button.small.dropdown').outerHeight() - 1,
|
106
|
+
tinyButtonHeight = $('.button.tiny.dropdown').outerHeight() - 1;
|
89
107
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
108
|
+
$('.button.dropdown:not(.large):not(.small):not(.tiny) > ul').css('top', normalButtonHeight);
|
109
|
+
$('.button.dropdown.large > ul').css('top', largeButtonHeight);
|
110
|
+
$('.button.dropdown.small > ul').css('top', smallButtonHeight);
|
111
|
+
$('.button.dropdown.tiny > ul').css('top', tinyButtonHeight);
|
94
112
|
|
113
|
+
/* CUSTOM FORMS */
|
114
|
+
$.foundation.customForms.appendCustomMarkup();
|
95
115
|
|
116
|
+
});
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
/*
|
2
|
+
=require foundation/modernizr.foundation
|
3
|
+
=require foundation/jquery.customforms
|
4
|
+
=require foundation/jquery.orbit-1.4.0
|
5
|
+
=require foundation/jquery.placeholder.min
|
6
|
+
=require foundation/jquery.reveal
|
7
|
+
=require foundation/jquery.tooltips
|
8
|
+
*/
|
@@ -10,11 +10,16 @@ jQuery.foundation = jQuery.foundation || {};
|
|
10
10
|
jQuery.foundation.customForms = jQuery.foundation.customForms || {};
|
11
11
|
|
12
12
|
jQuery(document).ready(function ($) {
|
13
|
-
|
14
|
-
function
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
|
14
|
+
$.foundation.customForms.appendCustomMarkup = function (options) {
|
15
|
+
var defaults = {
|
16
|
+
disable_class: "js-disable-custom"
|
17
|
+
};
|
18
|
+
var options = $.extend(defaults, options);
|
19
|
+
|
20
|
+
function appendCustomMarkup(idx, sel) {
|
21
|
+
var $this = $(sel).hide(),
|
22
|
+
type = $this.attr('type'),
|
18
23
|
$span = $this.next('span.custom.' + type);
|
19
24
|
|
20
25
|
if ($span.length === 0) {
|
@@ -23,84 +28,79 @@ jQuery(document).ready(function ($) {
|
|
23
28
|
|
24
29
|
$span.toggleClass('checked', $this.is(':checked'));
|
25
30
|
$span.toggleClass('disabled', $this.is(':disabled'));
|
26
|
-
}
|
27
|
-
|
31
|
+
}
|
32
|
+
|
33
|
+
function appendCustomSelect(idx, sel) {
|
34
|
+
var $this = $(sel),
|
35
|
+
$customSelect = $this.next('div.custom.dropdown'),
|
36
|
+
$options = $this.find('option'),
|
37
|
+
$seloptions = $this.find('option:selected'),
|
38
|
+
maxWidth = 0,
|
39
|
+
$li;
|
40
|
+
|
41
|
+
if ($this.hasClass('no-custom')) { return; }
|
42
|
+
if ($customSelect.length === 0) {
|
43
|
+
$customSelectSize = '';
|
44
|
+
if ($(sel).hasClass('small')) {
|
45
|
+
$customSelectSize = 'small';
|
46
|
+
} else if ($(sel).hasClass('medium')) {
|
47
|
+
$customSelectSize = 'medium';
|
48
|
+
} else if ($(sel).hasClass('large')) {
|
49
|
+
$customSelectSize = 'large';
|
50
|
+
} else if ($(sel).hasClass('expand')) {
|
51
|
+
$customSelectSize = 'expand';
|
52
|
+
}
|
53
|
+
$customSelect = $('<div class="custom dropdown ' + $customSelectSize + '"><a href="#" class="selector"></a><ul></ul></div>"');
|
54
|
+
$options.each(function () {
|
55
|
+
$li = $('<li>' + $(this).html() + '</li>');
|
56
|
+
$customSelect.find('ul').append($li);
|
57
|
+
});
|
58
|
+
$customSelect.prepend('<a href="#" class="current">' + $seloptions.html() + '</a>');
|
28
59
|
|
29
|
-
|
30
|
-
|
31
|
-
$customSelect = $this.next('div.custom.dropdown'),
|
32
|
-
$options = $this.find('option'),
|
33
|
-
maxWidth = 0,
|
34
|
-
$li;
|
60
|
+
$this.after($customSelect);
|
61
|
+
$this.hide();
|
35
62
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
} else if ($(sel).hasClass('large')) {
|
44
|
-
$customSelectSize = 'large';
|
45
|
-
} else if ($(sel).hasClass('expand')) {
|
46
|
-
$customSelectSize = 'expand';
|
63
|
+
} else {
|
64
|
+
// refresh the ul with options from the select in case the supplied markup doesn't match
|
65
|
+
$customSelect.find('ul').html('');
|
66
|
+
$options.each(function () {
|
67
|
+
$li = $('<li>' + $(this).html() + '</li>');
|
68
|
+
$customSelect.find('ul').append($li);
|
69
|
+
});
|
47
70
|
}
|
48
|
-
$customSelect = $('<div class="custom dropdown ' + $customSelectSize + '"><a href="#" class="selector"></a><ul></ul></div>"');
|
49
|
-
$options.each(function () {
|
50
|
-
$li = $('<li>' + $(this).html() + '</li>');
|
51
|
-
$customSelect.find('ul').append($li);
|
52
|
-
});
|
53
|
-
$customSelect.prepend('<a href="#" class="current">' + $options.first().html() + '</a>');
|
54
71
|
|
55
|
-
$this.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
$li = $('<li>' + $(this).html() + '</li>');
|
63
|
-
$customSelect.find('ul').append($li);
|
72
|
+
$customSelect.toggleClass('disabled', $this.is(':disabled'));
|
73
|
+
|
74
|
+
$options.each(function (index) {
|
75
|
+
if (this.selected) {
|
76
|
+
$customSelect.find('li').eq(index).addClass('selected');
|
77
|
+
$customSelect.find('.current').html($(this).html());
|
78
|
+
}
|
64
79
|
});
|
65
|
-
}
|
66
80
|
|
67
|
-
|
81
|
+
$customSelect.css('width', 'inherit');
|
82
|
+
$customSelect.find('ul').css('width', 'inherit');
|
68
83
|
|
69
|
-
|
70
|
-
|
71
|
-
$
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
$customSelect.css('width', 'inherit');
|
77
|
-
$customSelect.find('ul').css('width', 'inherit');
|
84
|
+
$customSelect.find('li').each(function () {
|
85
|
+
$customSelect.addClass('open');
|
86
|
+
if ($(this).outerWidth() > maxWidth) {
|
87
|
+
maxWidth = $(this).outerWidth();
|
88
|
+
}
|
89
|
+
$customSelect.removeClass('open');
|
90
|
+
});
|
78
91
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
maxWidth = $(this).outerWidth();
|
92
|
+
if (!$customSelect.is('.small, .medium, .large, .expand')) {
|
93
|
+
$customSelect.css('width', maxWidth + 18 + 'px');
|
94
|
+
$customSelect.find('ul').css('width', maxWidth + 16 + 'px');
|
83
95
|
}
|
84
|
-
$customSelect.removeClass('open');
|
85
|
-
});
|
86
|
-
|
87
|
-
if (!$customSelect.is('.small, .medium, .large, .expand')) {
|
88
|
-
$customSelect.css('width', maxWidth + 18 + 'px');
|
89
|
-
$customSelect.find('ul').css('width', maxWidth + 16 + 'px');
|
90
|
-
}
|
91
96
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
$('form.custom select').each(function () {
|
99
|
-
appendCustomSelect(this);
|
100
|
-
});
|
97
|
+
}
|
98
|
+
|
99
|
+
$('form.custom input:radio[data-customforms!=disabled]').each(appendCustomMarkup);
|
100
|
+
$('form.custom input:checkbox[data-customforms!=disabled]').each(appendCustomMarkup);
|
101
|
+
$('form.custom select[data-customforms!=disabled]').each(appendCustomSelect);
|
101
102
|
};
|
102
103
|
|
103
|
-
$.foundation.customForms.appendCustomMarkup();
|
104
104
|
});
|
105
105
|
|
106
106
|
(function ($) {
|
@@ -207,6 +207,7 @@ jQuery(document).ready(function ($) {
|
|
207
207
|
$select = $dropdown.prev();
|
208
208
|
|
209
209
|
event.preventDefault();
|
210
|
+
$('div.dropdown').removeClass('open');
|
210
211
|
|
211
212
|
if (false == $select.is(':disabled')) {
|
212
213
|
$dropdown.toggleClass('open');
|
@@ -231,6 +232,7 @@ jQuery(document).ready(function ($) {
|
|
231
232
|
|
232
233
|
event.preventDefault();
|
233
234
|
event.stopPropagation();
|
235
|
+
$('div.dropdown').removeClass('open');
|
234
236
|
|
235
237
|
$this
|
236
238
|
.closest('ul')
|
@@ -253,5 +255,4 @@ jQuery(document).ready(function ($) {
|
|
253
255
|
|
254
256
|
$select.trigger('change');
|
255
257
|
});
|
256
|
-
})(jQuery);
|
257
|
-
|
258
|
+
})(jQuery);
|