jekyll_emoji_tag 0.1.3 → 0.1.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: ddd8729d026118c762fbf96590af45463edd23c3e4d251c7a3fff43855ee8d3a
4
- data.tar.gz: cd43beae43873489e14694e8f95d992ae1490d91e5ea5a39261fad4a13021a83
3
+ metadata.gz: d9eff8c7ae7a42a8a2c44213ed53d3956913bc12456409ee78a59d0b7ed6bc9a
4
+ data.tar.gz: cfa18b18f3cb225e01f7ad3b32d6b4802a3d353f7041e7f66a82829d322efb67
5
5
  SHA512:
6
- metadata.gz: c983779ec94aad14427922e797f9a7212208273cd23ac4338d85d3c76ab834a7516d9541655f2b3106b365b9ed191e59c1e726c24c8760651772ae3367c916b5
7
- data.tar.gz: 961e62a246bfa76d6b150c19c923beb02dd73f4b795451f00771a659764515c771ba06843158bae125f3c7d80ebb02f2a5579834c6521b3b937e26fb19f31c89
6
+ metadata.gz: 3212297ad9c2de5fbb027e9b0bf62d461755633dbff5126570eb8508204c85f3fb7983eda12c72e4a3af57b2c1f85f47d0e8696c1fa6ca459503610b0de63b2c
7
+ data.tar.gz: 73f000f1d95fc051085d4d3f405290e1f06b5d5d9dd05205a47a9a10487e6b790b27e04cdbff47eba7e6f1b2bd849c3c195c7c8be6775a47f11b7c7d3411f6fa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.1.4 / 2024-12-21
4
+
5
+ * Added the `emoji` class to the emitted span or div.
6
+ * The demo webapp now includes a stylesheet: `/assets/css/jekyll_emoji`.
7
+ * Previous versions defaulted to `font-size: 3em;`.
8
+ If you want the default font size to remain as it was for previous version of this Jekyll tag,
9
+ define the emoji class as:
10
+
11
+ ```css
12
+ .emoji {
13
+ font-size: 3em;
14
+ }
15
+ ```
16
+
3
17
  ## 0.1.3 / 2024-07-24
4
18
 
5
19
  * Make compatible with `jekyll_plugin_support` v1.0.0
@@ -18,8 +18,9 @@ Gem::Specification.new do |spec|
18
18
  'homepage_uri' => spec.homepage,
19
19
  'source_code_uri' => host,
20
20
  }
21
- spec.name = 'jekyll_emoji_tag'
22
- spec.post_install_message = <<~END_MESSAGE
21
+ spec.name = 'jekyll_emoji_tag'
22
+ spec.platform = Gem::Platform::RUBY
23
+ spec.post_install_message = <<~END_MESSAGE
23
24
 
24
25
  Thanks for installing #{spec.name}!
25
26
 
data/lib/emoji.rb CHANGED
@@ -67,14 +67,18 @@ module JekyllEmojiTag
67
67
  # @param tokens [Liquid::ParseContext] tokenized command line
68
68
  # @return [void]
69
69
  def render_impl
70
- @klass = @helper.parameter_specified? 'class'
71
- @tag = @helper.parameter_specified?('div') ? 'div' : 'span'
72
- @style = @helper.parameter_specified? 'style'
73
- @emoji_name = @helper.parameter_specified?('name') || 'smiley' # Ignored if `list` is specified
74
70
  @emoji_align = @helper.parameter_specified?('align') || 'inline' # Allowable values are: inline, right or left
75
- @emoji_size = @helper.parameter_specified?('size') || '3em'
71
+
72
+ emoji_size = @helper.parameter_specified?('size')
73
+ @emoji_size = "font-size: #{emoji_size}; " if emoji_size
74
+
75
+ @emoji_name = @helper.parameter_specified?('name') || 'smiley' # Ignored if `list` is specified
76
76
  @emoji_and_name = @helper.parameter_specified? 'emoji_and_name'
77
+ @klass = @helper.parameter_specified? 'class'
77
78
  @list = @helper.parameter_specified? 'list'
79
+ @style = @helper.parameter_specified? 'style'
80
+ @tag = @helper.parameter_specified?('div') ? 'div' : 'span'
81
+
78
82
  @emoji_hex_code = Emoji.emojis[@emoji_name] if @emoji_name || Emoji.emojis['boom']
79
83
 
80
84
  # variables defined in pages are stored as hash values in liquid_context
@@ -118,9 +122,10 @@ module JekyllEmojiTag
118
122
  end
119
123
 
120
124
  name = " <code>#{emoji_name}</code>" if @emoji_and_name
121
- klass = @klass ? " class='#{@klass}'" : ''
125
+ klass = @klass ? " class='emoji #{@klass}'" : " class='emoji'"
126
+ style = "#{@emoji_size}#{align};#{@style}".strip.gsub ';;', ';'
122
127
 
123
- "<#{@tag}#{klass} style='font-size: #{@emoji_size};#{align};#{@style}'>#{emoji_hex_code}</#{@tag}>#{name}"
128
+ "<#{@tag}#{klass} style='#{style}'>#{emoji_hex_code}</#{@tag}>#{name}"
124
129
  end
125
130
 
126
131
  def list
@@ -1,3 +1,3 @@
1
1
  module JekyllEmojiTag
2
- VERSION = '0.1.3'.freeze unless defined? VERSION
2
+ VERSION = '0.1.4'.freeze unless defined? VERSION
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_emoji_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-07-26 00:00:00.000000000 Z
10
+ date: 2024-12-21 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: jekyll
@@ -84,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
83
  - !ruby/object:Gem::Version
85
84
  version: '0'
86
85
  requirements: []
87
- rubygems_version: 3.5.16
88
- signing_key:
86
+ rubygems_version: 3.6.0
89
87
  specification_version: 4
90
88
  summary: Inserts an emoji
91
89
  test_files: []