middleman-sculptor 0.20 → 0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b876cfa48ae2f4763cee66b0a01baf72e518acf
4
- data.tar.gz: fd5b43a89df7dbff46347e526d54ae7b4dc2f27c
3
+ metadata.gz: bed7b438a4d425ae82491c30da1ce5755ad98ac4
4
+ data.tar.gz: c94d0163330444d4ff74bdc88cb3f9123d7f5147
5
5
  SHA512:
6
- metadata.gz: 9ea0021328e5a2caabeb6185c6d891b69464431f5dc050a624a36cef98d23facf480e1b10fb4a1524a3f625d69285b529f444897e0da63745e9b2e26344e0ca8
7
- data.tar.gz: 1b834eeccef97df3df26f843c3ad8f60682bea8eed412da580a1f5ee8101421911d1d58e29109c24b74622f62eb0654feb9371c5a4020fe0b0aef3f3129282ac
6
+ metadata.gz: d9102a073ddcb5cfa9d58d0139d38d1b45d94d22501cad43c3d3b2ca44a47a4a2a1ce3927d94fb91d6af7fff73af6a253c24ec729db5f457adfdc7767daa6f6a
7
+ data.tar.gz: 76d54bd23ef65eaea10709e70edf534533c43f8a90ff26832c6847da35752addc593a8e392a140644a56eff443259926023fefa6b1f7e901bbb18d370da3ed07
@@ -34,6 +34,7 @@ module Middleman::Sculptor
34
34
  models = {}
35
35
  models[id] = {
36
36
  iframe: options[:iframe] || false,
37
+ stylesheet: options[:stylesheet] || nil,
37
38
  html: html
38
39
  }
39
40
 
@@ -44,9 +44,9 @@ module Middleman::Sculptor
44
44
  end
45
45
 
46
46
  def main_sections
47
- resources_for('/').select do |r|
48
- r if r.parent.url == '/'
49
- end
47
+ resources_for('/')
48
+ .select {|r| r.parent.url == '/' }
49
+ .reject {|r| r.url == '/./'}
50
50
  end
51
51
 
52
52
  def local_data(path)
@@ -34,6 +34,12 @@ button {
34
34
  box-shadow: 0 0 20px black;
35
35
  }
36
36
 
37
+ .glypto-container {
38
+ max-width: 960px;
39
+ margin-left: auto;
40
+ margin-right: auto;
41
+ }
42
+
37
43
  .glypto-section {
38
44
  margin: 0 -10px 60px;
39
45
  padding: 0 10px 60px;
@@ -165,6 +171,11 @@ button {
165
171
  }
166
172
  }
167
173
 
174
+ &.m-folder a {
175
+ border-color: rgba(black, .2);
176
+ box-shadow: 1px 1px 2px rgba(black, .1);
177
+ }
178
+
168
179
  .glypto-section-name {
169
180
  font-size: em(30);
170
181
  margin: 0;
@@ -4,7 +4,9 @@
4
4
  - if main_sections.any?
5
5
  ul.glypto-section-list
6
6
  - main_sections.each do |r|
7
- li.glypto-section-list-item
7
+ li.glypto-section-list-item class="#{r.children.any? ? 'm-folder' : nil}"
8
8
  = link_to r.path
9
- h2.glypto-section-name = get_section_of_resource(r).title
10
- .glypto-section-meta = pluralize(resources_for(r.url).count, 'item')
9
+ h2.glypto-section-name
10
+ = get_section_of_resource(r).title
11
+ - if r.children.any?
12
+ .glypto-section-meta = pluralize(resources_for(r.url).count, 'item')
@@ -1,23 +1,26 @@
1
+ - id = current_resource.metadata.options.id
2
+ - current_model = current_resource.metadata.models[id]
3
+
1
4
  doctype html
2
5
  html
3
6
  head
4
7
  meta charset='utf-8'
5
8
  title = page_title
6
9
  meta name='viewport' content='width=device-width'
7
- = yield_content :stylesheets
8
- - if current_resource.metadata.options.iframe
9
- = include_stylesheets(current_page.data.stylesheets || current_page.data.stylesheet)
10
+ - if current_model[:stylesheet]
11
+ = include_stylesheets(current_model[:stylesheet])
12
+ - else
13
+ = yield_content :stylesheets
14
+ - if current_resource.metadata.options.iframe
15
+ = include_stylesheets(current_page.data.stylesheets || current_page.data.stylesheet)
10
16
  - if current_resource.data.isolation_styles
11
17
  style = current_resource.data.isolation_styles
12
18
 
13
19
  body class="#{yield_content(:body_class)}"
14
- - id = current_resource.metadata.options.id
15
- - current_model = current_resource.metadata.models[id]
16
-
17
20
  = current_model.html
18
21
 
19
22
  = javascript_include_tag 'iframe-js'
20
23
  = yield_content :javascripts
21
24
  - if current_resource.metadata.options.iframe
22
- = include_javascripts(current_page.data.javascripts || current_page.data.javascript)
25
+ = include_javascripts(current_model[:javascript] || current_page.data.javascripts || current_page.data.javascript)
23
26
  = yield_content :post_body
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Sculptor
3
- VERSION = "0.20"
3
+ VERSION = "0.21"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-sculptor
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.20'
4
+ version: '0.21'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyom Semonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-05 00:00:00.000000000 Z
11
+ date: 2015-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core