gallerize-cli 0.4.0 → 0.4.1

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: f139f5fd7ec173ae67a63fe36a94e2ecbcc1bb30
4
- data.tar.gz: 66ff2ddb1abcbece1223698681e04dc75f41ce2a
3
+ metadata.gz: 50a9c63da9fef25d0a4fbebc16d10c49b6c8a03e
4
+ data.tar.gz: fc49251737594df00baaeb40a133f427ccaf5994
5
5
  SHA512:
6
- metadata.gz: dbee1495a2c08ff0fdeda1ff1aa5dc6dd13e1a8e743472e1a09f1f62d010186e8113b7c62a08bd9be7aa698e05e6b4a6959c0af43af5b99c8092ff75dbb10a95
7
- data.tar.gz: 096d0478e2cad463e793fd6c5cc6b8d6c294e0c8f76fb4923d60b7a054e429b526b35470c23c37c9326453620738bfc8b51437bc2756edd718476f9bc396a08f
6
+ metadata.gz: b5c26ca9c02295420c9d8d589849d65bc95dcd8502207c313a80f4fb716e84a9beb761b37f5bbd7739420d8f9fe2d59a39f268314e5a1318ee03a0c34d7ecd0b
7
+ data.tar.gz: 123e89a48f1c4a0037569fce9e338c3043889da40fba43d14d4fa24a9fc84652306e3ad17e0c0424d7cd2a332d0d0b0a64d7af98ab835eade05d16d08a17da3d
@@ -1,8 +1,9 @@
1
1
  (function () {
2
2
  $(document).ready(function () {
3
- if ($(window).width() > 800) {
3
+ if ($(window).width() >= 800) {
4
4
  $('.fancybox').fancybox();
5
- } else {
5
+ }
6
+ else {
6
7
  $('.image-link').each(function () {
7
8
  var image = $(this);
8
9
  var original = image.data('original');
@@ -23,10 +23,10 @@ body {
23
23
  overflow: hidden;
24
24
  .image {
25
25
  float: left;
26
- .image-inner{
26
+ .image-inner {
27
27
  margin: 5px;
28
28
  }
29
- .original-link{
29
+ .original-link {
30
30
  color: $base_color;
31
31
  text-decoration: none;
32
32
  font-weight: bold;
@@ -34,7 +34,7 @@ body {
34
34
  padding: 5px 10px;
35
35
  background-color: $faint_color;
36
36
  font-size: 14px;
37
- &:hover{
37
+ &:hover {
38
38
  background-color: $base_color;
39
39
  color: #fff;
40
40
  }
@@ -47,6 +47,10 @@ body {
47
47
  }
48
48
  }
49
49
 
50
+ .image-title {
51
+ display: none;
52
+ }
53
+
50
54
  .inner-image {
51
55
  margin: 5px;
52
56
  overflow: hidden;
@@ -100,14 +104,39 @@ body {
100
104
  }
101
105
 
102
106
  @media (min-width: 0px) and (max-width: 500px) {
103
- .image {
104
- width: 100%;
107
+ body {
108
+ margin: 0;
109
+ padding: 0;
110
+ }
111
+ .images {
112
+ .image {
113
+ width: 100%;
114
+ .image-inner {
115
+ margin: 0;
116
+ margin-bottom: 1px;
117
+ }
118
+ }
105
119
  }
106
120
  }
107
121
 
108
122
  @media (min-width: 501px) and (max-width: 1000px) {
109
- .image {
110
- width: 50%;
123
+ body {
124
+ margin: 0;
125
+ padding: 0;
126
+ }
127
+ .images {
128
+ .image {
129
+ width: 50%;
130
+ .image-inner {
131
+ margin: 0;
132
+ margin-bottom: 2px;
133
+ }
134
+ &:nth-child(odd) {
135
+ .image-inner {
136
+ margin-right: 2px;
137
+ }
138
+ }
139
+ }
111
140
  }
112
141
  }
113
142
 
@@ -118,14 +147,24 @@ body {
118
147
  }
119
148
 
120
149
  @media (min-width: 1601px) and (max-width: 2000px) {
121
- .image {
122
- width: 25%;
150
+ .images {
151
+ .image {
152
+ width: 25%;
153
+ .image-inner {
154
+ margin: 10px;
155
+ }
156
+ }
123
157
  }
124
158
  }
125
159
 
126
160
  @media (min-width: 2001px) and (max-width: 2800px) {
127
- .image {
128
- width: 20%;
161
+ .images {
162
+ .image {
163
+ width: 20%;
164
+ .image-inner {
165
+ margin: 20px;
166
+ }
167
+ }
129
168
  }
130
169
  }
131
170
 
@@ -135,10 +174,10 @@ body {
135
174
  }
136
175
  }
137
176
 
138
- .fancybox-title-float-wrap .child{
177
+ .fancybox-title-float-wrap .child {
139
178
  background-color: $base_color;
140
179
  text-shadow: 0 1px 2px $dark_color;
141
- a{
180
+ a {
142
181
  font-weight: bold;
143
182
  }
144
183
  }
@@ -1,4 +1,4 @@
1
- site_title: Gallerize Title
1
+ site_title:
2
2
  site_url: '.'
3
3
  output_path: gallerize
4
4
 
@@ -6,22 +6,21 @@ images_per_page: 40
6
6
 
7
7
  file_patterns:
8
8
  - "*.jpg"
9
+ - "*.jpeg"
9
10
  - "*.png"
10
11
  - "*.gif"
11
12
 
12
13
  versions:
13
14
  thumb:
14
15
  width: 400
15
- height: 250
16
- approach: crop
16
+ height: 300
17
17
 
18
18
  large:
19
- width: 1000
20
- height: 800
21
- approach: resize
19
+ width: 1600
20
+ height: 1200
22
21
 
23
22
  parallel:
24
- in_processes: 6
23
+ in_processes: 8
25
24
 
26
25
  image_attributes:
27
26
  example.jpg:
@@ -22,7 +22,7 @@
22
22
  ga('send', 'pageview');
23
23
 
24
24
  %body
25
- %h1.page-title= config.site_title
25
+ %h1.page-title= config.site_title || human_folder_name
26
26
  #images-container
27
27
  - if total_pages > 1
28
28
  .navigation
data/lib/gallerize_cli.rb CHANGED
@@ -6,7 +6,7 @@ require 'logger'
6
6
 
7
7
  module GallerizeCli
8
8
 
9
- VERSION='0.4.0'
9
+ VERSION='0.4.1'
10
10
 
11
11
  class << self
12
12
  def perform
@@ -29,6 +29,7 @@ module GallerizeCli
29
29
  end
30
30
 
31
31
  private
32
+
32
33
  def init_logger
33
34
  l = Logger.new(STDOUT)
34
35
  l.formatter = proc do |severity, datetime, progname, msg|
@@ -37,6 +37,14 @@ module GallerizeCli
37
37
  @locals = locals
38
38
  end
39
39
 
40
+ def human_folder_name
41
+ humanize(File.basename(File.expand_path('.')))
42
+ end
43
+
44
+ def humanize(string)
45
+ string.to_s.gsub(/[-_]+/, ' ').split(' ').collect(&:capitalize).join(' ')
46
+ end
47
+
40
48
  def render
41
49
  GallerizeCli.logger.debug("generate #{file_path}")
42
50
  File.write(file_path, Haml::Engine.new(template).render(self, locals))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gallerize-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher