middleman-sculptor 0.8 → 0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d71471a4587329d31fbd3dc7dd1497e7cad724f
4
- data.tar.gz: 5f0362ea67ec541e9fd8a66f90c758bb598f4b8e
3
+ metadata.gz: f6ac77bee816f76f49961d955c50ced89c89910c
4
+ data.tar.gz: 3bddd6f9bc0cb7ed5161416146f1ffe2d7546344
5
5
  SHA512:
6
- metadata.gz: 131d0a2a1f41fd964ef7d80d503a163abb72861fba02c96c2b4b1054debd08cb95bd41de9a82f74da10604ed6b0d245742abe604018e4770a54eb556eedc29ef
7
- data.tar.gz: 38295171d2e2b9d9a850370572463c983064d6ed450e9bb11fad3c0113f03b8f0666e02c3e90e654813a71dda8e5703eeec7573056cb3a9ee980357197adce49
6
+ metadata.gz: 240425b86a9da0a6c50de62e6727839699a5789ad012bf5f89b31ce6af3234f2134d45c22ff02ce6c235c4b78893bf14f67a3d1ef7cfaf330054970a3b67d988
7
+ data.tar.gz: f0a0a804c409b9e6a056f5fbb36327de129bf53e853b9e443a911b61b02a094942499f45d8e7a2d2fd51981c6c334101ba6c6982294fd5ae6448e8873df03d5b
@@ -43,6 +43,12 @@ module Middleman::Sculptor
43
43
  .reject { |r| r[:parent] != '/' } # Remove non-root directories from the root
44
44
  end
45
45
 
46
+ def main_sections
47
+ resources_for('/').select do |r|
48
+ r if r.metadata.locals[:name]
49
+ end
50
+ end
51
+
46
52
  def local_data(path)
47
53
  current_path = current_resource.path
48
54
  if current_resource.metadata.page.has_key? :local_url
@@ -10,11 +10,15 @@ page '*.css', layout: false
10
10
  page '*.js', layout: false
11
11
  page '*.json', layout: false
12
12
 
13
- # Proxy default site index to Glyptotheque index template
14
- proxy 'index.html', 'glyptotheque/site-index.html'
15
- proxy 'sitemap.json', 'glyptotheque/sitemap.json'
13
+ set :site_title, 'Glyptotheque'
16
14
 
17
15
  ready do
16
+ # Proxy default site index to Glyptotheque index template
17
+ unless sitemap.find_resource_by_path '/index.html'
18
+ proxy 'index.html', 'glyptotheque/site-index.html'
19
+ end
20
+ proxy 'sitemap.json', 'glyptotheque/sitemap.json'
21
+
18
22
  last_dir = nil
19
23
  # Prerender resources to populate models
20
24
  resources = resources_for('/', exclude_indexes: true, allow_hidden: true).each do |r|
@@ -96,10 +96,13 @@ angular.module('directives', [])
96
96
 
97
97
  $element.on('focus', function() {
98
98
  activated = true;
99
+ this.originalPlaceholder = $element.attr('placeholder');
100
+ $element.attr('placeholder', 'Filter');
99
101
  });
100
102
 
101
103
  $element.on('blur', function() {
102
104
  activated = false;
105
+ $element.attr('placeholder', this.originalPlaceholder);
103
106
  });
104
107
  }
105
108
  };
@@ -36,7 +36,7 @@ button {
36
36
  .glypto-section {
37
37
  margin: 0 -30px 40px;
38
38
  padding: 0 30px 40px;
39
- border-bottom: 2px solid lighten($dark-grey, 20);
39
+ border-bottom: 2px solid lighten($dark-grey, 50);
40
40
  box-shadow: 0 1px rgba(white, .4);
41
41
 
42
42
  &:last-child {
@@ -48,14 +48,25 @@ button {
48
48
 
49
49
  .glyptotheque,
50
50
  .glypto-section {
51
- > h2 {
52
- margin: 1.6em 0 .5em;
51
+ > h2,
52
+ > h3,
53
+ > h4 {
54
+ margin: 1.1em 0 .5em;
55
+ font-size: 36px;
56
+ }
57
+
58
+ h3 {
53
59
  font-size: 28px;
54
60
  }
61
+
62
+ h4 {
63
+ font-size: 24px;
64
+ }
55
65
  }
56
66
 
57
67
  .glypto-title {
58
68
  font-size: 48px;
69
+ font-family: 'Helvetica Neue';
59
70
  margin: 0 0 40px;
60
71
  letter-spacing: -.04em;
61
72
 
@@ -68,3 +79,10 @@ button {
68
79
  }
69
80
  }
70
81
  }
82
+
83
+ h1.glypto-title {
84
+ margin: -40px -30px 40px;
85
+ padding: 40px 30px;
86
+ background: #ddd;
87
+ background: linear-gradient(58deg, #ddd, #f6f6f6);
88
+ }
@@ -1,20 +1,34 @@
1
1
  @import 'pygments/github';
2
2
 
3
3
  .glypto-model {
4
- margin: 40px 0 20px;
4
+ $_transition: 400ms ease-out;
5
+
6
+ transition: $_transition;
7
+ margin: 30px -10px 20px;
5
8
  border: 1px solid $light-grey;
6
9
  box-shadow: 0 0 0 3px #f6f6f6;
7
10
 
11
+ &:hover {
12
+ box-shadow: none;
13
+ border-color: transparent;
14
+
15
+ &:before {
16
+ opacity: 0;
17
+ }
18
+ }
19
+
8
20
  &:before {
21
+ transition: $_transition;
9
22
  content: 'EXAMPLE';
10
23
  position: absolute;
11
- margin-top: -19px;
24
+ margin-top: -20px;
12
25
  margin-left: -4px;
13
- font-size: 12px;
14
- line-height: 12px;
26
+ font-size: 11px;
27
+ line-height: 1;
28
+ font-weight: 500;
15
29
  color: #aaa;
16
30
  background: #f6f6f6;
17
- padding: 3px 10px;
31
+ padding: 4px 15px;
18
32
  }
19
33
 
20
34
  &:last-child {
@@ -25,6 +39,11 @@
25
39
  position: relative;
26
40
  padding: 1px;
27
41
 
42
+ &:hover + .glypto-model-utils {
43
+ transition: $_transition;
44
+ opacity: 0;
45
+ }
46
+
28
47
  &:before {
29
48
  @include position(absolute, 0 0 0 0);
30
49
  @include size(100px 12px);
@@ -15,7 +15,7 @@
15
15
  margin-left: -$glypto-nav-width;
16
16
 
17
17
  > .glypto-nav-toggle {
18
- margin-right: -41px;
18
+ margin-right: -35px;
19
19
  opacity: .7;
20
20
  background: none;
21
21
 
@@ -32,9 +32,12 @@
32
32
  ._logo {
33
33
  font-weight: bold;
34
34
  padding: 0 10px;
35
- line-height: 50px;
35
+ line-height: 45px;
36
36
  font-size: 16px;
37
37
  display: inline-block;
38
+ outline: none;
39
+ color: #aaa;
40
+ background: none;
38
41
 
39
42
  &:hover,
40
43
  &:focus {
@@ -76,12 +79,12 @@
76
79
 
77
80
  > .glypto-nav-toggle {
78
81
  @include size(25px);
79
- transition: margin 360ms;
82
+ transition: margin 360ms ease-out;
80
83
  padding: 0;
81
84
  background: none;
82
85
  border: 0;
83
86
  float: right;
84
- margin: 15px 10px 0 0;
87
+ margin: 10px 7px 0 0;
85
88
  position: relative;
86
89
  z-index: 1;
87
90
  cursor: pointer;
@@ -175,6 +178,11 @@
175
178
 
176
179
  li.s-selected > a {
177
180
  font-weight: 500;
178
- background: black;
181
+ background: linear-gradient(58deg, rgba(black, .6), rgba(black, .1));
182
+
183
+ &:active,
184
+ &:focus {
185
+ background: black;
186
+ }
179
187
  }
180
188
  }
@@ -5,7 +5,7 @@
5
5
 
6
6
  - if id
7
7
  = link_to isolated_url, class: '_isolated', target: '_blank', title: 'Isolated version'
8
- span> Isolated
8
+ span> Isolate
9
9
  i.fa.fa-external-link
10
10
 
11
11
  ._container
@@ -10,7 +10,7 @@
10
10
  article.glypto-model
11
11
  .glypto-model-stage
12
12
  - if current_model.iframe
13
- iframe id="iframe-#{id}" src="#{url_for(isolated_url)}" height="0" width="100%" frameborder="0" scrolling="no"
13
+ iframe id="iframe-#{id}" src="#{url_for(isolated_url)}" frameborder="0" scrolling="no"
14
14
  - else
15
15
  figure = current_model.html
16
16
 
@@ -1,3 +1,7 @@
1
+ - unless current_page.data.title
2
+ - if current_page.metadata.locals[:name]
3
+ h1.glypto-title = current_page.metadata.locals.name
4
+
1
5
  - resources_for(current_page.url, exclude_indexes: true, sort_by: :nav_order).each do |r|
2
6
 
3
7
  - current_page.add_metadata({ page: { \
@@ -1,5 +1,6 @@
1
1
  - if resources_for('/').empty?
2
- h1 Go ahead, create some models
3
- p: code sculptor create hello
2
+ h1 Site is empty, create some pages
4
3
  - else
5
- = partial 'glyptotheque/directory-index'
4
+ h1.glypto-title = site_title
5
+ - main_sections.each do |section|
6
+ h2 = link_to section.metadata.locals.name, section.path
@@ -1,4 +1,4 @@
1
- - content_for :page_title, 'Glyptotheque'
1
+ - content_for :page_title, site_title
2
2
  - content_for :ng_app, 'glyptotheque'
3
3
  - content_for :stylesheets, stylesheet_link_tag('glyptotheque')
4
4
 
@@ -2,7 +2,13 @@ doctype html
2
2
  html
3
3
  head
4
4
  meta charset='utf-8'
5
- title = current_page.data.title || yield_content(:page_title) || resource_file(current_page)
5
+ title
6
+ - if current_page.metadata.locals[:name]
7
+ => current_page.metadata.locals[:name]
8
+ - else
9
+ => current_page.data.title || yield_content(:page_title) || resource_file(current_page)
10
+ - if current_page.data.title || current_page.metadata.locals[:name]
11
+ | › #{site_title}
6
12
  meta name='viewport' content='width=device-width'
7
13
  = yield_content :stylesheets
8
14
  - if current_resource.metadata.options.iframe
@@ -2,7 +2,13 @@ doctype html
2
2
  html ng-app=(yield_content(:ng_app))
3
3
  head
4
4
  meta charset='utf-8'
5
- title = current_page.data.title || yield_content(:page_title) || resource_file(current_page)
5
+ title
6
+ - if current_page.metadata.locals[:name]
7
+ => current_page.metadata.locals[:name]
8
+ - else
9
+ => current_page.data.title || yield_content(:page_title) || resource_file(current_page)
10
+ - if current_page.data.title || current_page.metadata.locals[:name]
11
+ | › #{site_title}
6
12
  meta name='viewport' content='width=device-width'
7
13
  = stylesheet_link_tag '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css'
8
14
  = yield_content :stylesheets
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Sculptor
3
- VERSION = "0.8"
3
+ VERSION = "0.9"
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.8'
4
+ version: '0.9'
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-05-02 00:00:00.000000000 Z
11
+ date: 2015-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core