jekyll_patternbot 1.6.3 → 1.6.4

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
  SHA256:
3
- metadata.gz: 5c850baba774dbdd83ad62e944a74169f2e56885ffac8d09932005cc8ccd7b10
4
- data.tar.gz: 6d8f1b4905396e1cef96504cabc02846688608e7a54489ee08afaddbf2a3a499
3
+ metadata.gz: 43ab1b44bc0d38e1c08d6adf0900166f6f98937a1dbeca6ed76e7f20e8651499
4
+ data.tar.gz: 57d298f8bf795cb01cb9c615d8c71e037f1e9c221ef28c357587d722631b5099
5
5
  SHA512:
6
- metadata.gz: f0ac14d0cf87b8fac9a07d5d5666b4edbdd860a307666dcd41b590d389a231744bf365e19ebb1394241db710c046e27f39fd69e6b0dbcd6e815d08f436672283
7
- data.tar.gz: 321ee6fd3360958c57209a1be3991fd1e70b9aecc46b1255f623d3d6edba1cde153449e12543e7c8b7bd239e70820a3ff8cb8c82884f04a57d368e40497f71f9
6
+ metadata.gz: '01028fb49ea3b1e562648b01c002d4aaeb538fd9e313740c6a40ab75ae3572caa57e0911666e7b3ea74e7914a706ed9f4204646d52d49ee170c10e1baa09da8e'
7
+ data.tar.gz: b00cd01acef476d6af955d121309ed61160ab7503586a83baf95ea96514b0625dcd939ad3485713151262c4c49a5aa753974893b0bb4034a0a94e4a4fb779fcf
@@ -5,7 +5,15 @@ Jekyll Patternbot adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ---
7
7
 
8
- ## [1.6.3]
8
+ ## [1.6.4] — 2020-01-20
9
+
10
+ ### Fixed
11
+
12
+ - Allow accent colours & fonts to show when there isn’t a primary.
13
+
14
+ ---
15
+
16
+ ## [1.6.3] — 2020-01-20
9
17
 
10
18
  ### Changed
11
19
 
@@ -22,7 +22,9 @@
22
22
  {% endunless %}
23
23
 
24
24
  {% unless page._PatternbotData.css.theme.colors.accent == empty %}
25
- {% assign show_hr = true %}
25
+ {% unless page._PatternbotData.css.theme.colors.primary == empty %}
26
+ {% assign show_hr = true %}
27
+ {% endunless %}
26
28
  {% include patternbot_pattern_brand_color_swatches.html style="small" title="Accent" key="accent" colors=page._PatternbotData.css.theme.colors.accent show_hr=show_hr %}
27
29
  {% endunless %}
28
30
 
@@ -17,7 +17,9 @@
17
17
  {% endif %}
18
18
 
19
19
  {% for font in page._PatternbotData.css.theme.fonts.accent %}
20
- {% assign show_hr = true %}
20
+ {% if page._PatternbotData.css.theme.fonts.primary %}
21
+ {% assign show_hr = true %}
22
+ {% endif %}
21
23
  {% include patternbot_pattern_brand_typeface.html title="Accent" key="accent" font=font desc=page._PatternbotConfig.patternbot.fonts.accent preposition="an" show_hr=show_hr %}
22
24
  {% endfor %}
23
25
  </div>
@@ -2,21 +2,51 @@ module JekyllPatternbot
2
2
  class BrandProcessor
3
3
 
4
4
  def remove_unless_colors
5
+ has_primary_colors = true
6
+ has_accent_colors = true
7
+
5
8
  begin PatternbotData.dig(:css, :theme, :colors, :primary)
6
9
  unless PatternbotData[:css][:theme][:colors][:primary].length > 0
7
- PatternbotData[:patterns][:internal]['brand'][:config]['patterns'].delete 'colors'
10
+ has_primary_colors = false
8
11
  end
9
12
  rescue
13
+ has_primary_colors = false
14
+ end
15
+
16
+ begin PatternbotData.dig(:css, :theme, :colors, :accent)
17
+ unless PatternbotData[:css][:theme][:colors][:accent].length > 0
18
+ has_accent_colors = false
19
+ end
20
+ rescue
21
+ has_accent_colors = false
22
+ end
23
+
24
+ unless has_primary_colors or has_accent_colors
10
25
  PatternbotData[:patterns][:internal]['brand'][:config]['patterns'].delete 'colors'
11
26
  end
12
27
  end
13
28
 
14
29
  def remove_unless_typefaces
30
+ has_primary_typefaces = true
31
+ has_accent_typefaces = true
32
+
15
33
  begin PatternbotData.dig(:css, :theme, :fonts, :primary)
16
34
  unless PatternbotData.dig(:css, :theme, :fonts, :primary)
17
- PatternbotData[:patterns][:internal]['brand'][:config]['patterns'].delete 'typefaces'
35
+ has_primary_typefaces = false
18
36
  end
19
37
  rescue
38
+ has_primary_typefaces = false
39
+ end
40
+
41
+ begin PatternbotData.dig(:css, :theme, :fonts, :accent)
42
+ unless PatternbotData.dig(:css, :theme, :fonts, :accent)
43
+ has_accent_typefaces = false
44
+ end
45
+ rescue
46
+ has_accent_typefaces = false
47
+ end
48
+
49
+ unless has_primary_typefaces or has_accent_typefaces
20
50
  PatternbotData[:patterns][:internal]['brand'][:config]['patterns'].delete 'typefaces'
21
51
  end
22
52
  end
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JekyllPatternbot
2
- VERSION = '1.6.3'
2
+ VERSION = '1.6.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_patternbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas J Bradley