octopress-genesis-theme 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +56 -15
- data/assets/config.yml +7 -0
- data/assets/includes/index-post.html +6 -4
- data/assets/includes/post-nav.html +2 -2
- data/assets/includes/primary-nav.html +2 -2
- data/assets/includes/social/page-header.html +1 -0
- data/assets/includes/social/post-footer.html +1 -0
- data/assets/includes/social/post-header.html +1 -0
- data/assets/layouts/default.html +4 -4
- data/assets/layouts/page.html +3 -5
- data/assets/layouts/paginated-posts.html +2 -2
- data/assets/layouts/post.html +18 -8
- data/assets/pages/index.html +2 -2
- data/assets/stylesheets/_colors.scss +13 -1
- data/assets/stylesheets/_entry.scss +85 -0
- data/assets/stylesheets/_fonts.scss +3 -0
- data/assets/stylesheets/_grid.scss +153 -0
- data/assets/stylesheets/_header.scss +50 -0
- data/assets/stylesheets/_layout.scss +18 -10
- data/assets/stylesheets/_post-nav.scss +38 -0
- data/assets/stylesheets/_sizes.scss +6 -4
- data/assets/stylesheets/_theme.scss +20 -11
- data/assets/stylesheets/_typography.scss +90 -0
- data/assets/stylesheets/index.scss +11 -0
- data/demo/Gemfile +1 -1
- data/demo/_config.yml +1 -0
- data/demo/_plugins/theme/config.yml +6 -2
- data/demo/_plugins/theme/stylesheets/_colors.scss +16 -0
- data/demo/_plugins/theme/stylesheets/_entry.scss +85 -0
- data/demo/_plugins/theme/stylesheets/_header.scss +51 -0
- data/demo/_plugins/theme/stylesheets/_post-nav.scss +38 -0
- data/demo/_plugins/theme/stylesheets/_sizes.scss +17 -0
- data/demo/_plugins/theme/stylesheets/_typography.scss +91 -0
- data/demo/_plugins/theme/stylesheets/index.scss +16 -0
- data/demo/_posts/2014-08-03-dang-that-was-fast.md +17 -0
- data/demo/_posts/2014-08-03-hi-guys.markdown +1 -0
- data/demo/images/panorama.jpg +0 -0
- data/demo/page.html +175 -0
- data/lib/octopress-genesis/version.rb +1 -1
- metadata +21 -5
- data/demo/_plugins/theme/stylesheets/_layout.scss +0 -63
- data/demo/_plugins/theme/stylesheets/_theme.scss +0 -19
- data/demo/_posts/2014-08-03-dang-that-was-fast.markdown +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d44474e2d922073c99ef5837f3d6a516ce9116fa
|
4
|
+
data.tar.gz: 9b74336892b62ea103047bb62f71e373b4099414
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c8e7718cf9bf8b7ee291af3a82e8b6fe76f981cef5fd1f19dfdf729d8a35d8b64230ce2c5ec553847d74796158d66ddcfcc85493567ecc126706b9c5d2c5ebe
|
7
|
+
data.tar.gz: b54e9dc8daca7c709576a228d7160c182cfa804a73e359b0c6897b6ba81c0fd3b16036ad9fb3ae072ddfab2978d5ebd8048edb6be123614e656b7bc8b24a03ed
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,29 +2,70 @@
|
|
2
2
|
|
3
3
|
A new theme build on Octopress Ink.
|
4
4
|
|
5
|
-
|
6
|
-
- Add support for Javascript embedded comment integration.
|
7
|
-
- Add support for social embeds.
|
8
|
-
- Add tall site footer design with support for social integration.
|
9
|
-
- Add stylesheets.
|
10
|
-
- Add page layout.
|
11
|
-
- Add sections (recent posts).
|
12
|
-
- Add system for searching.
|
13
|
-
- Add footer navigation.
|
5
|
+
Note: This theme is in alpha development. What's left to do? See [the issues](https://github.com/octopress/genesis-theme/issues/).
|
14
6
|
|
15
7
|
## Installation
|
16
8
|
|
17
|
-
|
9
|
+
Add this line to your application's Gemfile:
|
18
10
|
|
19
|
-
|
20
|
-
2. Install gems, `bundle install`
|
21
|
-
3. Check out the demo `cd demo; bundle exec jekyll build`
|
11
|
+
gem 'octopress-genesis-theme'
|
22
12
|
|
23
|
-
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install octopress-genesis-theme
|
20
|
+
|
21
|
+
Next add it to your gems list in Jekyll's `_config.yml`
|
22
|
+
|
23
|
+
gems:
|
24
|
+
- octopress-genesis-theme
|
24
25
|
|
25
26
|
## Usage
|
26
27
|
|
27
|
-
|
28
|
+
This is best demonstrated on a new Jekyll site:
|
29
|
+
|
30
|
+
- Create a new Jekyll site.
|
31
|
+
- Add some posts or pages.
|
32
|
+
- Ensure that posts have the layout `theme:post`, and pages `theme:page`
|
33
|
+
- Run `jekyll server` and check it out.
|
34
|
+
|
35
|
+
## Configuration
|
36
|
+
|
37
|
+
To configure this theme, create a `_plugins/theme/config.yml` and add your settings. Here are
|
38
|
+
the defaults.
|
39
|
+
|
40
|
+
```yaml
|
41
|
+
# Settings for main header
|
42
|
+
header:
|
43
|
+
title: My Octopress Blog
|
44
|
+
subtitle: A clever subtitle (optional)
|
45
|
+
|
46
|
+
# Links for main navigation
|
47
|
+
nav:
|
48
|
+
- { url: '/', title: 'Home' }
|
49
|
+
- { url: '/archive', title: 'Archive' }
|
50
|
+
- { url: '/feed', title: 'RSS' }
|
51
|
+
|
52
|
+
# Settings for category index generator
|
53
|
+
category:
|
54
|
+
prefix: Category
|
55
|
+
url: category
|
56
|
+
|
57
|
+
post_index:
|
58
|
+
excerpt_posts: true
|
59
|
+
permalink_label: "Permalink"
|
60
|
+
read_more_label: "Continue Reading →"
|
61
|
+
|
62
|
+
# Center the text in post and page headings.
|
63
|
+
center-headings: true
|
64
|
+
```
|
65
|
+
|
66
|
+
You can also easily overwrite stylesheets, layouts, partials and basically everything about
|
67
|
+
this plugin by adding a copy of that file in the `_plugins/theme` directory. More on that
|
68
|
+
later.
|
28
69
|
|
29
70
|
## Contributing
|
30
71
|
|
data/assets/config.yml
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
{% assign post_content = (theme.
|
1
|
+
{% assign post_content = (theme.post_index.excerpt_posts ? post.excerpt : post.content) %}
|
2
2
|
{% assign excerpted = true if post_content != post.content %}
|
3
|
-
{% assign
|
3
|
+
{% assign classnames = post.class | join: " " | classify if post.class %}
|
4
|
+
{% assign classnames += " excerpt" if excerpted %}
|
5
|
+
{% assign permalink_label = (excerpted ? theme.post_index.read_more_label : theme.post_index.permalink_label) %}
|
4
6
|
|
5
|
-
<article class="entry {
|
7
|
+
<article class="entry {{ classnames }}" role="article">
|
6
8
|
<header class="entry-header">
|
7
9
|
<h1 class="entry-title">{{ post.title_link }}</h1>
|
8
|
-
<div class="entry-meta">{{ post.
|
10
|
+
<div class="entry-meta">{{ post.date_html }}</div>
|
9
11
|
</header>
|
10
12
|
|
11
13
|
<div class="entry-content">{{ post_content }}</div>
|
@@ -2,14 +2,14 @@
|
|
2
2
|
<nav role="pagination" class="post-nav">
|
3
3
|
{% if page.previous.url %}
|
4
4
|
<a class="previous-post" href="{{page.previous.url}}" title="Previous Article: {{page.previous.title_text}}">
|
5
|
-
<div class
|
5
|
+
<div class='previous-post-marker'><span class='previous-post-arrow'>←</span> Previous Article</div>
|
6
6
|
<h6 class='previous-post-title'>{{page.previous.title_html}}</h6>
|
7
7
|
<div class="previous-post-date">{{ page.previous.date_html }}</div>
|
8
8
|
</a>
|
9
9
|
{% endif %}
|
10
10
|
{% if page.next.url %}
|
11
11
|
<a class="next-post" href="{{page.next.url}}" title="Next Article: {{page.next.title_text}}">
|
12
|
-
<div class
|
12
|
+
<div class='next-post-marker'>Next Article <span class='next-post-arrow'>→</span></div>
|
13
13
|
<h6 class='next-post-title'>{{page.next.title_html}}</h6>
|
14
14
|
<div class="next-post-date">{{ page.next.date_html }}</div>
|
15
15
|
</a>
|
@@ -2,8 +2,8 @@
|
|
2
2
|
{% for link in theme.nav %}
|
3
3
|
{% assign url = link.url | expand_url %}
|
4
4
|
{% assign page_url = page.url | expand_url | remove:'index.html' %}
|
5
|
-
{% assign class = (url == page_url ? '
|
5
|
+
{% assign class = (url == page_url ? 'active ' : '') %}
|
6
6
|
{% assign class += link.class | classify if link.class %}
|
7
|
-
<a class="
|
7
|
+
<a class="site-nav-link {{ class }}" href="{{ url }}">{{ link.title }}</a>
|
8
8
|
{% endfor %}
|
9
9
|
</nav>
|
@@ -0,0 +1 @@
|
|
1
|
+
<!-- Page header social buttons go here -->
|
@@ -0,0 +1 @@
|
|
1
|
+
<!-- Post footer social buttons go here -->
|
@@ -0,0 +1 @@
|
|
1
|
+
<!-- Post header social buttons go here -->
|
data/assets/layouts/default.html
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
layout: theme:base
|
3
3
|
---
|
4
|
-
<div class="site-top">
|
4
|
+
<div class="site-top"><div class="site-top-content">
|
5
5
|
{% include theme:site-header.html | compact_newlines %}
|
6
6
|
{% include theme:primary-nav.html | compact_newlines %}
|
7
|
-
</div>
|
7
|
+
</div></div>
|
8
8
|
<div class="site-main">
|
9
9
|
<div class="main {% return 'with-sidebar' if sidebar %}">
|
10
10
|
<div class="main-content">{{ content }}</div>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
|
-
<div class="site-bottom">
|
13
|
+
<div class="site-bottom"><div class="site-bottom-content">
|
14
14
|
{% include theme:site-footer.html %}
|
15
|
-
</div>
|
15
|
+
</div></div>
|
data/assets/layouts/page.html
CHANGED
@@ -4,14 +4,12 @@ layout: theme:default
|
|
4
4
|
<article class="page entry {{ page.class }}" role="article">
|
5
5
|
<header class="entry-header">
|
6
6
|
<h1 class="entry-title">{{ page.title_html }}</h1>
|
7
|
-
{
|
7
|
+
<div class="entry-meta">{{ page.date_html }}</div>
|
8
|
+
<div class="entry-social top">{% include theme:social/page-header.html %}</div>
|
8
9
|
</header>
|
9
10
|
|
10
|
-
<div class="entry-content">{{
|
11
|
+
<div class="entry-content">{{ content }}</div>
|
11
12
|
|
12
|
-
<footer class='entry-footer' role='contentinfo'>
|
13
|
-
<div class="entry-meta">{{ page.date_html }}</div>
|
14
|
-
</footer>
|
15
13
|
</article>
|
16
14
|
{% wrap include theme:comments/embed.html if page.comments %}
|
17
15
|
<div class='entry-comments'>{{ yield }}</div>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
---
|
2
2
|
layout: theme:default
|
3
3
|
---
|
4
|
-
<div class="
|
4
|
+
<div class="post-index">
|
5
5
|
{% for post in paginator.posts %}
|
6
6
|
{% include theme:index-post.html %}
|
7
7
|
{% endfor %}
|
8
8
|
</div>
|
9
9
|
|
10
|
-
<nav class="post-index-
|
10
|
+
<nav class="post-index-nav pagination" role="navigation">
|
11
11
|
{% if paginator.next_page %}
|
12
12
|
<a class="pagination-prev" title="Older posts" href="{{paginator.next_page_path}}">← Older</a>
|
13
13
|
{% endif %}
|
data/assets/layouts/post.html
CHANGED
@@ -1,28 +1,38 @@
|
|
1
1
|
---
|
2
2
|
layout: theme:default
|
3
3
|
---
|
4
|
-
<article class="post entry {{ page.class }} {% return 'linkpost' if entry.linkpost %}" role="article">
|
5
|
-
|
6
|
-
<
|
4
|
+
<article class="post entry {{ page.class }} {% return 'graphic-title' if page.title-graphic %} {% return 'linkpost' if entry.linkpost %}" role="article">
|
5
|
+
{% if page.title-graphic %}
|
6
|
+
<header class="entry-header" style='background-image: url("{{ page.title-graphic }}")'>
|
7
|
+
{% else %}
|
8
|
+
<header class="entry-header">
|
9
|
+
{% endif %}
|
10
|
+
{% assign title = (page.linkpost ? page.title_link : page.title_html) %}
|
11
|
+
<h1 class="entry-title">{{ title }}</h1>
|
12
|
+
{% if page.subtitle %}<p class="entry-subtitle">{{ page.subtitle }}</p>{% endif %}
|
7
13
|
<div class="entry-meta">{{ page.date_html }}</div>
|
14
|
+
<div class="entry-social header">{% include theme:social/post-header.html %}</div>
|
8
15
|
{% yield header %}
|
9
16
|
</header>
|
10
17
|
|
11
|
-
<div class="entry-content">{{
|
18
|
+
<div class="entry-content">{{ content }}</div>
|
12
19
|
|
13
20
|
<footer class='entry-footer' role='contentinfo'>
|
14
21
|
<p class="entry-meta">
|
15
22
|
{% yield footer %}
|
16
23
|
{% assign author = page.author || site.author %}
|
17
24
|
{% if author %}
|
18
|
-
|
25
|
+
<div class='author-credit'>Written by: {{ author }}</div>
|
26
|
+
{% endif %}
|
27
|
+
<div class='posted-date'>Published: {{ page.date_time_html }}</div>
|
28
|
+
{% if page.categories %}
|
29
|
+
<div class="categories">Categories: {{ page.categories | category_links }}</div>
|
19
30
|
{% endif %}
|
20
|
-
{{ page.date_time_html }}
|
21
|
-
{% if page.categories %} • <span class="categories">{{ page.categories | category_links }}</span>{% endif %}
|
22
31
|
</p>
|
23
|
-
|
32
|
+
<div class="entry-social footer">{% include theme:social/post-footer.html %}</div>
|
24
33
|
</footer>
|
25
34
|
</article>
|
35
|
+
{% include theme:post-nav.html %}
|
26
36
|
{% wrap include theme:comments/embed.html if post.comments %}
|
27
37
|
<div class='entry-comments'>{{ yield }}</div>
|
28
38
|
{% endwrap %}
|
data/assets/pages/index.html
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
2
|
layout: theme:default
|
3
3
|
---
|
4
|
-
<div class="
|
4
|
+
<div class="post-index">
|
5
5
|
{% for post in site.posts limit: 10 %}
|
6
6
|
{% include theme:index-post.html %}
|
7
7
|
{% endfor %}
|
8
8
|
</div>
|
9
|
-
<nav class="post-index-
|
9
|
+
<nav class="post-index-nav" role="navigation">
|
10
10
|
<a class='archive-link' href="{{ theme.permalinks.archive }}">Post Archive</a>
|
11
11
|
</nav>
|
@@ -1,4 +1,16 @@
|
|
1
1
|
$site-bg: #edefef;
|
2
2
|
$main-bg: #f5f6f6;
|
3
|
-
$
|
3
|
+
$page-border: #dadede;
|
4
|
+
|
5
|
+
$accent-color: #e46767; // pale red
|
6
|
+
|
7
|
+
$text-color: #444;
|
8
|
+
$medium-text-color: #666;
|
9
|
+
$light-text-color: #888;
|
4
10
|
$link-color: #4A89DC;
|
11
|
+
|
12
|
+
$site-header-bg: #edefef;
|
13
|
+
$site-title-color: #555;
|
14
|
+
$site-nav-color: #333;
|
15
|
+
|
16
|
+
$gray: #8d9297;
|
@@ -0,0 +1,85 @@
|
|
1
|
+
.entry {
|
2
|
+
margin: { top: 4em; bottom: 4em; }
|
3
|
+
+ .entry {
|
4
|
+
border-top: 1px solid $page-border;
|
5
|
+
padding-top: 2em;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
.article-link {
|
10
|
+
text-decoration: none;
|
11
|
+
color: inherit;
|
12
|
+
&:hover {
|
13
|
+
color: $link-color;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
.entry-header {
|
18
|
+
@if ($center-headings) {
|
19
|
+
text-align: center;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
.entry-title {
|
24
|
+
margin-bottom: 0;
|
25
|
+
font-size: 2.4rem;
|
26
|
+
@include at-least($medium) {
|
27
|
+
font-size: 2.8rem;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.entry-meta {
|
32
|
+
color: $medium-text-color;
|
33
|
+
}
|
34
|
+
|
35
|
+
.entry-content {
|
36
|
+
margin: { top: 3rem; bottom: 3rem; }
|
37
|
+
}
|
38
|
+
|
39
|
+
.entry {
|
40
|
+
margin: { left: auto; right: auto; }
|
41
|
+
}
|
42
|
+
|
43
|
+
.entry-meta, .entry-subtitle, .entry-footer {
|
44
|
+
font-family: $meta-font;
|
45
|
+
font-weight: 400;
|
46
|
+
font-size: .9rem;
|
47
|
+
}
|
48
|
+
|
49
|
+
.entry-header > * {
|
50
|
+
position: relative;
|
51
|
+
z-index: 1;
|
52
|
+
}
|
53
|
+
.entry-subtitle {
|
54
|
+
font-size: 1.4rem;
|
55
|
+
margin-top: 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
.graphic-title {
|
59
|
+
margin-top: 0;
|
60
|
+
.entry-header {
|
61
|
+
background-size: cover;
|
62
|
+
background-position: center center;
|
63
|
+
padding: { top: 10%; bottom: 10%; }
|
64
|
+
}
|
65
|
+
|
66
|
+
&.light-title {
|
67
|
+
.entry-header, .entry-meta {
|
68
|
+
color: #fff;
|
69
|
+
text-shadow: rgba(#000, .5) 0 1px 1px;
|
70
|
+
}
|
71
|
+
.entry-header {
|
72
|
+
position: relative;
|
73
|
+
&:after {
|
74
|
+
content: "";
|
75
|
+
position: absolute;
|
76
|
+
z-index: 0;
|
77
|
+
left: 0;
|
78
|
+
top: 0;
|
79
|
+
bottom: 0;
|
80
|
+
right: 0;
|
81
|
+
background: rgba(#000, .08);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
@@ -0,0 +1,153 @@
|
|
1
|
+
/* ==========================================================================
|
2
|
+
* Grid core - Based on Griddle, Heavily customized.
|
3
|
+
* ========================================================================== */
|
4
|
+
|
5
|
+
@mixin destroy-margins {
|
6
|
+
@include destroy-top-margins;
|
7
|
+
@include destroy-bottom-margins;
|
8
|
+
}
|
9
|
+
|
10
|
+
@mixin destroy-top-margins {
|
11
|
+
> :first-child,
|
12
|
+
> :first-child > :first-child,
|
13
|
+
> :first-child > :first-child > :first-child { margin-top: 0; }
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin destroy-bottom-margins {
|
17
|
+
> :last-child,
|
18
|
+
> :last-child > :last-child,
|
19
|
+
> :last-child > :last-child > :last-child { margin-bottom: 0; }
|
20
|
+
}
|
21
|
+
|
22
|
+
// Remove inner elements' top and bottom margin
|
23
|
+
%destroy-margins {
|
24
|
+
@include destroy-margins;
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
$grid-gutter: 4%;
|
29
|
+
$margin: 30px;
|
30
|
+
|
31
|
+
$grid-gutter-none: 0;
|
32
|
+
$grid-gutter-small: 2%;
|
33
|
+
$grid-gutter-large: 8%;
|
34
|
+
|
35
|
+
.grid {
|
36
|
+
display: block;
|
37
|
+
padding: 0;
|
38
|
+
$m: -.5 * $grid-gutter;
|
39
|
+
margin: { left: $m; right: $m; }
|
40
|
+
letter-spacing: -5px;
|
41
|
+
text-rendering: optimizespeed;
|
42
|
+
|
43
|
+
// Nested `grid` object adjustments
|
44
|
+
> .grid {
|
45
|
+
overflow: hidden;
|
46
|
+
margin-right: 0;
|
47
|
+
margin-left: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
/* ==========================================================================
|
51
|
+
* Gutter sizing
|
52
|
+
* ========================================================================== */
|
53
|
+
|
54
|
+
// No gutter (0%)
|
55
|
+
&.no-gutter {
|
56
|
+
$m: -.5 * $grid-gutter-none;
|
57
|
+
margin: { left: $m; right: $m; }
|
58
|
+
> .grid-cell {
|
59
|
+
padding: 0 0.5 * $grid-gutter-none;
|
60
|
+
}
|
61
|
+
|
62
|
+
&.match-gutters {
|
63
|
+
> .grid-cell {
|
64
|
+
padding: 0;
|
65
|
+
margin: { left: 0; right: 0; }
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
// Small gutter (2%)
|
71
|
+
&.small-gutter {
|
72
|
+
$m: -.5 * $grid-gutter-small;
|
73
|
+
margin: { left: $m; right: $m; }
|
74
|
+
> .grid-cell {
|
75
|
+
padding: 0 0.5 * $grid-gutter-small;
|
76
|
+
}
|
77
|
+
|
78
|
+
&.match-gutters {
|
79
|
+
> .grid-cell {
|
80
|
+
padding: 0 0.5 * $grid-gutter-small;
|
81
|
+
margin: { bottom: $grid-gutter-small; }
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
// Large gutter (8%)
|
87
|
+
&.large-gutter {
|
88
|
+
$m: -.5 * $grid-gutter-large;
|
89
|
+
margin: { left: $m; right: $m; }
|
90
|
+
> .grid-cell {
|
91
|
+
padding: 0 0.5 * $grid-gutter-large;
|
92
|
+
}
|
93
|
+
|
94
|
+
&.match-gutters {
|
95
|
+
> .grid-cell {
|
96
|
+
padding: 0 0.5 * $grid-gutter-large;
|
97
|
+
margin: { bottom: $grid-gutter-large; }
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
/* ==========================================================================
|
104
|
+
* Adhere to set gutter spacing & ignore inner elements' margin
|
105
|
+
* ========================================================================== */
|
106
|
+
|
107
|
+
&.match-gutters {
|
108
|
+
> .grid-cell {
|
109
|
+
padding: 0.5 * $grid-gutter;
|
110
|
+
@extend %destroy-margins;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
// Grid cells - Apply `.x-of-x` classes to set width.
|
117
|
+
.grid-cell {
|
118
|
+
display: inline-block;
|
119
|
+
width: 100%;
|
120
|
+
margin: 0;
|
121
|
+
padding: 0 .5 * $grid-gutter;
|
122
|
+
text-align: left;
|
123
|
+
vertical-align: top;
|
124
|
+
letter-spacing: normal;
|
125
|
+
word-spacing: normal;
|
126
|
+
text-rendering: auto;
|
127
|
+
&.auto {
|
128
|
+
width: auto;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
/* =====================================================================
|
133
|
+
* Cell sizing
|
134
|
+
* ===================================================================== */
|
135
|
+
|
136
|
+
$cell-sizes: (1:one, 2:two, 3:three, 4:four, 5:five, 6:six);
|
137
|
+
|
138
|
+
@mixin grid-cell($num) {
|
139
|
+
@for $i from 1 to $num {
|
140
|
+
.#{map-get($cell-sizes, $i)}-of-#{map-get($cell-sizes, $num)} {
|
141
|
+
width: 100%*$i/$num;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
@include grid-cell(6);
|
147
|
+
@include grid-cell(5);
|
148
|
+
@include grid-cell(4);
|
149
|
+
@include grid-cell(3);
|
150
|
+
@include grid-cell(2);
|
151
|
+
.small-golden { width: 38.2%; }
|
152
|
+
.large-golden { width: 61.8%; }
|
153
|
+
|