middleman-sculptor 0.10 → 0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/middleman-sculptor/helpers/resources.rb +8 -1
- data/lib/middleman-sculptor/template/config.tt +11 -2
- data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_base.scss +31 -0
- data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_nav.scss +4 -3
- data/lib/middleman-sculptor/template/source/glyptotheque/directory-index.html.slim +2 -2
- data/lib/middleman-sculptor/template/source/layouts/glyptotheque.slim +8 -1
- data/lib/middleman-sculptor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20eeb36c34a004304ecc3b9d6c3b70c1afbe6f29
|
4
|
+
data.tar.gz: 5b984ab17ceae5e7401c5617de4567ff503b55e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ab67254fa7f251cba319721380fe00ccdd157d32af59dd8ce5d428a67dde8cb0d982dffc3ca10e4da099b81c5929a8833248b5f10e18071cdfc85690ccdec64
|
7
|
+
data.tar.gz: eacf4007c94887fa40c42433ebdb09cc2c3c981da402cdbdaf445c4c0321bbf6b1d0a5484cf7be8d042a7a788cad6377fb46fb6cd7f1d09cec33b66929b54e1f
|
@@ -45,7 +45,7 @@ module Middleman::Sculptor
|
|
45
45
|
|
46
46
|
def main_sections
|
47
47
|
resources_for('/').select do |r|
|
48
|
-
r if r.
|
48
|
+
r if r.parent.url == '/'
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -131,6 +131,13 @@ module Middleman::Sculptor
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
+
dir = File.dirname(r.path)
|
135
|
+
r.add_metadata(locals: {
|
136
|
+
section: {
|
137
|
+
title: dir.upcase,
|
138
|
+
slug: dir.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '-')
|
139
|
+
}
|
140
|
+
})
|
134
141
|
|
135
142
|
options[:data_fields].each do |field|
|
136
143
|
data[field] = r.data[field]
|
@@ -15,7 +15,12 @@ set :site_title, 'Glyptotheque'
|
|
15
15
|
ready do
|
16
16
|
# Proxy default site index to Glyptotheque index template
|
17
17
|
unless sitemap.find_resource_by_path '/index.html'
|
18
|
-
proxy 'index.html', 'glyptotheque/site-index.html'
|
18
|
+
proxy 'index.html', 'glyptotheque/site-index.html', locals: {
|
19
|
+
section: {
|
20
|
+
title: site_title,
|
21
|
+
slug: 'index'
|
22
|
+
}
|
23
|
+
}
|
19
24
|
end
|
20
25
|
proxy 'sitemap.json', 'glyptotheque/sitemap.json'
|
21
26
|
|
@@ -29,10 +34,14 @@ ready do
|
|
29
34
|
resources.each do |r|
|
30
35
|
# Create virtual index files
|
31
36
|
dir = File.dirname(r.path)
|
37
|
+
section_slug = dir.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '-')
|
32
38
|
index_exists = !!sitemap.find_resource_by_path("#{dir}/index.html")
|
33
39
|
if last_dir != dir && !index_exists
|
34
40
|
proxy "#{dir}/index.html", 'glyptotheque/directory-index.html', locals: {
|
35
|
-
|
41
|
+
section: {
|
42
|
+
title: dir.upcase,
|
43
|
+
slug: dir.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '-')
|
44
|
+
}
|
36
45
|
}
|
37
46
|
last_dir = dir
|
38
47
|
end
|
@@ -85,4 +85,35 @@ h1.glypto-title {
|
|
85
85
|
padding: 40px 30px;
|
86
86
|
background: #ddd;
|
87
87
|
background: linear-gradient(58deg, #ddd, #f6f6f6);
|
88
|
+
box-shadow: inset 0 -10px 0 rgba(black, .13);
|
89
|
+
}
|
90
|
+
|
91
|
+
.glypto-breadcrumbs {
|
92
|
+
transition: 160ms;
|
93
|
+
margin: -30px -30px 0;
|
94
|
+
padding: 0 30px;
|
95
|
+
font-weight: bold;
|
96
|
+
font-size: em(12);
|
97
|
+
line-height: 27px;
|
98
|
+
color: $dark-grey;
|
99
|
+
opacity: .7;
|
100
|
+
|
101
|
+
&:hover {
|
102
|
+
opacity: 1;
|
103
|
+
}
|
104
|
+
|
105
|
+
a:link,
|
106
|
+
a:hover,
|
107
|
+
a:visited {
|
108
|
+
color: inherit;
|
109
|
+
text-decoration: none;
|
110
|
+
}
|
111
|
+
|
112
|
+
a:hover {
|
113
|
+
text-decoration: underline;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
.glypto-nav.s-hidden ~ .glyptotheque > .glypto-breadcrumbs {
|
118
|
+
padding-left: 40px;
|
88
119
|
}
|
@@ -6,18 +6,18 @@
|
|
6
6
|
}
|
7
7
|
|
8
8
|
.glypto-nav {
|
9
|
-
transition: 120ms ease-
|
9
|
+
transition: 120ms ease-in;
|
10
10
|
-webkit-font-smoothing: antialiased;
|
11
11
|
color: #ddd;
|
12
12
|
font-size: 14px;
|
13
13
|
|
14
14
|
&.s-hidden {
|
15
|
+
transition: 120ms ease-out;
|
15
16
|
margin-left: -$glypto-nav-width;
|
16
17
|
|
17
18
|
> .glypto-nav-toggle {
|
18
19
|
margin-right: -35px;
|
19
20
|
opacity: .7;
|
20
|
-
background: none;
|
21
21
|
|
22
22
|
&:before {
|
23
23
|
box-shadow: 0 2px 0 1px black, 0 7px 0 1px black, 0 12px 0 1px black;
|
@@ -120,11 +120,13 @@
|
|
120
120
|
|
121
121
|
a {
|
122
122
|
transition: 50ms;
|
123
|
+
color: #ddd;
|
123
124
|
|
124
125
|
&:hover,
|
125
126
|
&:focus {
|
126
127
|
transition: none;
|
127
128
|
background: rgba(white, .07);
|
129
|
+
color: white;
|
128
130
|
}
|
129
131
|
|
130
132
|
&:active {
|
@@ -177,7 +179,6 @@
|
|
177
179
|
}
|
178
180
|
|
179
181
|
li.s-selected > a {
|
180
|
-
font-weight: 500;
|
181
182
|
background: linear-gradient(58deg, rgba(black, .6), rgba(black, .1));
|
182
183
|
|
183
184
|
&:active,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- unless current_page.data.title
|
2
|
-
- if current_page.metadata.locals[:
|
3
|
-
h1.glypto-title = current_page.metadata.locals.
|
2
|
+
- if current_page.metadata.locals[:section]
|
3
|
+
h1.glypto-title = current_page.metadata.locals.section.title
|
4
4
|
|
5
5
|
- resources_for(current_page.url, exclude_indexes: true, sort_by: :nav_order).each do |r|
|
6
6
|
|
@@ -1,12 +1,19 @@
|
|
1
1
|
- content_for :page_title, site_title
|
2
2
|
- content_for :ng_app, 'glyptotheque'
|
3
|
-
- content_for :stylesheets,
|
3
|
+
- content_for :stylesheets, stylesheet_link_tag('glyptotheque')
|
4
|
+
|
5
|
+
- current_section = current_page.metadata.locals[:section]
|
6
|
+
- if current_section
|
7
|
+
- content_for :body_class, "section-#{current_section[:slug]}"
|
4
8
|
|
5
9
|
= wrap_layout :layout do
|
6
10
|
- if resource_tree('/').any?
|
7
11
|
= partial 'glyptotheque/nav'
|
8
12
|
|
9
13
|
main.glyptotheque
|
14
|
+
- if current_page.parent
|
15
|
+
.glypto-breadcrumbs
|
16
|
+
= link_to current_page.parent.metadata.locals.section.title, current_page.parent.url
|
10
17
|
- if current_page.data.title
|
11
18
|
h1.glypto-title = current_page.data.title
|
12
19
|
= yield
|
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.
|
4
|
+
version: '0.11'
|
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-
|
11
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|