middleman-portfolio 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -7
- data/VERSION +1 -1
- data/features/fresh_app.feature +5 -0
- data/fixtures/fresh-app/.gitignore +18 -0
- data/fixtures/fresh-app/Gemfile +14 -0
- data/fixtures/fresh-app/Gemfile.lock +143 -0
- data/fixtures/fresh-app/config.rb +72 -0
- data/fixtures/fresh-app/source/images/background.png +0 -0
- data/fixtures/fresh-app/source/images/middleman.png +0 -0
- data/fixtures/fresh-app/source/index.html.erb +10 -0
- data/fixtures/fresh-app/source/javascripts/all.js +1 -0
- data/fixtures/fresh-app/source/layouts/layout.erb +19 -0
- data/fixtures/fresh-app/source/portfolio/1/example.png +0 -0
- data/fixtures/fresh-app/source/portfolio/2/example-bw.png +0 -0
- data/fixtures/fresh-app/source/stylesheets/all.css +55 -0
- data/fixtures/fresh-app/source/stylesheets/normalize.css +375 -0
- data/lib/middleman-portfolio.rb +10 -4
- data/lib/template/source/portfolio.html.erb +2 -2
- data/lib/template/source/project.html.erb +1 -1
- metadata +15 -2
- data/middleman-portfolio.gemspec +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea14d263167da564bd0fdb932cde00a143bd1514
|
4
|
+
data.tar.gz: 2a706400224bb3223caa960099631faaab7e9885
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f25a3825a0e7d5d26fb3992bd59affd983f033ff64697cc7bb8f4f325c44fe5fd17f6eedbd7a40479dbf93c5cb996c10afdea37816f6345db8d83a250785d479
|
7
|
+
data.tar.gz: 7d6e8d4014ba7d91d26a04afd305d1121311c8bd9f4088c63261642ae654250b3133b1167ed1033e378ead3643d9b928b87287b7b1c0456bbbe40e9ed442949e
|
data/Rakefile
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler'
|
3
|
-
Bundler::GemHelper.install_tasks
|
4
|
-
|
5
|
-
task default: :test
|
6
|
-
# encoding: utf-8
|
7
|
-
|
8
3
|
begin
|
9
4
|
Bundler.setup(:default, :development)
|
10
5
|
rescue Bundler::BundlerError => e
|
@@ -15,7 +10,6 @@ end
|
|
15
10
|
require 'rake'
|
16
11
|
|
17
12
|
require 'jeweler'
|
18
|
-
|
19
13
|
Jeweler::Tasks.new do |gem|
|
20
14
|
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
21
15
|
gem.name = "middleman-portfolio"
|
@@ -27,7 +21,6 @@ Jeweler::Tasks.new do |gem|
|
|
27
21
|
gem.authors = ["Dave Hulihan"]
|
28
22
|
# dependencies defined in Gemfile
|
29
23
|
end
|
30
|
-
|
31
24
|
Jeweler::RubygemsDotOrgTasks.new
|
32
25
|
|
33
26
|
require 'rake/testtask'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
6
|
+
|
7
|
+
# Ignore bundler config
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the build directory
|
11
|
+
/build
|
12
|
+
|
13
|
+
# Ignore cache
|
14
|
+
/.sass-cache
|
15
|
+
/.cache
|
16
|
+
|
17
|
+
# Ignore .DS_store file
|
18
|
+
.DS_Store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# If you do not have OpenSSL installed, update
|
2
|
+
# the following line to use "http://" instead
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gem "middleman", "~>3.4.0"
|
6
|
+
gem "middleman-portfolio", path: "../.."
|
7
|
+
# Live-reloading plugin
|
8
|
+
gem "middleman-livereload", "~> 3.1.0"
|
9
|
+
|
10
|
+
# For faster file watcher updates on Windows:
|
11
|
+
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
12
|
+
|
13
|
+
# Windows does not come with time zone data
|
14
|
+
gem "tzinfo-data", platforms: [:mswin, :mingw, :jruby]
|
@@ -0,0 +1,143 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
middleman-portfolio (1.0.0)
|
5
|
+
mini_magick (~> 4.2.10)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (4.2.3)
|
11
|
+
i18n (~> 0.7)
|
12
|
+
json (~> 1.7, >= 1.7.7)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
15
|
+
tzinfo (~> 1.1)
|
16
|
+
capybara (2.4.4)
|
17
|
+
mime-types (>= 1.16)
|
18
|
+
nokogiri (>= 1.3.3)
|
19
|
+
rack (>= 1.0.0)
|
20
|
+
rack-test (>= 0.5.4)
|
21
|
+
xpath (~> 2.0)
|
22
|
+
chunky_png (1.3.4)
|
23
|
+
coffee-script (2.4.1)
|
24
|
+
coffee-script-source
|
25
|
+
execjs
|
26
|
+
coffee-script-source (1.9.1.1)
|
27
|
+
compass (1.0.3)
|
28
|
+
chunky_png (~> 1.2)
|
29
|
+
compass-core (~> 1.0.2)
|
30
|
+
compass-import-once (~> 1.0.5)
|
31
|
+
rb-fsevent (>= 0.9.3)
|
32
|
+
rb-inotify (>= 0.9)
|
33
|
+
sass (>= 3.3.13, < 3.5)
|
34
|
+
compass-core (1.0.3)
|
35
|
+
multi_json (~> 1.0)
|
36
|
+
sass (>= 3.3.0, < 3.5)
|
37
|
+
compass-import-once (1.0.5)
|
38
|
+
sass (>= 3.2, < 3.5)
|
39
|
+
em-websocket (0.5.1)
|
40
|
+
eventmachine (>= 0.12.9)
|
41
|
+
http_parser.rb (~> 0.6.0)
|
42
|
+
erubis (2.7.0)
|
43
|
+
eventmachine (1.0.8)
|
44
|
+
execjs (2.5.2)
|
45
|
+
ffi (1.9.10)
|
46
|
+
haml (4.0.7)
|
47
|
+
tilt
|
48
|
+
hike (1.2.3)
|
49
|
+
hooks (0.4.0)
|
50
|
+
uber (~> 0.0.4)
|
51
|
+
http_parser.rb (0.6.0)
|
52
|
+
i18n (0.7.0)
|
53
|
+
json (1.8.3)
|
54
|
+
kramdown (1.8.0)
|
55
|
+
listen (3.0.3)
|
56
|
+
rb-fsevent (>= 0.9.3)
|
57
|
+
rb-inotify (>= 0.9)
|
58
|
+
middleman (3.4.0)
|
59
|
+
coffee-script (~> 2.2)
|
60
|
+
compass (>= 1.0.0, < 2.0.0)
|
61
|
+
compass-import-once (= 1.0.5)
|
62
|
+
execjs (~> 2.0)
|
63
|
+
haml (>= 4.0.5)
|
64
|
+
kramdown (~> 1.2)
|
65
|
+
middleman-core (= 3.4.0)
|
66
|
+
middleman-sprockets (>= 3.1.2)
|
67
|
+
sass (>= 3.4.0, < 4.0)
|
68
|
+
uglifier (~> 2.5)
|
69
|
+
middleman-core (3.4.0)
|
70
|
+
activesupport (~> 4.1)
|
71
|
+
bundler (~> 1.1)
|
72
|
+
capybara (~> 2.4.4)
|
73
|
+
erubis
|
74
|
+
hooks (~> 0.3)
|
75
|
+
i18n (~> 0.7.0)
|
76
|
+
listen (~> 3.0.3)
|
77
|
+
padrino-helpers (~> 0.12.3)
|
78
|
+
rack (>= 1.4.5, < 2.0)
|
79
|
+
thor (>= 0.15.2, < 2.0)
|
80
|
+
tilt (~> 1.4.1, < 2.0)
|
81
|
+
middleman-livereload (3.1.1)
|
82
|
+
em-websocket (>= 0.2.0)
|
83
|
+
middleman-core (>= 3.0.2)
|
84
|
+
multi_json (~> 1.0)
|
85
|
+
rack-livereload
|
86
|
+
middleman-sprockets (3.4.2)
|
87
|
+
middleman-core (>= 3.3)
|
88
|
+
sprockets (~> 2.12.1)
|
89
|
+
sprockets-helpers (~> 1.1.0)
|
90
|
+
sprockets-sass (~> 1.3.0)
|
91
|
+
mime-types (2.6.1)
|
92
|
+
mini_magick (4.2.10)
|
93
|
+
mini_portile (0.6.2)
|
94
|
+
minitest (5.8.0)
|
95
|
+
multi_json (1.11.2)
|
96
|
+
nokogiri (1.6.6.2)
|
97
|
+
mini_portile (~> 0.6.0)
|
98
|
+
padrino-helpers (0.12.5)
|
99
|
+
i18n (~> 0.6, >= 0.6.7)
|
100
|
+
padrino-support (= 0.12.5)
|
101
|
+
tilt (~> 1.4.1)
|
102
|
+
padrino-support (0.12.5)
|
103
|
+
activesupport (>= 3.1)
|
104
|
+
rack (1.6.4)
|
105
|
+
rack-livereload (0.3.16)
|
106
|
+
rack
|
107
|
+
rack-test (0.6.3)
|
108
|
+
rack (>= 1.0)
|
109
|
+
rb-fsevent (0.9.5)
|
110
|
+
rb-inotify (0.9.5)
|
111
|
+
ffi (>= 0.5.0)
|
112
|
+
sass (3.4.16)
|
113
|
+
sprockets (2.12.4)
|
114
|
+
hike (~> 1.2)
|
115
|
+
multi_json (~> 1.0)
|
116
|
+
rack (~> 1.0)
|
117
|
+
tilt (~> 1.1, != 1.3.0)
|
118
|
+
sprockets-helpers (1.1.0)
|
119
|
+
sprockets (~> 2.0)
|
120
|
+
sprockets-sass (1.3.1)
|
121
|
+
sprockets (~> 2.0)
|
122
|
+
tilt (~> 1.1)
|
123
|
+
thor (0.19.1)
|
124
|
+
thread_safe (0.3.5)
|
125
|
+
tilt (1.4.1)
|
126
|
+
tzinfo (1.2.2)
|
127
|
+
thread_safe (~> 0.1)
|
128
|
+
uber (0.0.13)
|
129
|
+
uglifier (2.7.1)
|
130
|
+
execjs (>= 0.3.0)
|
131
|
+
json (>= 1.8.0)
|
132
|
+
xpath (2.0.0)
|
133
|
+
nokogiri (~> 1.3)
|
134
|
+
|
135
|
+
PLATFORMS
|
136
|
+
ruby
|
137
|
+
|
138
|
+
DEPENDENCIES
|
139
|
+
middleman (~> 3.4.0)
|
140
|
+
middleman-livereload (~> 3.1.0)
|
141
|
+
middleman-portfolio!
|
142
|
+
tzinfo-data
|
143
|
+
wdm (~> 0.1.0)
|
@@ -0,0 +1,72 @@
|
|
1
|
+
###
|
2
|
+
# Compass
|
3
|
+
###
|
4
|
+
|
5
|
+
# Change Compass configuration
|
6
|
+
# compass_config do |config|
|
7
|
+
# config.output_style = :compact
|
8
|
+
# end
|
9
|
+
|
10
|
+
###
|
11
|
+
# Page options, layouts, aliases and proxies
|
12
|
+
###
|
13
|
+
|
14
|
+
# Per-page layout changes:
|
15
|
+
#
|
16
|
+
# With no layout
|
17
|
+
# page "/path/to/file.html", :layout => false
|
18
|
+
#
|
19
|
+
# With alternative layout
|
20
|
+
# page "/path/to/file.html", :layout => :otherlayout
|
21
|
+
#
|
22
|
+
# A path which all have the same layout
|
23
|
+
# with_layout :admin do
|
24
|
+
# page "/admin/*"
|
25
|
+
# end
|
26
|
+
|
27
|
+
# Proxy pages (https://middlemanapp.com/advanced/dynamic_pages/)
|
28
|
+
# proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
|
29
|
+
# :which_fake_page => "Rendering a fake page with a local variable" }
|
30
|
+
|
31
|
+
###
|
32
|
+
# Helpers
|
33
|
+
###
|
34
|
+
activate :portfolio
|
35
|
+
# Automatic image dimensions on image_tag helper
|
36
|
+
# activate :automatic_image_sizes
|
37
|
+
|
38
|
+
# Reload the browser automatically whenever files change
|
39
|
+
# configure :development do
|
40
|
+
# activate :livereload
|
41
|
+
# end
|
42
|
+
|
43
|
+
# Methods defined in the helpers block are available in templates
|
44
|
+
# helpers do
|
45
|
+
# def some_helper
|
46
|
+
# "Helping"
|
47
|
+
# end
|
48
|
+
# end
|
49
|
+
|
50
|
+
set :css_dir, 'stylesheets'
|
51
|
+
|
52
|
+
set :js_dir, 'javascripts'
|
53
|
+
|
54
|
+
set :images_dir, 'images'
|
55
|
+
|
56
|
+
# Build-specific configuration
|
57
|
+
configure :build do
|
58
|
+
# For example, change the Compass output style for deployment
|
59
|
+
# activate :minify_css
|
60
|
+
|
61
|
+
# Minify Javascript on build
|
62
|
+
# activate :minify_javascript
|
63
|
+
|
64
|
+
# Enable cache buster
|
65
|
+
# activate :asset_hash
|
66
|
+
|
67
|
+
# Use relative URLs
|
68
|
+
# activate :relative_assets
|
69
|
+
|
70
|
+
# Or use a different image path
|
71
|
+
# set :http_prefix, "/Content/images/"
|
72
|
+
end
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_tree .
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
|
6
|
+
<!-- Always force latest IE rendering engine or request Chrome Frame -->
|
7
|
+
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
8
|
+
|
9
|
+
<!-- Use title if it's in the page YAML frontmatter -->
|
10
|
+
<title><%= current_page.data.title || "The Middleman" %></title>
|
11
|
+
|
12
|
+
<%= stylesheet_link_tag "normalize", "all" %>
|
13
|
+
<%= javascript_include_tag "all" %>
|
14
|
+
</head>
|
15
|
+
|
16
|
+
<body class="<%= page_classes %>">
|
17
|
+
<%= yield %>
|
18
|
+
</body>
|
19
|
+
</html>
|
Binary file
|
Binary file
|
@@ -0,0 +1,55 @@
|
|
1
|
+
@charset "utf-8";
|
2
|
+
|
3
|
+
body {
|
4
|
+
background: #d4d4d4 url("../images/background.png");
|
5
|
+
text-align: center;
|
6
|
+
font-family: sans-serif; }
|
7
|
+
|
8
|
+
h1 {
|
9
|
+
color: rgba(0, 0, 0, .3);
|
10
|
+
font-weight: bold;
|
11
|
+
font-size: 32px;
|
12
|
+
letter-spacing: -1px;
|
13
|
+
text-transform: uppercase;
|
14
|
+
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
|
15
|
+
background: url("../images/middleman.png") no-repeat center 100px;
|
16
|
+
padding: 350px 0 10px;
|
17
|
+
margin: 0; }
|
18
|
+
|
19
|
+
.doc {
|
20
|
+
font-size: 14px;
|
21
|
+
margin: 0; }
|
22
|
+
.doc:before,
|
23
|
+
.doc:after {
|
24
|
+
opacity: .2;
|
25
|
+
padding: 6px;
|
26
|
+
font-style: normal;
|
27
|
+
position: relative;
|
28
|
+
content: "•"; }
|
29
|
+
.doc a {
|
30
|
+
color: rgba(0, 0, 0, 0.3); }
|
31
|
+
.doc a:hover {
|
32
|
+
color: #666; }
|
33
|
+
|
34
|
+
.welcome {
|
35
|
+
-webkit-animation-name: welcome;
|
36
|
+
-webkit-animation-duration: .9s; }
|
37
|
+
|
38
|
+
@-webkit-keyframes welcome {
|
39
|
+
from {
|
40
|
+
-webkit-transform: scale(0);
|
41
|
+
opacity: 0;
|
42
|
+
}
|
43
|
+
50% {
|
44
|
+
-webkit-transform: scale(0);
|
45
|
+
opacity: 0;
|
46
|
+
}
|
47
|
+
82.5% {
|
48
|
+
-webkit-transform: scale(1.03);
|
49
|
+
-webkit-animation-timing-function: ease-out;
|
50
|
+
opacity: 1;
|
51
|
+
}
|
52
|
+
to {
|
53
|
+
-webkit-transform: scale(1);
|
54
|
+
}
|
55
|
+
}
|
@@ -0,0 +1,375 @@
|
|
1
|
+
/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
|
2
|
+
|
3
|
+
/* ==========================================================================
|
4
|
+
HTML5 display definitions
|
5
|
+
========================================================================== */
|
6
|
+
|
7
|
+
/*
|
8
|
+
* Corrects `block` display not defined in IE 8/9.
|
9
|
+
*/
|
10
|
+
|
11
|
+
article,
|
12
|
+
aside,
|
13
|
+
details,
|
14
|
+
figcaption,
|
15
|
+
figure,
|
16
|
+
footer,
|
17
|
+
header,
|
18
|
+
hgroup,
|
19
|
+
nav,
|
20
|
+
section,
|
21
|
+
summary {
|
22
|
+
display: block;
|
23
|
+
}
|
24
|
+
|
25
|
+
/*
|
26
|
+
* Corrects `inline-block` display not defined in IE 8/9.
|
27
|
+
*/
|
28
|
+
|
29
|
+
audio,
|
30
|
+
canvas,
|
31
|
+
video {
|
32
|
+
display: inline-block;
|
33
|
+
}
|
34
|
+
|
35
|
+
/*
|
36
|
+
* Prevents modern browsers from displaying `audio` without controls.
|
37
|
+
* Remove excess height in iOS 5 devices.
|
38
|
+
*/
|
39
|
+
|
40
|
+
audio:not([controls]) {
|
41
|
+
display: none;
|
42
|
+
height: 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
/*
|
46
|
+
* Addresses styling for `hidden` attribute not present in IE 8/9.
|
47
|
+
*/
|
48
|
+
|
49
|
+
[hidden] {
|
50
|
+
display: none;
|
51
|
+
}
|
52
|
+
|
53
|
+
/* ==========================================================================
|
54
|
+
Base
|
55
|
+
========================================================================== */
|
56
|
+
|
57
|
+
/*
|
58
|
+
* 1. Sets default font family to sans-serif.
|
59
|
+
* 2. Prevents iOS text size adjust after orientation change, without disabling
|
60
|
+
* user zoom.
|
61
|
+
*/
|
62
|
+
|
63
|
+
html {
|
64
|
+
font-family: sans-serif; /* 1 */
|
65
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
66
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
67
|
+
}
|
68
|
+
|
69
|
+
/*
|
70
|
+
* Removes default margin.
|
71
|
+
*/
|
72
|
+
|
73
|
+
body {
|
74
|
+
margin: 0;
|
75
|
+
}
|
76
|
+
|
77
|
+
/* ==========================================================================
|
78
|
+
Links
|
79
|
+
========================================================================== */
|
80
|
+
|
81
|
+
/*
|
82
|
+
* Addresses `outline` inconsistency between Chrome and other browsers.
|
83
|
+
*/
|
84
|
+
|
85
|
+
a:focus {
|
86
|
+
outline: thin dotted;
|
87
|
+
}
|
88
|
+
|
89
|
+
/*
|
90
|
+
* Improves readability when focused and also mouse hovered in all browsers.
|
91
|
+
*/
|
92
|
+
|
93
|
+
a:active,
|
94
|
+
a:hover {
|
95
|
+
outline: 0;
|
96
|
+
}
|
97
|
+
|
98
|
+
/* ==========================================================================
|
99
|
+
Typography
|
100
|
+
========================================================================== */
|
101
|
+
|
102
|
+
/*
|
103
|
+
* Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
|
104
|
+
* Safari 5, and Chrome.
|
105
|
+
*/
|
106
|
+
|
107
|
+
h1 {
|
108
|
+
font-size: 2em;
|
109
|
+
}
|
110
|
+
|
111
|
+
/*
|
112
|
+
* Addresses styling not present in IE 8/9, Safari 5, and Chrome.
|
113
|
+
*/
|
114
|
+
|
115
|
+
abbr[title] {
|
116
|
+
border-bottom: 1px dotted;
|
117
|
+
}
|
118
|
+
|
119
|
+
/*
|
120
|
+
* Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
121
|
+
*/
|
122
|
+
|
123
|
+
b,
|
124
|
+
strong {
|
125
|
+
font-weight: bold;
|
126
|
+
}
|
127
|
+
|
128
|
+
/*
|
129
|
+
* Addresses styling not present in Safari 5 and Chrome.
|
130
|
+
*/
|
131
|
+
|
132
|
+
dfn {
|
133
|
+
font-style: italic;
|
134
|
+
}
|
135
|
+
|
136
|
+
/*
|
137
|
+
* Addresses styling not present in IE 8/9.
|
138
|
+
*/
|
139
|
+
|
140
|
+
mark {
|
141
|
+
background: #ff0;
|
142
|
+
color: #000;
|
143
|
+
}
|
144
|
+
|
145
|
+
|
146
|
+
/*
|
147
|
+
* Corrects font family set oddly in Safari 5 and Chrome.
|
148
|
+
*/
|
149
|
+
|
150
|
+
code,
|
151
|
+
kbd,
|
152
|
+
pre,
|
153
|
+
samp {
|
154
|
+
font-family: monospace, serif;
|
155
|
+
font-size: 1em;
|
156
|
+
}
|
157
|
+
|
158
|
+
/*
|
159
|
+
* Improves readability of pre-formatted text in all browsers.
|
160
|
+
*/
|
161
|
+
|
162
|
+
pre {
|
163
|
+
white-space: pre;
|
164
|
+
white-space: pre-wrap;
|
165
|
+
word-wrap: break-word;
|
166
|
+
}
|
167
|
+
|
168
|
+
/*
|
169
|
+
* Sets consistent quote types.
|
170
|
+
*/
|
171
|
+
|
172
|
+
q {
|
173
|
+
quotes: "\201C" "\201D" "\2018" "\2019";
|
174
|
+
}
|
175
|
+
|
176
|
+
/*
|
177
|
+
* Addresses inconsistent and variable font size in all browsers.
|
178
|
+
*/
|
179
|
+
|
180
|
+
small {
|
181
|
+
font-size: 80%;
|
182
|
+
}
|
183
|
+
|
184
|
+
/*
|
185
|
+
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
|
186
|
+
*/
|
187
|
+
|
188
|
+
sub,
|
189
|
+
sup {
|
190
|
+
font-size: 75%;
|
191
|
+
line-height: 0;
|
192
|
+
position: relative;
|
193
|
+
vertical-align: baseline;
|
194
|
+
}
|
195
|
+
|
196
|
+
sup {
|
197
|
+
top: -0.5em;
|
198
|
+
}
|
199
|
+
|
200
|
+
sub {
|
201
|
+
bottom: -0.25em;
|
202
|
+
}
|
203
|
+
|
204
|
+
/* ==========================================================================
|
205
|
+
Embedded content
|
206
|
+
========================================================================== */
|
207
|
+
|
208
|
+
/*
|
209
|
+
* Removes border when inside `a` element in IE 8/9.
|
210
|
+
*/
|
211
|
+
|
212
|
+
img {
|
213
|
+
border: 0;
|
214
|
+
}
|
215
|
+
|
216
|
+
/*
|
217
|
+
* Corrects overflow displayed oddly in IE 9.
|
218
|
+
*/
|
219
|
+
|
220
|
+
svg:not(:root) {
|
221
|
+
overflow: hidden;
|
222
|
+
}
|
223
|
+
|
224
|
+
/* ==========================================================================
|
225
|
+
Figures
|
226
|
+
========================================================================== */
|
227
|
+
|
228
|
+
/*
|
229
|
+
* Addresses margin not present in IE 8/9 and Safari 5.
|
230
|
+
*/
|
231
|
+
|
232
|
+
figure {
|
233
|
+
margin: 0;
|
234
|
+
}
|
235
|
+
|
236
|
+
/* ==========================================================================
|
237
|
+
Forms
|
238
|
+
========================================================================== */
|
239
|
+
|
240
|
+
/*
|
241
|
+
* Define consistent border, margin, and padding.
|
242
|
+
*/
|
243
|
+
|
244
|
+
fieldset {
|
245
|
+
border: 1px solid #c0c0c0;
|
246
|
+
margin: 0 2px;
|
247
|
+
padding: 0.35em 0.625em 0.75em;
|
248
|
+
}
|
249
|
+
|
250
|
+
/*
|
251
|
+
* 1. Corrects color not being inherited in IE 8/9.
|
252
|
+
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
253
|
+
*/
|
254
|
+
|
255
|
+
legend {
|
256
|
+
border: 0; /* 1 */
|
257
|
+
padding: 0; /* 2 */
|
258
|
+
}
|
259
|
+
|
260
|
+
/*
|
261
|
+
* 1. Corrects font family not being inherited in all browsers.
|
262
|
+
* 2. Corrects font size not being inherited in all browsers.
|
263
|
+
* 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
|
264
|
+
*/
|
265
|
+
|
266
|
+
button,
|
267
|
+
input,
|
268
|
+
select,
|
269
|
+
textarea {
|
270
|
+
font-family: inherit; /* 1 */
|
271
|
+
font-size: 100%; /* 2 */
|
272
|
+
margin: 0; /* 3 */
|
273
|
+
}
|
274
|
+
|
275
|
+
/*
|
276
|
+
* Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
|
277
|
+
* the UA stylesheet.
|
278
|
+
*/
|
279
|
+
|
280
|
+
button,
|
281
|
+
input {
|
282
|
+
line-height: normal;
|
283
|
+
}
|
284
|
+
|
285
|
+
/*
|
286
|
+
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
287
|
+
* and `video` controls.
|
288
|
+
* 2. Corrects inability to style clickable `input` types in iOS.
|
289
|
+
* 3. Improves usability and consistency of cursor style between image-type
|
290
|
+
* `input` and others.
|
291
|
+
*/
|
292
|
+
|
293
|
+
button,
|
294
|
+
html input[type="button"], /* 1 */
|
295
|
+
input[type="reset"],
|
296
|
+
input[type="submit"] {
|
297
|
+
-webkit-appearance: button; /* 2 */
|
298
|
+
cursor: pointer; /* 3 */
|
299
|
+
}
|
300
|
+
|
301
|
+
/*
|
302
|
+
* Re-set default cursor for disabled elements.
|
303
|
+
*/
|
304
|
+
|
305
|
+
button[disabled],
|
306
|
+
input[disabled] {
|
307
|
+
cursor: default;
|
308
|
+
}
|
309
|
+
|
310
|
+
/*
|
311
|
+
* 1. Addresses box sizing set to `content-box` in IE 8/9.
|
312
|
+
* 2. Removes excess padding in IE 8/9.
|
313
|
+
*/
|
314
|
+
|
315
|
+
input[type="checkbox"],
|
316
|
+
input[type="radio"] {
|
317
|
+
box-sizing: border-box; /* 1 */
|
318
|
+
padding: 0; /* 2 */
|
319
|
+
}
|
320
|
+
|
321
|
+
/*
|
322
|
+
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
|
323
|
+
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
|
324
|
+
* (include `-moz` to future-proof).
|
325
|
+
*/
|
326
|
+
|
327
|
+
input[type="search"] {
|
328
|
+
-webkit-appearance: textfield; /* 1 */
|
329
|
+
-moz-box-sizing: content-box;
|
330
|
+
-webkit-box-sizing: content-box; /* 2 */
|
331
|
+
box-sizing: content-box;
|
332
|
+
}
|
333
|
+
|
334
|
+
/*
|
335
|
+
* Removes inner padding and search cancel button in Safari 5 and Chrome
|
336
|
+
* on OS X.
|
337
|
+
*/
|
338
|
+
|
339
|
+
input[type="search"]::-webkit-search-cancel-button,
|
340
|
+
input[type="search"]::-webkit-search-decoration {
|
341
|
+
-webkit-appearance: none;
|
342
|
+
}
|
343
|
+
|
344
|
+
/*
|
345
|
+
* Removes inner padding and border in Firefox 4+.
|
346
|
+
*/
|
347
|
+
|
348
|
+
button::-moz-focus-inner,
|
349
|
+
input::-moz-focus-inner {
|
350
|
+
border: 0;
|
351
|
+
padding: 0;
|
352
|
+
}
|
353
|
+
|
354
|
+
/*
|
355
|
+
* 1. Removes default vertical scrollbar in IE 8/9.
|
356
|
+
* 2. Improves readability and alignment in all browsers.
|
357
|
+
*/
|
358
|
+
|
359
|
+
textarea {
|
360
|
+
overflow: auto; /* 1 */
|
361
|
+
vertical-align: top; /* 2 */
|
362
|
+
}
|
363
|
+
|
364
|
+
/* ==========================================================================
|
365
|
+
Tables
|
366
|
+
========================================================================== */
|
367
|
+
|
368
|
+
/*
|
369
|
+
* Remove most spacing between table cells.
|
370
|
+
*/
|
371
|
+
|
372
|
+
table {
|
373
|
+
border-collapse: collapse;
|
374
|
+
border-spacing: 0;
|
375
|
+
}
|
data/lib/middleman-portfolio.rb
CHANGED
@@ -37,6 +37,8 @@ class Portfolio < ::Middleman::Extension
|
|
37
37
|
# Create tmp dir
|
38
38
|
Dir.mkdir(Portfolio.tmp_dir) unless Dir.exist?(Portfolio.tmp_dir)
|
39
39
|
|
40
|
+
require "mini_magick"
|
41
|
+
|
40
42
|
# set up your extension
|
41
43
|
app.after_build do
|
42
44
|
Portfolio.cleanup
|
@@ -148,7 +150,11 @@ class Portfolio < ::Middleman::Extension
|
|
148
150
|
Dir.glob(File.join(project_dir(project), '*'))
|
149
151
|
end
|
150
152
|
|
151
|
-
|
153
|
+
def project_image_resource(project, image)
|
154
|
+
Middleman::Sitemap::Resource.new(app.sitemap, project_image_resource_path(project, image), image)
|
155
|
+
end
|
156
|
+
|
157
|
+
# project_image_resource_path("/path/to/image.png") => "portfolio/project/image.png"
|
152
158
|
def project_image_resource_path(project, image)
|
153
159
|
File.join(options.portfolio_dir, project, File.basename(image))
|
154
160
|
end
|
@@ -170,7 +176,6 @@ class Portfolio < ::Middleman::Extension
|
|
170
176
|
end
|
171
177
|
|
172
178
|
def project_resource(project, thumbnail_resources)
|
173
|
-
|
174
179
|
Middleman::Sitemap::Resource.new(app.sitemap, project_resource_path(project), source_file(:project)).tap do |resource|
|
175
180
|
resource.add_metadata(
|
176
181
|
locals: {
|
@@ -199,7 +204,8 @@ class Portfolio < ::Middleman::Extension
|
|
199
204
|
resource.add_metadata(
|
200
205
|
locals: {
|
201
206
|
project: project,
|
202
|
-
|
207
|
+
project_image_resource: project_image_resource(project, image),
|
208
|
+
image: project_image_resource_path(project, image)
|
203
209
|
}
|
204
210
|
)
|
205
211
|
end
|
@@ -242,7 +248,7 @@ class Portfolio < ::Middleman::Extension
|
|
242
248
|
end
|
243
249
|
|
244
250
|
def debug(str)
|
245
|
-
#puts str
|
251
|
+
#puts str unless app.build?
|
246
252
|
end
|
247
253
|
|
248
254
|
helpers do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% for project in project_resources %>
|
2
2
|
<% if project.metadata[:locals][:thumbnail_resources] %>
|
3
|
-
<% link_to project.
|
4
|
-
<%= image_tag project.metadata[:locals][:thumbnail_resources].first.
|
3
|
+
<% link_to project.url, title: project.metadata[:locals][:name], class: "#{options.thumbnail_link_class}" do %>
|
4
|
+
<%= image_tag project.metadata[:locals][:thumbnail_resources].first.url, class: "#{options.thumbnail_class}" %>
|
5
5
|
<% end %>
|
6
6
|
<% else %>
|
7
7
|
<!-- No thumbnails found for <%= project.metadata[:locals][:name] %> -->
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% for thumb in thumbnail_resources %>
|
2
|
-
<% link_to thumb.metadata[:locals][:
|
2
|
+
<% link_to thumb.metadata[:locals][:project_image_resource].url, class: "#{options.thumbnail_link_class}" do %>
|
3
3
|
<%= image_tag thumb.path, class: "#{options.thumbnail_class}" %>
|
4
4
|
<% end %>
|
5
5
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-portfolio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Hulihan
|
@@ -91,12 +91,25 @@ files:
|
|
91
91
|
- README.md
|
92
92
|
- Rakefile
|
93
93
|
- VERSION
|
94
|
+
- features/fresh_app.feature
|
94
95
|
- features/support/env.rb
|
96
|
+
- fixtures/fresh-app/.gitignore
|
97
|
+
- fixtures/fresh-app/Gemfile
|
98
|
+
- fixtures/fresh-app/Gemfile.lock
|
99
|
+
- fixtures/fresh-app/config.rb
|
100
|
+
- fixtures/fresh-app/source/images/background.png
|
101
|
+
- fixtures/fresh-app/source/images/middleman.png
|
102
|
+
- fixtures/fresh-app/source/index.html.erb
|
103
|
+
- fixtures/fresh-app/source/javascripts/all.js
|
104
|
+
- fixtures/fresh-app/source/layouts/layout.erb
|
105
|
+
- fixtures/fresh-app/source/portfolio/1/example.png
|
106
|
+
- fixtures/fresh-app/source/portfolio/2/example-bw.png
|
107
|
+
- fixtures/fresh-app/source/stylesheets/all.css
|
108
|
+
- fixtures/fresh-app/source/stylesheets/normalize.css
|
95
109
|
- lib/middleman-portfolio.rb
|
96
110
|
- lib/middleman_extension.rb
|
97
111
|
- lib/template/source/portfolio.html.erb
|
98
112
|
- lib/template/source/project.html.erb
|
99
|
-
- middleman-portfolio.gemspec
|
100
113
|
- screenshot.jpg
|
101
114
|
homepage: http://github.com/dhulihan/middleman-portfolio
|
102
115
|
licenses:
|
data/middleman-portfolio.gemspec
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: middleman-portfolio 1.0.0 ruby lib
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = "middleman-portfolio"
|
9
|
-
s.version = "1.0.0"
|
10
|
-
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
-
s.require_paths = ["lib"]
|
13
|
-
s.authors = ["Dave Hulihan"]
|
14
|
-
s.date = "2015-08-14"
|
15
|
-
s.description = "A low-drama portfolio generator for your middleman site."
|
16
|
-
s.email = "dhulihan@gmail.com"
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"README.md"
|
19
|
-
]
|
20
|
-
s.files = [
|
21
|
-
"Gemfile",
|
22
|
-
"README.md",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"features/support/env.rb",
|
26
|
-
"lib/middleman-portfolio.rb",
|
27
|
-
"lib/middleman_extension.rb",
|
28
|
-
"lib/template/source/portfolio.html.erb",
|
29
|
-
"lib/template/source/project.html.erb",
|
30
|
-
"middleman-portfolio.gemspec",
|
31
|
-
"screenshot.jpg"
|
32
|
-
]
|
33
|
-
s.homepage = "http://github.com/dhulihan/middleman-portfolio"
|
34
|
-
s.licenses = ["MIT"]
|
35
|
-
s.rubygems_version = "2.4.5"
|
36
|
-
s.summary = "A low-drama portfolio generator for your middleman site."
|
37
|
-
|
38
|
-
if s.respond_to? :specification_version then
|
39
|
-
s.specification_version = 4
|
40
|
-
|
41
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
42
|
-
s.add_runtime_dependency(%q<middleman-portfolio>, [">= 0"])
|
43
|
-
s.add_runtime_dependency(%q<mini_magick>, [">= 0"])
|
44
|
-
s.add_development_dependency(%q<rake>, [">= 0"])
|
45
|
-
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
46
|
-
s.add_development_dependency(%q<yard>, [">= 0"])
|
47
|
-
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
48
|
-
else
|
49
|
-
s.add_dependency(%q<middleman-portfolio>, [">= 0"])
|
50
|
-
s.add_dependency(%q<mini_magick>, [">= 0"])
|
51
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
52
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
53
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
54
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
55
|
-
end
|
56
|
-
else
|
57
|
-
s.add_dependency(%q<middleman-portfolio>, [">= 0"])
|
58
|
-
s.add_dependency(%q<mini_magick>, [">= 0"])
|
59
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
60
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
61
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
62
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|