jekyll-octopod 0.17.0 → 0.17.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
  SHA256:
3
- metadata.gz: 7d33c0f33b30138d1e974e99cd5823ee64e35de94210b180b8d2fa5c34c5bece
4
- data.tar.gz: d4e7c2abaf6ba064c022ed455b0ac077716bd6e36fbfd005b1d90b94c992c705
3
+ metadata.gz: 241f37f4351eb2298f41b9b28476283589b7ce79ac82a70fe2926de580e43796
4
+ data.tar.gz: f0a1fe92888438a64c9f340a1f8520f3a5158e90c45cc6be2150227935dd1843
5
5
  SHA512:
6
- metadata.gz: a66245f2206986d49d319fd4edd0384123cddcf5964229564c108ba35955c132af238ca8c55f52972a4926f6a997fea9442266a29efc439062854efde4c5e960
7
- data.tar.gz: a21441985a2cdbfe4f2ebaa6571c6b2ad2fe1879e946781a0c8142aaafb42fc228689ee347665353b8763a1b60af1db53905c9b162419ab6d4f633aa53f7d374
6
+ metadata.gz: d87e120cb798a302dc0a45e57eeaa574cdfec3eda5addb3a7ae01f3ca5272bfc8d31c9c9b3d09ecefa3da351498d5eedaf7f2ceb87b0badfdc3ed815d1d15bc5
7
+ data.tar.gz: ae65359cd2e30620cd8d75edcbdb0d368f277a948c98d64ddc71df6bc39b1f21f1e13249688578dff3812a71f2a412c726d272758de56f70fede708c6b9108e5
@@ -25,15 +25,26 @@
25
25
  # Line Awesome Icons Liquid Tag
26
26
  # Documentation can be found at https://icons8.com/line-awesome
27
27
  #
28
+ # Line Awesome ships three icon families sharing one glyph namespace: 'las' (solid, the
29
+ # default here), 'lar' (regular/outline) and 'lab' (brands - Twitter, Facebook, Apple, etc.,
30
+ # who only exist in this family). Because all three families' CSS rules carry equal
31
+ # specificity, whichever one is declared last in the compiled stylesheet always wins if more
32
+ # than one is present on the same element - so brand icons render nothing under the default
33
+ # 'las' class, and must explicitly switch families rather than add 'lab' alongside it.
34
+ #
28
35
  # Example:
29
36
  # {% icon la-camera-retro %}
30
37
  # {% icon la-camera-retro la-lg %}
31
38
  # {% icon la-spinner la-spin %}
32
39
  # {% icon la-shield la-rotate-90 %}
40
+ # {% icon la-twitter lab %} # brand icon: replaces the family, doesn't just add a class
41
+ # {% icon la-star lar %} # outline/regular style instead of the default solid
33
42
 
34
43
  module Jekyll
35
44
  class LineAwesomeTag < Liquid::Tag
36
45
 
46
+ ICON_FAMILIES = %w[las lar lab].freeze
47
+
37
48
  def render(context)
38
49
  if tag_contents = determine_arguments(@markup.strip)
39
50
  icon_class, icon_extra = tag_contents[0], tag_contents[1]
@@ -47,6 +58,7 @@ Syntax error in tag 'icon' while parsing the following markup:
47
58
  Valid syntax:
48
59
  for icons: {% icon la-camera-retro %}
49
60
  for icons with size/spin/rotate: {% icon la-camera-retro la-lg %}
61
+ for a non-default family (lar/lab): {% icon la-twitter lab %}
50
62
  eos
51
63
  end
52
64
  end
@@ -59,10 +71,13 @@ eos
59
71
  end
60
72
 
61
73
  def icon_tag(icon_class, icon_extra = nil)
62
- if icon_extra.empty?
63
- "<i class=\"las #{icon_class}\"></i>"
74
+ family = ICON_FAMILIES.include?(icon_extra) ? icon_extra : 'las'
75
+ modifier = ICON_FAMILIES.include?(icon_extra) ? nil : icon_extra
76
+
77
+ if modifier.nil? || modifier.empty?
78
+ "<i class=\"#{family} #{icon_class}\"></i>"
64
79
  else
65
- "<i class=\"las #{icon_class} #{icon_extra}\"></i>"
80
+ "<i class=\"#{family} #{icon_class} #{modifier}\"></i>"
66
81
  end
67
82
  end
68
83
  end
@@ -3,7 +3,7 @@ module Jekyll
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 17
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-octopod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Eilermann