zurb-foundation 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/docs/_sidebar-components.html.erb +2 -2
- data/docs/_sidebar.html.erb +2 -2
- data/docs/_zurb-jobs.html.erb +2 -2
- data/docs/compile.rb +24 -33
- data/docs/components/block-grid.html.erb +3 -0
- data/docs/components/dropdown.html.erb +1 -1
- data/docs/components/grid.html.erb +1 -1
- data/docs/components/joyride.html.erb +1 -1
- data/docs/components/reveal.html.erb +24 -23
- data/docs/components/section.html.erb +126 -17
- data/docs/controller.rb +9 -7
- data/docs/faq.html.erb +1 -1
- data/docs/index.html.erb +28 -30
- data/docs/javascript.html.erb +4 -4
- data/docs/rails.html.erb +1 -1
- data/docs/support.html.erb +64 -56
- data/js/foundation/foundation.dropdown.js +1 -1
- data/js/foundation/foundation.reveal.js +10 -8
- data/js/foundation/foundation.section.js +5 -2
- data/js/foundation/foundation.topbar.js +1 -1
- data/lib/foundation/version.rb +1 -1
- data/scss/foundation/_foundation-global.scss +2 -0
- data/scss/foundation/components/_block-grid.scss +18 -15
- data/scss/foundation/components/_button-groups.scss +1 -1
- data/scss/foundation/components/_custom-forms.scss +1 -0
- data/scss/foundation/components/_keystrokes.scss +1 -1
- data/scss/foundation/components/_reveal.scss +1 -1
- data/scss/foundation/components/_section.scss +1 -1
- data/scss/foundation/components/_top-bar.scss +7 -5
- data/scss/foundation/components/_type.scss +14 -6
- data/templates/project/index.html +3 -2
- data/templates/project/scss/_settings.scss +981 -0
- data/templates/project/scss/app.scss +35 -35
- metadata +4 -4
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@ We'll keep you up to date with what we've released so you at least have a gist o
|
|
3
3
|
|
4
4
|
---
|
5
5
|
|
6
|
+
### **4.0**- February 28, 2013
|
7
|
+
Initial launch of Foundation 4, a rewritten, mobile-first implementation of the framework. Major enhancements include a mobile-first approach across the board, Scss tools to allow for all-semantic coding, and rewritten JS plugins for speed and ease of use. Marketing site updates, new docs, refined and simplified styles and more. Review the [migration guide](http://foundation.zurb.com/migration.php) for more information.
|
8
|
+
|
9
|
+
### 3.2.5
|
10
|
+
Bug fixes
|
11
|
+
|
12
|
+
### 3.2.4
|
13
|
+
Bug fixes
|
14
|
+
|
15
|
+
### 3.2.3
|
16
|
+
Bug fixes
|
17
|
+
|
6
18
|
### 3.2.2- November 10, 2012
|
7
19
|
This patch fixes a typo found in the tabs plugin.
|
8
20
|
|
data/Gemfile.lock
CHANGED
@@ -103,8 +103,8 @@
|
|
103
103
|
|
104
104
|
<p><a href="http://foundation.zurb.com/download.php" class="button expand" style="margin-bottom: 0;">Download Foundation 4</a></p>
|
105
105
|
|
106
|
-
<div class="jobs hide-for-small">
|
106
|
+
<!-- <div class="jobs hide-for-small">
|
107
107
|
<h5>Awesome product jobs:</h5>
|
108
108
|
<script type="text/javascript" src="http://www.zurb.com/jobs/widgets/jobs.js?limit=3&variation=foundation-sidebar"></script>
|
109
109
|
<a id="via" href="http://zurbjobs.com">via <span class="jobs-link">ZURBjobs</span></a>
|
110
|
-
</div>
|
110
|
+
</div> -->
|
data/docs/_sidebar.html.erb
CHANGED
@@ -102,8 +102,8 @@
|
|
102
102
|
|
103
103
|
<p><a href="http://foundation.zurb.com/download.php" class="button expand" style="margin-bottom: 0;">Download Foundation 4</a></p>
|
104
104
|
|
105
|
-
<div class="jobs hide-for-small">
|
105
|
+
<!-- <div class="jobs hide-for-small">
|
106
106
|
<h5>Awesome product jobs:</h5>
|
107
107
|
<script type="text/javascript" src="http://www.zurb.com/jobs/widgets/jobs.js?limit=3&variation=foundation-sidebar"></script>
|
108
108
|
<a id="via" href="http://zurbjobs.com">via <span class="jobs-link">ZURBjobs</span></a>
|
109
|
-
</div>
|
109
|
+
</div> -->
|
data/docs/_zurb-jobs.html.erb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
<div class="jobs hide-on-phones">
|
1
|
+
<!-- <div class="jobs hide-on-phones">
|
2
2
|
<h5>Awesome product jobs:</h5>
|
3
3
|
<script type="text/javascript" src="http://www.zurb.com/jobs/widgets/jobs.js?limit=3&variation=foundation-sidebar"></script>
|
4
4
|
<a id="via" href="http://zurbjobs.com">via <span class="jobs-link">ZURBjobs</span></a>
|
5
|
-
</div>
|
5
|
+
</div> -->
|
data/docs/compile.rb
CHANGED
@@ -2,42 +2,33 @@ require 'bundler'
|
|
2
2
|
Bundler.require
|
3
3
|
require 'fileutils'
|
4
4
|
|
5
|
-
class
|
6
|
-
def initialize
|
7
|
-
@environment = Sprockets::Environment.new
|
8
|
-
@environment.append_path File.expand_path('../../scss', __FILE__)
|
9
|
-
@environment.append_path File.expand_path('../css', __FILE__)
|
10
|
-
@environment.append_path File.expand_path('../../js', __FILE__)
|
11
|
-
@environment.append_path File.expand_path('../js', __FILE__)
|
12
|
-
end
|
13
|
-
def compile
|
14
|
-
FileUtils.mkdir_p('public/assets/vendor')
|
15
|
-
File.delete("public/assets/normalize.css") if File.exists?("public/assets/normalize.css")
|
16
|
-
File.delete("public/assets/docs.css") if File.exists?("public/assets/docs.css")
|
17
|
-
File.delete("public/assets/docs.js") if File.exists?("public/assets/docs.js")
|
18
|
-
File.delete("public/assets/vendor/custom.modernizr.js") if File.exists?("public/assets/vendor/custom.modernizr.js")
|
19
|
-
File.delete("public/assets/vendor/zepto.js") if File.exists?("public/assets/vendor/zepto.js")
|
20
|
-
File.delete("public/assets/vendor/jquery.js") if File.exists?("public/assets/vendor/jquery.js")
|
5
|
+
class FoundationAssets
|
21
6
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
jquery_code = Uglifier.compile(@environment["vendor/jquery.js"].to_s)
|
27
|
-
zepto_code = Uglifier.compile(@environment["vendor/zepto.js"].to_s)
|
7
|
+
BUNDLES = [
|
8
|
+
"vendor/custom.modernizr.js", "vendor/zepto.js", "vendor/jquery.js",
|
9
|
+
"docs.js", "docs.css", "normalize.css"
|
10
|
+
]
|
28
11
|
|
29
|
-
|
30
|
-
|
31
|
-
File.
|
12
|
+
def initialize
|
13
|
+
@env = Sprockets::Environment.new
|
14
|
+
@env.append_path File.expand_path('../../scss', __FILE__)
|
15
|
+
@env.append_path File.expand_path('../css', __FILE__)
|
16
|
+
@env.append_path File.expand_path('../../js', __FILE__)
|
17
|
+
@env.append_path File.expand_path('../js', __FILE__)
|
18
|
+
end
|
32
19
|
|
33
|
-
|
34
|
-
|
35
|
-
|
20
|
+
def compile
|
21
|
+
assets_path = "public/assets"
|
22
|
+
FileUtils.mkdir_p("#{assets_path}/vendor")
|
23
|
+
BUNDLES.each do |bundle|
|
24
|
+
pth = "#{assets_path}/#{bundle}"
|
25
|
+
File.delete(pth) if File.exists?(pth)
|
26
|
+
code = @env[bundle].to_s
|
27
|
+
File.open(pth, "w") {|f| f.puts code}
|
28
|
+
end
|
36
29
|
end
|
37
30
|
end
|
38
31
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
f=FoundationDocs.new
|
43
|
-
f.compile
|
32
|
+
Stasis.new(File.expand_path('.'), File.expand_path('./public'), {:asset_path => "http://foundation.zurb.com/docs/assets"}).render
|
33
|
+
assets = FoundationAssets.new
|
34
|
+
assets.compile
|
@@ -103,6 +103,9 @@ $base-style: true
|
|
103
103
|
/* We use this to control the maximum blocks and spacing */
|
104
104
|
$block-grid-elements: 12;
|
105
105
|
$block-grid-default-spacing: 10px;
|
106
|
+
|
107
|
+
/* Enables media queries for block-grid classes. Set to false if writing semantic HTML. */
|
108
|
+
$block-grid-media-queries: true
|
106
109
|
', :css %>
|
107
110
|
|
108
111
|
</div>
|
@@ -355,7 +355,7 @@ $total-columns: 12 !default;
|
|
355
355
|
<hr>
|
356
356
|
|
357
357
|
<h4>Get Advanced With Media Query Changes</h4>
|
358
|
-
<p>We kept media queries out of the code for our grid mixins. This will enable you to include the mixins inside of whatever breakpoint you'd like, putting you in complete control. If you want to create 10 breakpoints and shift the layout around between each one, by all means. If you want to use only the default breakpoints, <a href="
|
358
|
+
<p>We kept media queries out of the code for our grid mixins. This will enable you to include the mixins inside of whatever breakpoint you'd like, putting you in complete control. If you want to create 10 breakpoints and shift the layout around between each one, by all means. If you want to use only the default breakpoints, <a href="sass.html">we've got variables for that</a>.</p>
|
359
359
|
|
360
360
|
</div>
|
361
361
|
</div>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<div class="joyride-content-wrapper">
|
52
52
|
<p>Hello and welcome to the Joyride documentation page.</p>
|
53
53
|
<a href="#" class="small button joyride-next-tip">Next</a>
|
54
|
-
<a href="#close" class="joyride-close-tip"
|
54
|
+
<a href="#close" class="joyride-close-tip">×</a>
|
55
55
|
</div>
|
56
56
|
</div>
|
57
57
|
', :html %>
|
@@ -119,31 +119,32 @@ $reveal-border-color: #666;', :css %>
|
|
119
119
|
|
120
120
|
</div>
|
121
121
|
</div>
|
122
|
+
</div>
|
123
|
+
<div class="large-3 pull-9 columns">
|
124
|
+
<%= render "_sidebar-components.html.erb" %>
|
125
|
+
</div>
|
126
|
+
</div>
|
122
127
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<div id="secondModal" class="reveal-modal">
|
132
|
-
<h2>This is a second modal.</h2>
|
133
|
-
<p>See? It just slides into place after the other first modal. Very handy when you need subsequent dialogs, or when a modal option impacts or requires another decision.</p>
|
134
|
-
<a class="close-reveal-modal">×</a>
|
135
|
-
</div>
|
128
|
+
<div id="firstModal" class="reveal-modal">
|
129
|
+
<h2>This is a modal.</h2>
|
130
|
+
<p>Reveal makes these very easy to summon and dismiss. The close button is simply an anchor with a unicode character icon and a class of <code>close-reveal-modal</code>. Clicking anywhere outside the modal will also dismiss it.</p>
|
131
|
+
<p>Finally, if your modal summons another Reveal modal, the plugin will handle that for you gracefully.</p>
|
132
|
+
<p><a href="#" data-reveal-id="secondModal" class="secondary button">Second Modal…</a></p>
|
133
|
+
<a class="close-reveal-modal">×</a>
|
134
|
+
</div>
|
136
135
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
136
|
+
<div id="secondModal" class="reveal-modal">
|
137
|
+
<h2>This is a second modal.</h2>
|
138
|
+
<p>See? It just slides into place after the other first modal. Very handy when you need subsequent dialogs, or when a modal option impacts or requires another decision.</p>
|
139
|
+
<a class="close-reveal-modal">×</a>
|
140
|
+
</div>
|
142
141
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<%= render "_sidebar-components.html.erb" %>
|
142
|
+
<div id="videoModal" class="reveal-modal large">
|
143
|
+
<h2>This modal has video</h2>
|
144
|
+
<div class="flex-video">
|
145
|
+
<iframe width="800" height="315" src="http://www.youtube.com/embed/IkOQw96cfyE" frameborder="0" allowfullscreen></iframe>
|
148
146
|
</div>
|
147
|
+
|
148
|
+
<a class="close-reveal-modal">×</a>
|
149
149
|
</div>
|
150
|
+
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<hr>
|
60
60
|
|
61
61
|
<h3>Sections Replace Accordion, Tabs & Vertical Nav</h3>
|
62
|
-
<p>Sections replace a few things that you are used to from Foundation 3. We've taken the accordion, the tabs and the vertical nav and combined them into this really flexible plugin that can handle all of those. The single JS file handles all the
|
62
|
+
<p>Sections replace a few things that you are used to from Foundation 3. We've taken the accordion, the tabs and the vertical nav and combined them into this really flexible plugin that can handle all of those. The single JS file handles all the interactions, but the classes you add to the element control how it gets rendered and styled across our breakpoint.</p>
|
63
63
|
|
64
64
|
<hr>
|
65
65
|
|
@@ -73,18 +73,20 @@
|
|
73
73
|
<p>There are two ways to build sections in Foundation 4, with our predefined HTML classes or with our structure and mixins. Building a sections using our predefined classes is super-easy, you just need to create a <code><div class="section-container" data-section></code> as a wrapper for the sections themselves. Inside of this wrapper, you'll create either a <code><section class="section"></code> or <code><div class="section"></code>. Within that you'll include some sort of <code>.title</code> (this can be headers or a paragragh) and a <code><div class="content"></code>. Here is the markup you'll need:</p>
|
74
74
|
|
75
75
|
<%= code_example '
|
76
|
-
<
|
77
|
-
<
|
78
|
-
|
79
|
-
<
|
80
|
-
|
81
|
-
</
|
82
|
-
|
83
|
-
<
|
84
|
-
|
85
|
-
<
|
86
|
-
|
87
|
-
</
|
76
|
+
<div class="section-container" data-section>
|
77
|
+
<section class="section">
|
78
|
+
<p class="title"><a href="#panel1">Section 1</a></p>
|
79
|
+
<div class="content">
|
80
|
+
<p>Content of section 1.</p>
|
81
|
+
</div>
|
82
|
+
</section>
|
83
|
+
<section class="section">
|
84
|
+
<p class="title"><a href="#panel2">Section 2</a></p>
|
85
|
+
<div class="content">
|
86
|
+
<p>Content of section 2.</p>
|
87
|
+
</div>
|
88
|
+
</section>
|
89
|
+
</div>', :html %>
|
88
90
|
|
89
91
|
<p>The class options:</p>
|
90
92
|
<ul class="disc">
|
@@ -95,6 +97,91 @@
|
|
95
97
|
|
96
98
|
<hr>
|
97
99
|
|
100
|
+
<h3>Variations</h3>
|
101
|
+
<h6>Tabs/Accordion</h6>
|
102
|
+
<p>Adding a <code>tabs</code> class to the section container will enable tabs on large screens and show an accordion on small screens.</p>
|
103
|
+
<%= code_example '
|
104
|
+
<div class="section-container tabs" data-section>
|
105
|
+
<section class="section">
|
106
|
+
<p class="title"><a href="#">Section 1</a></p>
|
107
|
+
<div class="content">
|
108
|
+
<p>Content of section 1.</p>
|
109
|
+
</div>
|
110
|
+
</section>
|
111
|
+
<section class="section">
|
112
|
+
<p class="title"><a href="#">Section 2</a></p>
|
113
|
+
<div class="content">
|
114
|
+
<p>Content of section 2.</p>
|
115
|
+
</div>
|
116
|
+
</section>
|
117
|
+
</div>', :html %>
|
118
|
+
|
119
|
+
<h6>Vertical Nav/Accordion</h6>
|
120
|
+
<p>Adding a <code>vertical-nav</code> class to the section container will enable vertical navigation elements on large screens and show an accordion on small screens.</p>
|
121
|
+
|
122
|
+
<p>Vertical navigation elements usually appear within the grid so the width can be controlled on desktop.</p>
|
123
|
+
|
124
|
+
<p>Use the <code>side-nav</code> class on the list to apply the Foundation navigation styles</p>
|
125
|
+
|
126
|
+
<%= code_example '
|
127
|
+
<div class="row">
|
128
|
+
<div class="large-3 columns">
|
129
|
+
<div class="section-container vertical-nav" data-section>
|
130
|
+
<section class="section">
|
131
|
+
<p class="title"><a href="#">Section 1</a></p>
|
132
|
+
<div class="content">
|
133
|
+
<ul class="side-nav">
|
134
|
+
<li><a href="#">Link 1</a></li>
|
135
|
+
<li><a href="#">Link 2</a></li>
|
136
|
+
<li><a href="#">Link 3</a></li>
|
137
|
+
<li class="divider"></li>
|
138
|
+
<li><a href="#">Link 1</a></li>
|
139
|
+
</ul>
|
140
|
+
</div>
|
141
|
+
</section>
|
142
|
+
<section class="section">
|
143
|
+
<p class="title"><a href="#">Section 2</a></p>
|
144
|
+
<div class="content">
|
145
|
+
<ul class="side-nav">
|
146
|
+
<li><a href="#">Link 1</a></li>
|
147
|
+
<li><a href="#">Link 2</a></li>
|
148
|
+
<li><a href="#">Link 3</a></li>
|
149
|
+
<li class="divider"></li>
|
150
|
+
<li><a href="#">Link 1</a></li>
|
151
|
+
</ul>
|
152
|
+
</div>
|
153
|
+
</section>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
<div class="large-9 columns">
|
157
|
+
<p>Content to the right of the navigation.</p>
|
158
|
+
</div>
|
159
|
+
</div>', :html %>
|
160
|
+
|
161
|
+
|
162
|
+
<h6>Deep Linking</h6>
|
163
|
+
<p>Set <code>deep-linking</code> to true to enable deep linking to sections of content. Deep linking allows visitors to visit a predefined URL with a hash that points to a particular section of the content. Deep linking also requires a matching <code>data-slug</code> on the content section that the hash shoudl point to, without the pound (#) sign.</p>
|
164
|
+
|
165
|
+
<%= code_example '
|
166
|
+
<div class="section-container" data-section data-options="deep_linking: true">
|
167
|
+
<section class="section">
|
168
|
+
<p class="title"><a href="#section1">Section 1</a></p>
|
169
|
+
<div class="content" data-slug="section1">
|
170
|
+
<p>Content of section 1.</p>
|
171
|
+
</div>
|
172
|
+
</section>
|
173
|
+
<section class="section">
|
174
|
+
<p class="title"><a href="#section2">Section 2</a></p>
|
175
|
+
<div class="content" data-slug="section2">
|
176
|
+
<p>Content of section 2.</p>
|
177
|
+
</div>
|
178
|
+
</section>
|
179
|
+
</div>', :html %>
|
180
|
+
|
181
|
+
<p class="panel"><strong>Note:</strong> The <code>section</code> element can be replaced with a <code>div.section</code> element if you do not want to use HTML5 elements.</p>
|
182
|
+
|
183
|
+
<hr>
|
184
|
+
|
98
185
|
<h5>Default SCSS Variables</h5>
|
99
186
|
<%= code_example '
|
100
187
|
/* We use these to set padding and hover factor */
|
@@ -123,7 +210,7 @@ $section-bottom-margin: emCalc(20px);
|
|
123
210
|
<hr>
|
124
211
|
|
125
212
|
<h3>Using the JavaScript</h3>
|
126
|
-
<p>You don't need ths JS to create
|
213
|
+
<p>You don't need ths JS to create sections with Foundation. The only reason you'll need to include <code>foundation.section.js</code> is if you want to add the ability to close an alert. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the sections plugin. Above your closing <code></body></code> tag include the following line of code and make sure you have the JS in your directory.</p>
|
127
214
|
|
128
215
|
<p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
|
129
216
|
|
@@ -132,9 +219,31 @@ $section-bottom-margin: emCalc(20px);
|
|
132
219
|
<p>Then, you'll need to add a data-attribute to make the JS work properly on that element. That looks like:</p>
|
133
220
|
|
134
221
|
<%= code_example '
|
135
|
-
<div
|
136
|
-
|
137
|
-
|
222
|
+
<div class="section-container" data-section>
|
223
|
+
<section class="section">
|
224
|
+
<p class="title"><a href="#panel1">Section 1</a></p>
|
225
|
+
<div class="content">
|
226
|
+
<ul class="side-nav">
|
227
|
+
<li><a href="#">Link 1</a></li>
|
228
|
+
<li><a href="#">Link 2</a></li>
|
229
|
+
<li><a href="#">Link 3</a></li>
|
230
|
+
<li class="divider"></li>
|
231
|
+
<li><a href="#">Link 1</a></li>
|
232
|
+
</ul>
|
233
|
+
</div>
|
234
|
+
</section>
|
235
|
+
<section class="section">
|
236
|
+
<p class="title"><a href="#panel2">Section 2</a></p>
|
237
|
+
<div class="content">
|
238
|
+
<ul class="side-nav">
|
239
|
+
<li><a href="#">Link 1</a></li>
|
240
|
+
<li><a href="#">Link 2</a></li>
|
241
|
+
<li><a href="#">Link 3</a></li>
|
242
|
+
<li class="divider"></li>
|
243
|
+
<li><a href="#">Link 1</a></li>
|
244
|
+
</ul>
|
245
|
+
</div>
|
246
|
+
</section>
|
138
247
|
</div>
|
139
248
|
', :html %>
|
140
249
|
|
data/docs/controller.rb
CHANGED
@@ -10,8 +10,10 @@ ignore /compile.rb/
|
|
10
10
|
|
11
11
|
helpers do
|
12
12
|
def asset_path
|
13
|
-
if
|
14
|
-
|
13
|
+
if @_stasis.options[:asset_path]
|
14
|
+
@_stasis.options[:asset_path]
|
15
|
+
elsif Socket.gethostname == "foundation"
|
16
|
+
"http://foundation.zurb.com/docs/assets"
|
15
17
|
else
|
16
18
|
"http://#{Socket.ip_address_list.detect{|intf| intf.ipv4_private?}.getnameinfo[0]}:4001/assets"
|
17
19
|
end
|
@@ -20,23 +22,23 @@ helpers do
|
|
20
22
|
def code_example(code, lang=:ruby)
|
21
23
|
"<div class='#{lang}'>" + CodeRay.scan(code, lang).div(:css => :class) + "</div>"
|
22
24
|
end
|
23
|
-
|
25
|
+
|
24
26
|
def foundation_home_path
|
25
27
|
'/'
|
26
28
|
end
|
27
|
-
|
29
|
+
|
28
30
|
def features_path
|
29
31
|
'/grid.php'
|
30
32
|
end
|
31
|
-
|
33
|
+
|
32
34
|
def add_ons_path
|
33
35
|
'/templates.php'
|
34
36
|
end
|
35
|
-
|
37
|
+
|
36
38
|
def case_studies_path
|
37
39
|
'/case-jacquelinewest.php'
|
38
40
|
end
|
39
|
-
|
41
|
+
|
40
42
|
def docs_path
|
41
43
|
'/docs/'
|
42
44
|
end
|