jekyll 1.0.0.rc1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

Files changed (72) hide show
  1. data/CONTRIBUTING.md +1 -1
  2. data/History.txt +15 -1
  3. data/Rakefile +0 -4
  4. data/bin/jekyll +3 -3
  5. data/features/pagination.feature +5 -5
  6. data/features/step_definitions/jekyll_steps.rb +1 -1
  7. data/jekyll.gemspec +9 -6
  8. data/lib/jekyll.rb +1 -2
  9. data/lib/jekyll/commands/new.rb +4 -0
  10. data/lib/jekyll/configuration.rb +3 -1
  11. data/lib/jekyll/converters/markdown/redcarpet_parser.rb +1 -0
  12. data/lib/jekyll/convertible.rb +66 -36
  13. data/lib/jekyll/deprecator.rb +9 -0
  14. data/lib/jekyll/filters.rb +17 -4
  15. data/lib/jekyll/generators/pagination.rb +17 -5
  16. data/lib/jekyll/logger.rb +3 -1
  17. data/lib/jekyll/page.rb +1 -13
  18. data/lib/jekyll/post.rb +67 -49
  19. data/lib/jekyll/site.rb +3 -3
  20. data/lib/jekyll/tags/highlight.rb +2 -0
  21. data/lib/jekyll/tags/post_url.rb +25 -7
  22. data/lib/site_template/.gitignore +1 -0
  23. data/lib/site_template/_config.yml +1 -0
  24. data/lib/site_template/_layouts/default.html +44 -36
  25. data/lib/site_template/_layouts/post.html +3 -0
  26. data/lib/site_template/css/main.css +165 -0
  27. data/site/_includes/docs_contents.html +4 -1
  28. data/site/_includes/docs_contents_mobile.html +36 -0
  29. data/site/_includes/footer.html +10 -10
  30. data/site/_includes/header.html +7 -15
  31. data/site/_includes/primary-nav-items.html +11 -0
  32. data/site/_includes/top.html +2 -1
  33. data/site/_layouts/default.html +1 -1
  34. data/site/_layouts/docs.html +4 -2
  35. data/site/_posts/2012-07-01-configuration.md +18 -8
  36. data/site/_posts/2012-07-01-contributing.md +22 -6
  37. data/site/_posts/2012-07-01-extras.md +3 -2
  38. data/site/_posts/2012-07-01-frontmatter.md +7 -2
  39. data/site/_posts/2012-07-01-home.md +4 -4
  40. data/site/_posts/2012-07-01-installation.md +6 -6
  41. data/site/_posts/2012-07-01-migrations.md +64 -23
  42. data/site/_posts/2012-07-01-pages.md +2 -2
  43. data/site/_posts/2012-07-01-pagination.md +6 -1
  44. data/site/_posts/2012-07-01-permalinks.md +6 -0
  45. data/site/_posts/2012-07-01-plugins.md +9 -1
  46. data/site/_posts/2012-07-01-resources.md +1 -4
  47. data/site/_posts/2012-07-01-structure.md +3 -1
  48. data/site/_posts/2012-07-01-templates.md +2 -1
  49. data/site/_posts/2012-07-01-troubleshooting.md +20 -2
  50. data/site/_posts/2012-07-01-upgrading.md +104 -0
  51. data/site/_posts/2012-07-01-usage.md +1 -1
  52. data/site/_posts/2012-07-01-variables.md +18 -9
  53. data/site/css/gridism.css +110 -0
  54. data/site/css/style.css +236 -101
  55. data/site/img/footer-logo.png +0 -0
  56. data/site/img/octojekyll.png +0 -0
  57. data/site/index.html +51 -43
  58. data/test/helper.rb +1 -0
  59. data/test/source/_posts/es/2008-11-21-nested.textile +8 -0
  60. data/test/test_convertible.rb +1 -1
  61. data/test/test_filters.rb +34 -11
  62. data/test/test_generated_site.rb +13 -2
  63. data/test/test_kramdown.rb +4 -2
  64. data/test/test_pager.rb +4 -2
  65. data/test/test_post.rb +2 -2
  66. data/test/test_site.rb +7 -6
  67. data/test/test_tags.rb +30 -0
  68. metadata +12 -12
  69. data/lib/site_template/css/screen.css +0 -189
  70. data/lib/site_template/images/.gitkeep +0 -0
  71. data/lib/site_template/images/rss.png +0 -0
  72. data/site/css/grid.css +0 -62
@@ -35,8 +35,8 @@ There are two main ways of creating pages:
35
35
  - Create a folder in the site's root for each page, and place an index.html file
36
36
  in each page folder.
37
37
 
38
- Both methods work fine (and can be used in conjunction with each other), with the
39
- only real difference being the resulting URLs.
38
+ Both methods work fine (and can be used in conjunction with each other),
39
+ with the only real difference being the resulting URLs.
40
40
 
41
41
  ### Named HTML files
42
42
 
@@ -36,6 +36,7 @@ page in the generated site.
36
36
  The pagination plugin exposes the `paginator` liquid object with the following
37
37
  attributes:
38
38
 
39
+ <div class="mobile-side-scroller">
39
40
  <table>
40
41
  <thead>
41
42
  <tr>
@@ -102,10 +103,14 @@ attributes:
102
103
  </tr>
103
104
  </tbody>
104
105
  </table>
106
+ </div>
105
107
 
106
108
  <div class="note info">
107
109
  <h5>Pagination does not support tags or categories</h5>
108
- <p>Pagination pages through every post in the <code>posts</code> variable regardless of variables defined in the YAML Front Matter of each. It does not currently allow paging over groups of posts linked by a common tag or category.</p>
110
+ <p>Pagination pages through every post in the <code>posts</code>
111
+ variable regardless of variables defined in the YAML Front Matter of
112
+ each. It does not currently allow paging over groups of posts linked
113
+ by a common tag or category.</p>
109
114
  </div>
110
115
 
111
116
  ## Render the paginated Posts
@@ -17,6 +17,7 @@ permalink is defined as `/:categories/:year/:month/:day/:title.html`.
17
17
 
18
18
  ## Template variables
19
19
 
20
+ <div class="mobile-side-scroller">
20
21
  <table>
21
22
  <thead>
22
23
  <tr>
@@ -87,9 +88,11 @@ permalink is defined as `/:categories/:year/:month/:day/:title.html`.
87
88
  </tr>
88
89
  </tbody>
89
90
  </table>
91
+ </div>
90
92
 
91
93
  ## Built-in permalink styles
92
94
 
95
+ <div class="mobile-side-scroller">
93
96
  <table>
94
97
  <thead>
95
98
  <tr>
@@ -124,11 +127,13 @@ permalink is defined as `/:categories/:year/:month/:day/:title.html`.
124
127
  </tr>
125
128
  </tbody>
126
129
  </table>
130
+ </div>
127
131
 
128
132
  ## Permalink style examples
129
133
 
130
134
  Given a post named: `/2009-04-29-slap-chop.textile`
131
135
 
136
+ <div class="mobile-side-scroller">
132
137
  <table>
133
138
  <thead>
134
139
  <tr>
@@ -171,3 +176,4 @@ Given a post named: `/2009-04-29-slap-chop.textile`
171
176
  </tr>
172
177
  </tbody>
173
178
  </table>
179
+ </div>
@@ -80,6 +80,7 @@ using the `category_index.html` layout.
80
80
 
81
81
  Generators are only required to implement one method:
82
82
 
83
+ <div class="mobile-side-scroller">
83
84
  <table>
84
85
  <thead>
85
86
  <tr>
@@ -98,6 +99,7 @@ Generators are only required to implement one method:
98
99
  </tr>
99
100
  </tbody>
100
101
  </table>
102
+ </div>
101
103
 
102
104
  ## Converters
103
105
 
@@ -139,6 +141,7 @@ end
139
141
 
140
142
  Converters should implement at a minimum 3 methods:
141
143
 
144
+ <div class="mobile-side-scroller">
142
145
  <table>
143
146
  <thead>
144
147
  <tr>
@@ -178,6 +181,7 @@ Converters should implement at a minimum 3 methods:
178
181
  </tr>
179
182
  </tbody>
180
183
  </table>
184
+ </div>
181
185
 
182
186
  In our example, `UpcaseConverter#matches` checks if our filename extension is
183
187
  `.upcase`, and will render using the converter if it is. It will call
@@ -212,6 +216,7 @@ Liquid::Template.register_tag('render_time', Jekyll::RenderTimeTag)
212
216
 
213
217
  At a minimum, liquid tags must implement:
214
218
 
219
+ <div class="mobile-side-scroller">
215
220
  <table>
216
221
  <thead>
217
222
  <tr>
@@ -230,6 +235,7 @@ At a minimum, liquid tags must implement:
230
235
  </tr>
231
236
  </tbody>
232
237
  </table>
238
+ </div>
233
239
 
234
240
  You must also register the custom tag with the Liquid template engine as
235
241
  follows:
@@ -286,6 +292,7 @@ Liquid::Template.register_filter(Jekyll::AssetFilter)
286
292
 
287
293
  There are two flags to be aware of when writing a plugin:
288
294
 
295
+ <div class="mobile-side-scroller">
289
296
  <table>
290
297
  <thead>
291
298
  <tr>
@@ -325,6 +332,7 @@ There are two flags to be aware of when writing a plugin:
325
332
  </tr>
326
333
  </tbody>
327
334
  </table>
335
+ </div>
328
336
 
329
337
  To use one of the example plugins above as an illustration, here is how you’d
330
338
  specify these two flags:
@@ -379,7 +387,7 @@ There are a few useful, prebuilt plugins at the following locations:
379
387
  - [Full-text search by Pascal Widdershoven](https://github.com/PascalW/jekyll_indextank): Add full-text search to your Jekyll site with this plugin and a bit of JavaScript.
380
388
  - [Stylus Converter](https://gist.github.com/988201) Convert .styl to .css.
381
389
  - [Embed.ly client by Robert Böhnke](https://github.com/robb/jekyll-embedly-client) Autogenerate embeds from URLs using oEmbed.
382
- - [Logarithmic Tag Cloud](https://gist.github.com/2290195): Flexible. Logarithmic distribution. Usage eg: `{{ "{% tag_cloud font-size: 50 - 150%, threshold: 2 " }}%}`. Documentation inline.
390
+ - [Logarithmic Tag Cloud](https://gist.github.com/2290195): Flexible. Logarithmic distribution. Documentation inline.
383
391
  - [Related Posts by Lawrence Woodman](https://github.com/LawrenceWoodman/related_posts-jekyll_plugin): Overrides `site.related_posts` to use categories to assess relationship
384
392
  - [AliasGenerator by Thomas Mango](https://github.com/tsmango/jekyll_alias_generator): Generates redirect pages for posts when an alias configuration is specified in the YAML Front Matter.
385
393
  - [FlickrSetTag by Thomas Mango](https://github.com/tsmango/jekyll_flickr_set_tag): Generates image galleries from Flickr sets.
@@ -2,16 +2,13 @@
2
2
  layout: docs
3
3
  title: Resources
4
4
  prev_section: sites
5
+ next_section: upgrading
5
6
  ---
6
7
 
7
8
  Jekyll’s growing use is producing a wide variety of tutorials, frameworks, extensions, examples, and other resources that can be very helpful. Below is a collection of links to some of the most popular Jekyll resources.
8
9
 
9
10
  ### Jekyll tips & tricks, and examples
10
11
 
11
- - [A simple way to add draft posts](https://gist.github.com/2870636)
12
-
13
- No plugins required.
14
-
15
12
  - [Tips for working with GitHub Pages Integration](https://gist.github.com/2890453)
16
13
 
17
14
  Code example reuse, and keeping documentation up to date.
@@ -9,7 +9,7 @@ Jekyll is, at its core, a text transformation engine. The concept behind the
9
9
  system is this: you give it text written in your favorite markup language, be
10
10
  that Markdown, Textile, or just plain HTML, and it churns that through a layout
11
11
  or series of layout files. Throughout that process you can tweak how you want
12
- the site URLs to look, what data gets displayed in the layout and more. This is
12
+ the site URLs to look, what data gets displayed in the layout, and more. This is
13
13
  all done through editing text files, and the static web site is the final
14
14
  product.
15
15
 
@@ -33,6 +33,7 @@ A basic Jekyll site usually looks something like this:
33
33
 
34
34
  An overview of what each of these does:
35
35
 
36
+ <div class="mobile-side-scroller">
36
37
  <table>
37
38
  <thead>
38
39
  <tr>
@@ -153,3 +154,4 @@ An overview of what each of these does:
153
154
  </tr>
154
155
  </tbody>
155
156
  </table>
157
+ </div>
@@ -13,6 +13,7 @@ common tasks easier.
13
13
 
14
14
  ## Filters
15
15
 
16
+ <div class="mobile-side-scroller">
16
17
  <table>
17
18
  <thead>
18
19
  <tr>
@@ -143,6 +144,7 @@ common tasks easier.
143
144
  </tr>
144
145
  </tbody>
145
146
  </table>
147
+ </div>
146
148
 
147
149
  ## Tags
148
150
 
@@ -231,4 +233,3 @@ You can also use this tag to create a link to a post in Markdown as follows:
231
233
  [Name of Link]({% post_url 2010-07-21-name-of-post %})
232
234
  {% endraw %}
233
235
  {% endhighlight %}
234
-
@@ -50,7 +50,23 @@ On Debian or Ubuntu, you may need to add /var/lib/gems/1.8/bin/ to your path in
50
50
 
51
51
  ## Base-URL Problems
52
52
 
53
- If you are using base-url option like `jekyll serve --baseurl '/blog'` then make sure that you access the site at `http://localhost:4000/blog/index.html`. Just accessing `http://localhost:4000/blog` will not work.
53
+ If you are using base-url option like:
54
+
55
+ {% highlight bash %}
56
+ jekyll serve --baseurl '/blog'
57
+ {% endhighlight %}
58
+
59
+ … then make sure that you access the site at:
60
+
61
+ {% highlight bash %}
62
+ http://localhost:4000/blog/index.html
63
+ {% endhighlight %}
64
+
65
+ It won’t work to just access:
66
+
67
+ {% highlight bash %}
68
+ http://localhost:4000/blog
69
+ {% endhighlight %}
54
70
 
55
71
  ## Configuration problems
56
72
 
@@ -74,7 +90,9 @@ problems.
74
90
  If your link has characters that need to be escaped, you need to use
75
91
  this syntax:
76
92
 
77
- `![Alt text](http://yuml.me/diagram/class/[Project]->[Task])`
93
+ {% highlight text %}
94
+ ![Alt text](http://yuml.me/diagram/class/[Project]->[Task])
95
+ {% endhighlight %}
78
96
 
79
97
  If you have an empty tag, i.e. `<script src="js.js"></script>`, Maruku
80
98
  transforms this into `<script src="js.js" />`. This causes problems in
@@ -0,0 +1,104 @@
1
+ ---
2
+ layout: docs
3
+ title: Upgrading
4
+ prev_section: resources
5
+ ---
6
+
7
+ Upgrading from an older version of Jekyll? A few things have changed in 1.0.0
8
+ that you'll want to know about.
9
+
10
+
11
+ <div class="note feature">
12
+ <h5 markdown="1">Diving in</h5>
13
+ <p markdown="1">Want to get a new Jekyll site up and running quickly? Simply
14
+ run <code>jekyll new SITENAME</code> to create a new folder with a bare bones
15
+ Jekyll site.</p>
16
+ </div>
17
+
18
+ ### The Jekyll Command
19
+
20
+ For better clarity, Jekyll now accepts the commands `build` and `serve`.
21
+ Whereas before you might simply run the command `jekyll` to generate a site
22
+ and `jekyll --server` to view it locally, now use the subcommands `jekyll build`
23
+ and `jekyll serve` to do the same. And if you want Jekyll to automatically
24
+ rebuild each time a file changes, just add the `--watch` flag at the end.
25
+
26
+ <div class="note info">
27
+ <h5 markdown="1">Watching and Serving</h5>
28
+ <p markdown="1">With the new subcommands, the way sites are previewed locally
29
+ changed a bit. Instead of specifying `server: true` in the site's
30
+ configuration file, use `jekyll serve`. The same hold's true for
31
+ `watch: true`. Instead, use the `--watch` flag with either `jekyll serve`
32
+ or `jekyll build`.</p>
33
+ </div>
34
+
35
+ ### Custom Config File
36
+
37
+ Rather than passing individual flags via the command line, you can now pass an
38
+ entire custom Jekyll config file. This helps to distinguish between
39
+ environments, or lets you programmatically override user-specified defaults.
40
+ Simply add the `--config` flag to the `jekyll` command, followed by the path
41
+ to one or more config files (comma-deliminated, no spaces).
42
+
43
+ #### As a result, the following command line flags are now deprecated:
44
+
45
+ * `--no-server`
46
+ * `--no-auto`
47
+ * `--auto` (now `--watch`)
48
+ * `--server`
49
+ * `--url=`
50
+ * `--maruku`, `--rdiscount`, and `--redcarpet`
51
+ * `--pygments`
52
+ * `--permalink=`
53
+ * `--paginate`
54
+
55
+ <div class="note info">
56
+ <h5 markdown="1">The `--config` explicitly specifies your configuration file(s)</h5>
57
+ <p markdown="1">If you use the `--config` flag, Jekyll will ignore your
58
+ `config.yml` file. Want to merge a custom configuration with the normal
59
+ configuration? No problem. Jekyll will accept more than one custom config
60
+ file via the command line. Config files cascade from right to left, such
61
+ that if I run `jekyll serve --config config.yml,config-dev.yml`,
62
+ the values in the config files on the right (`config-dev.yml`) overwrite
63
+ those on the left (`config.yml`) when both contain the same key.</p>
64
+ </div>
65
+
66
+ ### Draft posts
67
+
68
+ Jekyll now lets you write draft posts, and allows you to easily preview how
69
+ they will look prior to publishing. To start a draft, simply create a folder
70
+ called `_drafts` in your site's source directory (e.g., alongside `_posts`),
71
+ and add a new markdown file to it. To preview your new post, simply run the
72
+ `Jekyll serve` command with the `--drafts` flag.
73
+
74
+ <div class="note info">
75
+ <h5 markdown="1">Drafts don't have dates</h5>
76
+ <p markdown="1">Unlike posts, drafts don't have a date, since they haven't
77
+ been published yet. Rather than naming your draft something like
78
+ `2013-07-01-my-draft-post.md`, simply name the file what you'd like your
79
+ post to eventually be titled, here `my-draft-post.md`.</p>
80
+ </div>
81
+
82
+ ### Baseurl
83
+
84
+ Often, you'll want the ability to run a Jekyll site in multiple places, such as
85
+ previewing locally before pushing to GitHub Pages. Jekyll 1.0 makes that
86
+ easier with the new `--baseurl` flag. To take advantage of this feature, first
87
+ add the production `baseurl` to your site's `_config.yml` file. Then,
88
+ throughout the site, simply prefix relative URLs with `{{ site.baseurl }}`.
89
+ When you're ready to preview your site locally, pass along the `--baseurl` flag
90
+ with your local baseurl (most likely `/`) to `jekyll serve` and Jekyll will
91
+ swap in whatever you've passed along, ensuring all your links work as you'd
92
+ expect in both environments.
93
+
94
+
95
+ <div class="note warning">
96
+ <h5 markdown="1">All page and post URLs contain leading slashes</h5>
97
+ <p markdown="1">If you use the method described above, please remember
98
+ that the URLs for all posts and pages contain a leading slash. Therefore,
99
+ concatenating the site baseurl and the post/page url where
100
+ `site.baseurl = /` and `post.url = /2013/06/05/my-fun-post/` will
101
+ result in two leading slashes, which will break links. It is thus
102
+ suggested that prefixing with `site.baseurl` only be used when the
103
+ `baseurl` is something other than the default of `/`.</p>
104
+ </div>
@@ -20,7 +20,7 @@ $ jekyll build --source <source> --destination <destination>
20
20
 
21
21
  $ jekyll build --watch
22
22
  # => The current folder will be generated into ./_site,
23
- # and watch for changes and regenerate automatically.
23
+ # watched for changes, and regenerated automatically.
24
24
  {% endhighlight %}
25
25
 
26
26
  Jekyll also comes with a built-in development server that will allow you to
@@ -13,11 +13,12 @@ following is a reference of the available data.
13
13
 
14
14
  ## Global Variables
15
15
 
16
+ <div class="mobile-side-scroller">
16
17
  <table>
17
18
  <thead>
18
19
  <tr>
19
- <td>Variable</td>
20
- <td>Description</td>
20
+ <th>Variable</th>
21
+ <th>Description</th>
21
22
  </tr>
22
23
  </thead>
23
24
  <tbody>
@@ -61,14 +62,16 @@ following is a reference of the available data.
61
62
  </tr>
62
63
  </tbody>
63
64
  </table>
65
+ </div>
64
66
 
65
67
  ## Site Variables
66
68
 
69
+ <div class="mobile-side-scroller">
67
70
  <table>
68
71
  <thead>
69
72
  <tr>
70
- <td>Variable</td>
71
- <td>Description</td>
73
+ <th>Variable</th>
74
+ <th>Description</th>
72
75
  </tr>
73
76
  </thead>
74
77
  <tbody>
@@ -132,14 +135,16 @@ following is a reference of the available data.
132
135
  </tr>
133
136
  </tbody>
134
137
  </table>
138
+ </div>
135
139
 
136
140
  ## Page Variables
137
141
 
142
+ <div class="mobile-side-scroller">
138
143
  <table>
139
144
  <thead>
140
145
  <tr>
141
- <td>Variable</td>
142
- <td>Description</td>
146
+ <th>Variable</th>
147
+ <th>Description</th>
143
148
  </tr>
144
149
  </thead>
145
150
  <tbody>
@@ -171,7 +176,8 @@ following is a reference of the available data.
171
176
  <td><p><code>page.url</code></p></td>
172
177
  <td><p>
173
178
 
174
- The URL of the Post without the domain. e.g.
179
+ The URL of the Post without the domain, but
180
+ with a leading slash, e.g.
175
181
  <code>/2008/12/14/my-post.html</code>
176
182
 
177
183
  </p></td>
@@ -229,6 +235,7 @@ following is a reference of the available data.
229
235
  </tr>
230
236
  </tbody>
231
237
  </table>
238
+ </div>
232
239
 
233
240
  <div class="note">
234
241
  <h5>ProTip™: Use custom front-matter</h5>
@@ -244,11 +251,12 @@ following is a reference of the available data.
244
251
 
245
252
  ## Paginator
246
253
 
254
+ <div class="mobile-side-scroller">
247
255
  <table>
248
256
  <thead>
249
257
  <tr>
250
- <td>Variable</td>
251
- <td>Description</td>
258
+ <th>Variable</th>
259
+ <th>Description</th>
252
260
  </tr>
253
261
  </thead>
254
262
  <tbody>
@@ -290,6 +298,7 @@ following is a reference of the available data.
290
298
  </tr>
291
299
  </tbody>
292
300
  </table>
301
+ </div>
293
302
 
294
303
  <div class="note info">
295
304
  <h5>Paginator variable availability</h5>
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Gridism
3
+ * A simple, responsive, and handy CSS grid by @cobyism
4
+ * https://github.com/cobyism/gridism
5
+ */
6
+
7
+ /* Preserve some sanity */
8
+ .grid,
9
+ .unit {
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ /* Set up some rules to govern the grid */
16
+ .grid {
17
+ display: block;
18
+ clear: both;
19
+ }
20
+ .grid .unit {
21
+ float: left;
22
+ width: 100%;
23
+ padding: 10px;
24
+ }
25
+
26
+ /* This ensures the outer gutters are equal to the (doubled) inner gutters. */
27
+ .grid .unit:first-child { padding-left: 20px; }
28
+ .grid .unit:last-child { padding-right: 20px; }
29
+
30
+ /* Nested grids already have padding though, so let’s nuke it */
31
+ .unit .unit:first-child { padding-left: 0; }
32
+ .unit .unit:last-child { padding-right: 0; }
33
+ .unit .grid:first-child > .unit { padding-top: 0; }
34
+ .unit .grid:last-child > .unit { padding-bottom: 0; }
35
+
36
+ /* Let people nuke the gutters/padding completely in a couple of ways */
37
+ .no-gutters .unit,
38
+ .unit.no-gutters {
39
+ padding: 0 !important;
40
+ }
41
+
42
+ /* Wrapping at a maximum width is optional */
43
+ .wrap .grid,
44
+ .grid.wrap {
45
+ max-width: 978px;
46
+ margin: 0 auto;
47
+ }
48
+
49
+ /* Width classes also have shorthand versions numbered as fractions
50
+ * For example: for a grid unit 1/3 (one third) of the parent width,
51
+ * simply apply class="w-1-3" to the element. */
52
+ .grid .whole, .grid .w-1-1 { width: 100%; }
53
+ .grid .half, .grid .w-1-2 { width: 50%; }
54
+ .grid .one-third, .grid .w-1-3 { width: 33.3332%; }
55
+ .grid .two-thirds, .grid .w-2-3 { width: 66.6665%; }
56
+ .grid .one-quarter, .grid .w-1-4 { width: 25%; }
57
+ .grid .three-quarters, .grid .w-3-4 { width: 75%; }
58
+ .grid .one-fifth, .grid .w-1-5 { width: 20%; }
59
+ .grid .two-fifths, .grid .w-2-5 { width: 40%; }
60
+ .grid .three-fifths, .grid .w-3-5 { width: 60%; }
61
+ .grid .four-fifths, .grid .w-4-5 { width: 80%; }
62
+ .grid .golden-small, .grid .w-g-s { width: 38.2716%; } /* Golden section: smaller piece */
63
+ .grid .golden-large, .grid .w-g-l { width: 61.7283%; } /* Golden section: larger piece */
64
+
65
+ /* Utility classes */
66
+ .align-center { text-align: center; }
67
+ .align-left { text-align: left; }
68
+ .align-right { text-align: right; }
69
+ .pull-left { float: left; }
70
+ .pull-right { float: right; }
71
+
72
+ .show-on-mobiles {
73
+ display: none;
74
+ }
75
+
76
+ /* Responsive Stuff */
77
+ @media screen and (max-width: 568px) {
78
+ /* Stack anything that isn’t full-width on smaller screens */
79
+ .grid .unit {
80
+ width: 100% !important;
81
+ padding-left: 20px;
82
+ padding-right: 20px;
83
+ }
84
+ .unit .grid .unit {
85
+ padding-left: 0px;
86
+ padding-right: 0px;
87
+ }
88
+
89
+ /* Sometimes, you just want to be different on small screens */
90
+ .center-on-mobiles {
91
+ text-align: center !important;
92
+ }
93
+ .hide-on-mobiles {
94
+ display: none !important;
95
+ }
96
+ .show-on-mobiles {
97
+ display: block !important;
98
+ }
99
+ a .show-on-mobiles {
100
+ display: inline !important;
101
+ }
102
+ }
103
+
104
+ /* Expand the wrap a bit further on larger screens */
105
+ /*@media screen and (min-width: 1180px) {
106
+ .wrap .grid {
107
+ max-width: 1180px;
108
+ margin: 0 auto;
109
+ }
110
+ }*/