jekyll-wns 4.1.1 β 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -5
- data/jekyll-wns.gemspec +1 -1
- data/js/youtube.js +6 -5
- data/lib/jekyll-wns/assets/label_pronounciation.rb +20 -0
- data/lib/jekyll-wns/assets/scene_break_tag.rb +4 -6
- data/lib/jekyll-wns/register_hooks.rb +2 -0
- data/lib/jekyll-wns.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 104dc7939f1c3a81372cf2b9d24ab46562f6368d173573b3246377b1c4189f9e
|
4
|
+
data.tar.gz: e491889d693921266971921c96bff5a283602ec246c328e34760873483a96495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57ddf6562fda69eb06d5ebea185c9a0d08918a850ddb91a25ecbfaf77f4c75cc818ee45e13d090ba7ff20db3e5c93324745fe8959702f717b836db126a09f974
|
7
|
+
data.tar.gz: 7f050031c6a574bd720d496b40ce290a9b57e0bb6769271010db344dacb1c5daee6ad4362f132c6028aee159441efc325b3e0a15c14faa99da9d15763e7a7021
|
data/README.md
CHANGED
@@ -99,12 +99,13 @@ plugins:
|
|
99
99
|
The following snippet should be integrated into your site for the tag to properly work:
|
100
100
|
|
101
101
|
```javascript
|
102
|
-
function loadYouTube() {
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
}
|
102
|
+
function loadYouTube(e = null) {
|
103
|
+
if (e == null) return;
|
104
|
+
var i = e.target.getAttribute('data-videoid');
|
105
|
+
d.getElementById(i).innerHTML = d.getElementById('yt-' + i).innerHTML
|
107
106
|
}
|
107
|
+
|
108
|
+
$('.youtube a:last-child').on('click', loadYouTube);
|
108
109
|
```
|
109
110
|
|
110
111
|
```liquid
|
data/jekyll-wns.gemspec
CHANGED
data/js/youtube.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
function loadYouTube() {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
}
|
1
|
+
function loadYouTube(e = null) {
|
2
|
+
if (e == null) return;
|
3
|
+
var i = e.target.getAttribute('data-videoid');
|
4
|
+
d.getElementById(i).innerHTML = d.getElementById('yt-' + i).innerHTML
|
6
5
|
}
|
6
|
+
|
7
|
+
$('.youtube a:last-child').on('click', loadYouTube);
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module WNS
|
2
|
+
module LabelPronounciation
|
3
|
+
|
4
|
+
def self.enabled?(doc)
|
5
|
+
wns = doc.site.config["wns"] || {}
|
6
|
+
labels = wns["label_pronounciation"] || []
|
7
|
+
labels.length > 0
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.label_unicode!(doc)
|
11
|
+
if LabelUnicode::enabled?(doc)
|
12
|
+
wns = doc.site.config["wns"] || {}
|
13
|
+
labels = wns["label_pronounciation"] || false
|
14
|
+
for i in (0..(labels.length()) - 1) do
|
15
|
+
doc.content = doc.content.gsub(Regexp.new("\b#{labels[i]["term"]}\b"), "<span aria-label='#{labels[i]["pronounciation"]}'>\\1</span>")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -9,16 +9,14 @@ module WNS
|
|
9
9
|
def render(context)
|
10
10
|
case @text
|
11
11
|
when "leaves"
|
12
|
-
'<p style="text-align:center" data-mce-style="text-align:center">π π π π π π π π π π π π</p>'
|
12
|
+
'<p style="text-align:center" data-mce-style="text-align:center" aria-hidden="true">π π π π π π π π π π π π</p>'
|
13
13
|
when "wave"
|
14
|
-
'<p style="text-align:center;letter-spacing:-.13em" data-mce-style="text-align:center;letter-spacing:-.13em"
|
14
|
+
'<p style="text-align:center;letter-spacing:-.13em" data-mce-style="text-align:center;letter-spacing:-.13em" aria-hidden="true">β β‘β β‘β β‘β β‘β β‘β β‘β β‘β β‘β β‘β β‘β </p>'
|
15
15
|
when "wall"
|
16
|
-
'<p style="text-align:center;letter-spacing:-.2em" data-mce-style="text-align:center;letter-spacing:-.2em">ββββββββββββββββββββ</p>'
|
16
|
+
'<p style="text-align:center;letter-spacing:-.2em" data-mce-style="text-align:center;letter-spacing:-.2em" aria-hidden="true">ββββββββββββββββββββ</p>'
|
17
17
|
else
|
18
|
-
'<p style="text-align:center" data-mce-style="text-align:center">πΏπΎπΏπΎπΏπΎπΏπΎπΏπΎπΏπΎπΏπΎπΏ</p>'
|
18
|
+
'<p style="text-align:center" data-mce-style="text-align:center" aria-hidden="true">πΏπΎπΏπΎπΏπΎπΏπΎπΏπΎπΏπΎπΏπΎπΏ</p>'
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
24
|
-
|
@@ -2,6 +2,7 @@ Jekyll::Hooks.register :pages, :pre_render do |document|
|
|
2
2
|
if document.path =~ /(.md|.html)/
|
3
3
|
WNS::Abbreviations::replace_abbreviations! document
|
4
4
|
WNS::LabelUnicode::label_unicode! document
|
5
|
+
WNS::LabelPronounciation::label_unicode! document
|
5
6
|
WNS::Quads::insert_quads_into_document! document
|
6
7
|
end
|
7
8
|
end
|
@@ -15,6 +16,7 @@ end
|
|
15
16
|
Jekyll::Hooks.register :posts, :pre_render do |document|
|
16
17
|
WNS::Abbreviations::replace_abbreviations! document
|
17
18
|
WNS::LabelUnicode::label_unicode! document
|
19
|
+
WNS::LabelPronounciation::label_unicode! document
|
18
20
|
WNS::Quads::insert_quads_into_document! document
|
19
21
|
end
|
20
22
|
|
data/lib/jekyll-wns.rb
CHANGED
@@ -3,6 +3,7 @@ require 'jekyll'
|
|
3
3
|
|
4
4
|
require_relative 'jekyll-wns/assets/abbreviations'
|
5
5
|
require_relative 'jekyll-wns/assets/label_unicode'
|
6
|
+
require_relative 'jekyll-wns/assets/label_pronounciation'
|
6
7
|
require_relative 'jekyll-wns/assets/quads'
|
7
8
|
|
8
9
|
require_relative 'jekyll-wns/assets/digest_filters'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-wns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thai Chung
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-mp3info
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- lib/jekyll-wns/assets/abbreviations.rb
|
43
43
|
- lib/jekyll-wns/assets/digest_filters.rb
|
44
44
|
- lib/jekyll-wns/assets/file_property_filters.rb
|
45
|
+
- lib/jekyll-wns/assets/label_pronounciation.rb
|
45
46
|
- lib/jekyll-wns/assets/label_unicode.rb
|
46
47
|
- lib/jekyll-wns/assets/quads.rb
|
47
48
|
- lib/jekyll-wns/assets/quads_filter.rb
|