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 +4 -4
- data/CHANGELOG.md +9 -1
- data/_patterns/brand/colors.html +3 -1
- data/_patterns/brand/typefaces.html +3 -1
- data/_plugins/jekyll_patternbot/processors/brand.rb +32 -2
- data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43ab1b44bc0d38e1c08d6adf0900166f6f98937a1dbeca6ed76e7f20e8651499
|
4
|
+
data.tar.gz: 57d298f8bf795cb01cb9c615d8c71e037f1e9c221ef28c357587d722631b5099
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01028fb49ea3b1e562648b01c002d4aaeb538fd9e313740c6a40ab75ae3572caa57e0911666e7b3ea74e7914a706ed9f4204646d52d49ee170c10e1baa09da8e'
|
7
|
+
data.tar.gz: b00cd01acef476d6af955d121309ed61160ab7503586a83baf95ea96514b0625dcd939ad3485713151262c4c49a5aa753974893b0bb4034a0a94e4a4fb779fcf
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,15 @@ Jekyll Patternbot adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
---
|
7
7
|
|
8
|
-
## [1.6.
|
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
|
|
data/_patterns/brand/colors.html
CHANGED
@@ -22,7 +22,9 @@
|
|
22
22
|
{% endunless %}
|
23
23
|
|
24
24
|
{% unless page._PatternbotData.css.theme.colors.accent == empty %}
|
25
|
-
{%
|
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
|
-
{%
|
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
|
-
|
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
|
-
|
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