jekyll-bookshop 1.1.10 → 1.2.1

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: 651a1f61d8d1f760073e0575aa607cf5ea14bfc2fb32adfc2a9644424dbcb704
4
- data.tar.gz: 4563c66b5438da4d9d02aba4d2fd84340b54616dd1f0279e381007aabf9491fc
3
+ metadata.gz: b79933762b0dc9e409b4ba34dfbb0cd43d53f58a60ddf954b6f08a0867d7d630
4
+ data.tar.gz: fc068a554d4a52bb0c5dd5a9d86b6920e185c106f27d44166895ca35dc3e4ea6
5
5
  SHA512:
6
- metadata.gz: a37fa18b049134dd25b41bd409890eafaa8593181bc42e942090fd8f539f8409466fabe64504b368502a4e90c94bd022396cdf2901b31dd3d92254832d6b438f
7
- data.tar.gz: 0ee2cc741ec67ade5198f7dde105d25cf585615bfef53034f83a48745c3cb8492eaccbfffde18869c2b689c866ab960d9f3b68e796c4baf03131d4b0ed97c18d
6
+ metadata.gz: 2e6f74cf9de65d5386898bba5a9ba0cd8df2526bb0e5a28cd070aac788d08c51a23c09aca7c1e4aa12e18c58c217bb3cb2fd9382f8867f249cd2d27b94d0dec0
7
+ data.tar.gz: b3410a5149720f5265284c40f10671e27842e845ddef8c4d6c055595530bdcccd7124859c4a1b8c562f71b14238cada9bce1afda2e820142c21844b781f35e55
@@ -25,10 +25,33 @@ module JekyllBookshop
25
25
  site.config['sass']['load_paths'].push(Pathname.new(bookshop_path + '/sass').cleanpath.to_s)
26
26
  end
27
27
  end
28
+
29
+ module Filters
30
+ def addmods(classname, mods = {})
31
+ base = classname.partition(" ").first
32
+ mods.each do |mod|
33
+ if mod[1]
34
+ classname = "#{classname} #{base}--#{mod[0]}"
35
+ end
36
+ end
37
+ return classname
38
+ end
39
+
40
+ def addstates(classname, states = {})
41
+ states.each do |state|
42
+ if state[1]
43
+ classname = "#{classname} is-#{state[0]}"
44
+ end
45
+ end
46
+ return classname
47
+ end
48
+ end
28
49
  end
29
50
 
30
51
  Liquid::Template.register_tag("component", JekyllBookshop::Tag)
31
52
 
53
+ Liquid::Template.register_filter(JekyllBookshop::Filters)
54
+
32
55
  Jekyll::Hooks.register :site, :after_init do |site|
33
56
  JekyllBookshop::Styles.open_bookshop(site)
34
57
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllBookshop
2
- VERSION = "1.1.10"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-bookshop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liam Bigelow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-01 00:00:00.000000000 Z
11
+ date: 2020-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll