sculptor 0.0.9.3 → 0.0.10

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: 8b4a2bd6e6b2bd1bad84cfd2d68b0bb4d7e6c73a
4
- data.tar.gz: 6ee495a0bfa615d5fb1b4f012c4492ac971cb6ae
3
+ metadata.gz: 4b63707ef194596a930ba3646132d11f71c2561f
4
+ data.tar.gz: 6345d2cb7505e0eb9b843fcebaadada3c91d4a84
5
5
  SHA512:
6
- metadata.gz: 0f0820c5ec07a125bc968507be688cae4f666dcabbd5c1d160fb2b3de547eeef6014cf1d5493a130cdce93df1fa76ed33e1d2240034984ae9064b4464051d759
7
- data.tar.gz: b75aaeb4a6532ac3a00906598b9e39b557073e055de8bf76c3007dde4b1712502b5cf2740ea81c877e165e9e99e0753b1929655814ad1950ce228215d1dbb151
6
+ metadata.gz: 040b8ea910ccb5708be81953b3fcce2d9b4f04133ed4d565ebc68ea8edb83e1283eebc03976526cc08344e6e612437987755443e54f76781201609a414164281
7
+ data.tar.gz: 2e3d2e7b9f2879c34b3babf249e13beb2f871505e9030fff66913f8ac52634801edbdd4e372d07baf0586629d903bb274c5a912e88c3cbca5a36da54c4762682
@@ -109,6 +109,7 @@ class Middleman::Extensions::ResourceHelpers < ::Middleman::Extension
109
109
 
110
110
  def parse_resource(r, options)
111
111
  data = {}
112
+ data[:path] = url_for("/#{r.path}")
112
113
  data[:url] = r.url
113
114
  data[:children] = collect_resources(r.children, options).map { |c| parse_resource(c, options) } if r.children.any?
114
115
  data[:parent] = r.parent.url
@@ -1,8 +1,7 @@
1
- require 'sculptor/version'
2
-
1
+ <%- require 'sculptor/version' -%>
3
2
  source 'https://rubygems.org'
4
3
 
5
- gem 'sculptor', "#{Sculptor::VERSION}"
4
+ gem 'sculptor', '<%= Sculptor::VERSION %>'
6
5
  gem 'middleman', '~>3.3'
7
6
  gem 'middleman-pry'
8
7
  gem 'middleman-deploy'
@@ -26,14 +26,12 @@ angular.module('directives', [])
26
26
  };
27
27
  })
28
28
 
29
- .directive('glyptoMenu', function(relativePathToRoot) {
29
+ .directive('glyptoMenu', function() {
30
30
  return {
31
31
  restrict: 'E',
32
32
  replace: true,
33
33
  scope: true,
34
- templateUrl: function() {
35
- return relativePathToRoot() + 'glyptotheque/menu.html';
36
- },
34
+ templateUrl: 'glyptotheque/menu.html',
37
35
  controller: function($scope) {
38
36
  $scope.items = window.APP_CONTEXT.sitemap;
39
37
  },
@@ -44,7 +42,7 @@ angular.module('directives', [])
44
42
  };
45
43
  })
46
44
 
47
- .directive('glyptoMenuTree', function(relativePathToRoot) {
45
+ .directive('glyptoMenuTree', function() {
48
46
  return {
49
47
  restrict: 'E',
50
48
  replace: true,
@@ -53,29 +51,16 @@ angular.module('directives', [])
53
51
  items: '=',
54
52
  filter: '='
55
53
  },
56
- templateUrl: function() {
57
- return relativePathToRoot() + 'glyptotheque/menu-tree.html';
58
- },
59
- link: function($scope, $element, $attrs) {
60
- $scope.relativeUrl = function(url) {
61
- return relativePathToRoot() + url.slice(1);
62
- };
63
- }
54
+ templateUrl: 'glyptotheque/menu-tree.html'
64
55
  };
65
56
  })
66
57
 
67
- .directive('glyptoMenuNode', function($compile, relativePathToRoot) {
58
+ .directive('glyptoMenuNode', function($compile) {
68
59
  return {
69
60
  restrict: 'E',
70
61
  replace: true,
71
- templateUrl: function() {
72
- return relativePathToRoot() + 'glyptotheque/menu-node.html';
73
- },
62
+ templateUrl: 'glyptotheque/menu-node.html',
74
63
  link: function($scope, $element, $attrs) {
75
- $scope.relativeUrl = function(url) {
76
- return relativePathToRoot() + url.slice(1);
77
- };
78
-
79
64
  $scope.isSelected = $scope.node.url === window.APP_CONTEXT.current_url;
80
65
 
81
66
  if ($scope.node.children && $scope.node.children.length > 0) {
@@ -1,10 +1 @@
1
- angular.module('services', [])
2
-
3
- .factory('relativePathToRoot', function($window) {
4
- return function() {
5
- var pathToRoot = $window.location.pathname.replace(/\/$/, '').split('/').slice(1).map(function() {
6
- return '../';
7
- }).join('');
8
- return pathToRoot;
9
- };
10
- });
1
+ angular.module('services', []);
@@ -8,7 +8,7 @@
8
8
  display: inline-block;
9
9
  font-size: 10px;
10
10
  font-weight: 600;
11
- color: rgba(black, .3);
11
+ color: #888;
12
12
  text-transform: uppercase;
13
13
  padding: 4px 8px;
14
14
  background: none;
@@ -22,13 +22,13 @@
22
22
  background: rgba(white, .7);
23
23
  }
24
24
  &:active {
25
- color: rgba(black, .5);
26
- background: white;
25
+ color: #555;
26
+ background: rgba(black, .1);
27
27
  }
28
28
 
29
29
  &.__active {
30
+ color: white;
30
31
  background: rgba(black, .3);
31
- color: rgba(white, .9);
32
32
 
33
33
  &:active {
34
34
  background: rgba(black, .5);
@@ -1,17 +1,23 @@
1
- - section ||= '/'
2
- - subpages = resources_for(section, sort_by: :nav_order, ignore: /\.component\./)
1
+ glypto-menu
3
2
 
4
- - unless subpages.empty?
3
+ / Use inline templates to avoid dealing with relative templateUrls
4
+
5
+ script type="text/ng-template" id="glyptotheque/menu.html"
5
6
  nav.glypto-nav ng-class="{'s-hidden' : hidden}"
6
- button.nav-toggle ng-click="toggle()"
7
+ button.glypto-nav-toggle ng-click="toggle()" title="Toggle menu: Command + Shift + E"
7
8
  = link_to 'Glyptotheque', '/', class: '_logo'
8
- ul
9
- - subpages.each do |r|
10
- li(class="#{'s-selected' if r == current_page} #{'_index' if r.directory_index?}")
11
- - if r.directory_index?
12
- - subpages_count = resources_for(r.url, exclude_indexes: true).count
13
- = link_to r.url
14
- = (r.data.title || resource_dir(r))
15
- span._count = subpages_count
16
- - else
17
- = link_to (r.data.title || resource_file(r)), r.url
9
+ .search: input.mousetrap(ng-model="search" type="search" placeholder="Search (/ to focus)" glypto-search)
10
+
11
+ glypto-menu-tree items="items" filter="search"
12
+
13
+
14
+ script type="text/ng-template" id="glyptotheque/menu-tree.html"
15
+ ul
16
+ glypto-menu-node ng-repeat="node in items|filter:filter"
17
+
18
+
19
+ script type="text/ng-template" id="glyptotheque/menu-node.html"
20
+ li ng-class="{'_index': node.children, 's-selected': isSelected}"
21
+ = link_to '{{node.path}}'
22
+ | {{node.title}}
23
+ span._count ng-if="node.children.length" {{node.children.length}}
@@ -3,7 +3,7 @@
3
3
  - content_for :stylesheets, stylesheet_link_tag('glyptotheque')
4
4
 
5
5
  = wrap_layout :layout do
6
- glypto-menu
6
+ = partial 'glyptotheque/nav'
7
7
  main.glyptotheque
8
8
  = yield
9
9
 
@@ -1,3 +1,3 @@
1
1
  module Sculptor
2
- VERSION = "0.0.9.3"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sculptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.3
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyom Semonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-05 00:00:00.000000000 Z
11
+ date: 2014-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: guard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cucumber
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: aruba
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.14'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.14'
97
97
  - !ruby/object:Gem::Dependency
@@ -112,124 +112,124 @@ dependencies:
112
112
  name: guard-rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: guard-cucumber
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: pry
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: middleman-core
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '3.3'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '3.3'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: thor
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: 0.15.2
174
- - - <
174
+ - - "<"
175
175
  - !ruby/object:Gem::Version
176
176
  version: '2.0'
177
177
  type: :runtime
178
178
  prerelease: false
179
179
  version_requirements: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - '>='
181
+ - - ">="
182
182
  - !ruby/object:Gem::Version
183
183
  version: 0.15.2
184
- - - <
184
+ - - "<"
185
185
  - !ruby/object:Gem::Version
186
186
  version: '2.0'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: nokogiri
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
- - - '>='
191
+ - - ">="
192
192
  - !ruby/object:Gem::Version
193
193
  version: '1.6'
194
- - - <
194
+ - - "<"
195
195
  - !ruby/object:Gem::Version
196
196
  version: '2.0'
197
197
  type: :runtime
198
198
  prerelease: false
199
199
  version_requirements: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - '>='
201
+ - - ">="
202
202
  - !ruby/object:Gem::Version
203
203
  version: '1.6'
204
- - - <
204
+ - - "<"
205
205
  - !ruby/object:Gem::Version
206
206
  version: '2.0'
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: rest_client
209
209
  requirement: !ruby/object:Gem::Requirement
210
210
  requirements:
211
- - - ~>
211
+ - - "~>"
212
212
  - !ruby/object:Gem::Version
213
213
  version: 1.7.3
214
214
  type: :runtime
215
215
  prerelease: false
216
216
  version_requirements: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - ~>
218
+ - - "~>"
219
219
  - !ruby/object:Gem::Version
220
220
  version: 1.7.3
221
221
  - !ruby/object:Gem::Dependency
222
222
  name: oj
223
223
  requirement: !ruby/object:Gem::Requirement
224
224
  requirements:
225
- - - ~>
225
+ - - "~>"
226
226
  - !ruby/object:Gem::Version
227
227
  version: 2.10.2
228
228
  type: :runtime
229
229
  prerelease: false
230
230
  version_requirements: !ruby/object:Gem::Requirement
231
231
  requirements:
232
- - - ~>
232
+ - - "~>"
233
233
  - !ruby/object:Gem::Version
234
234
  version: 2.10.2
235
235
  description: Styleguide generator, prototype and test tool powered by Middleman
@@ -240,8 +240,8 @@ executables:
240
240
  extensions: []
241
241
  extra_rdoc_files: []
242
242
  files:
243
- - .editorconfig
244
- - .gitignore
243
+ - ".editorconfig"
244
+ - ".gitignore"
245
245
  - Gemfile
246
246
  - Guardfile
247
247
  - LICENSE.txt
@@ -297,9 +297,6 @@ files:
297
297
  - lib/sculptor/templates/glyptotheque/source/glyptotheque/_model-utils.slim
298
298
  - lib/sculptor/templates/glyptotheque/source/glyptotheque/_model.slim
299
299
  - lib/sculptor/templates/glyptotheque/source/glyptotheque/_nav.slim
300
- - lib/sculptor/templates/glyptotheque/source/glyptotheque/menu-node.html.slim
301
- - lib/sculptor/templates/glyptotheque/source/glyptotheque/menu-tree.html.slim
302
- - lib/sculptor/templates/glyptotheque/source/glyptotheque/menu.html.slim
303
300
  - lib/sculptor/templates/glyptotheque/source/index.html.slim
304
301
  - lib/sculptor/templates/glyptotheque/source/layouts/glyptotheque.slim
305
302
  - lib/sculptor/templates/glyptotheque/source/layouts/layout.slim
@@ -321,17 +318,17 @@ require_paths:
321
318
  - lib
322
319
  required_ruby_version: !ruby/object:Gem::Requirement
323
320
  requirements:
324
- - - '>='
321
+ - - ">="
325
322
  - !ruby/object:Gem::Version
326
323
  version: '0'
327
324
  required_rubygems_version: !ruby/object:Gem::Requirement
328
325
  requirements:
329
- - - '>='
326
+ - - ">="
330
327
  - !ruby/object:Gem::Version
331
328
  version: '0'
332
329
  requirements: []
333
330
  rubyforge_project:
334
- rubygems_version: 2.2.2
331
+ rubygems_version: 2.4.2
335
332
  signing_key:
336
333
  specification_version: 4
337
334
  summary: Tool to create style guides and prototype web apps
@@ -1,4 +0,0 @@
1
- li ng-class="{'_index': node.children, 's-selected': isSelected}"
2
- = link_to '{{relativeUrl(node.url)}}'
3
- | {{node.title}}
4
- span._count ng-if="node.children.length" {{node.children.length}}
@@ -1,2 +0,0 @@
1
- ul
2
- glypto-menu-node ng-repeat="node in items|filter:filter"
@@ -1,6 +0,0 @@
1
- nav.glypto-nav ng-class="{'s-hidden' : hidden}"
2
- button.glypto-nav-toggle ng-click="toggle()" title="Toggle menu: Command + Shift + E"
3
- = link_to 'Glyptotheque', '/', class: '_logo'
4
- .search: input.mousetrap(ng-model="search" type="search" placeholder="Search (/ to focus)" glypto-search)
5
-
6
- glypto-menu-tree items="items" filter="search"