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 +4 -4
- data/lib/jekyll-bookshop.rb +23 -0
- data/lib/jekyll-bookshop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b79933762b0dc9e409b4ba34dfbb0cd43d53f58a60ddf954b6f08a0867d7d630
|
4
|
+
data.tar.gz: fc068a554d4a52bb0c5dd5a9d86b6920e185c106f27d44166895ca35dc3e4ea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e6f74cf9de65d5386898bba5a9ba0cd8df2526bb0e5a28cd070aac788d08c51a23c09aca7c1e4aa12e18c58c217bb3cb2fd9382f8867f249cd2d27b94d0dec0
|
7
|
+
data.tar.gz: b3410a5149720f5265284c40f10671e27842e845ddef8c4d6c055595530bdcccd7124859c4a1b8c562f71b14238cada9bce1afda2e820142c21844b781f35e55
|
data/lib/jekyll-bookshop.rb
CHANGED
@@ -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
|
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
|
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-
|
11
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|