zine_brewer 1.9.0 → 1.10.0

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: 9377b1600b8679c919199df61d3c142c7f8a0c9c1972d891a31cd6429b406a49
4
- data.tar.gz: b100b1ad9d96943035a8acd2dd043aa27499c348d8e9a9b9c4bbef47b9d2d0b2
3
+ metadata.gz: 074f7db69b1bfc6a1803d2c2e286a2e96bf6678875d1f48101e2bf0c4569d295
4
+ data.tar.gz: f76f1eace1a8e4526ff174db4f9ecb00aa7f85243413b67c65a437877438cc15
5
5
  SHA512:
6
- metadata.gz: ba17f9a2b9d9288b7e54e97f3fa9ccacfa9bebfad069810bd8fb20526e012d32a944f3c1bb44851b5d899d4c94b532c958bb8a2c8dbe2d36abd381f258b2bd99
7
- data.tar.gz: b5e927c93f297b95758ad684cb54e770a981372fc2815e1f50f7d2de0d4347edf504b5f269ba0b50518fadbd09ed3550d0adc51a022c1e5504cd8ad105bd1ddc
6
+ metadata.gz: 0e6a96b722d0867067aec400e2d67be93a1288d1f6f5be59b5863a58cdedbd47ed9232d6b770ea1c59fdbaba1125a12fc89df4b4a628d7089429909e12b1e23e
7
+ data.tar.gz: ba40736ea23d116c94e49883dfa7a894721c01405008ed291e04b9412b892037270547235811ddb4292a59c03ff67a3384547a18805eaa1bee749d47637626cb
data/README.md CHANGED
@@ -353,12 +353,12 @@ width: 200px
353
353
 
354
354
  #### ■定義表の書き方
355
355
 
356
- 定義リストの記述を`===dtable`〜`==/dtable`で挟むと、左に項目、右に内容のテーブル(表)ができます。
356
+ 定義リストの記述を`===dtable`〜`==/dtable`で挟むと、左に項目、右に内容のテーブル(表)ができます。キャプション(caption)を定義できるほか、1列目の幅を`th-width`属性で指定できます。
357
357
 
358
358
  例えば、次のように記述すると、
359
359
 
360
360
  ```
361
- {:caption="イベント概要"}
361
+ {:caption="イベント概要" th-width="20%"}
362
362
  ===dtable
363
363
  イベント名
364
364
  : HRzine Day 2020 Autumn
@@ -376,7 +376,7 @@ width: 200px
376
376
 
377
377
  次のように表示されます。
378
378
 
379
- ![dtable](https://user-images.githubusercontent.com/24837059/94995269-32e6e680-05d8-11eb-86ed-074e650ff2eb.png)
379
+ ![dtable](https://user-images.githubusercontent.com/24837059/133894991-59887c24-3c2f-402d-a854-b56c55d7da8c.png)
380
380
 
381
381
  #### ■スタイルの書き方
382
382
 
@@ -13,7 +13,7 @@ class BookRanking < Mustache
13
13
  @template = <<EOT
14
14
  <div class="imgLRBlock cf">
15
15
  <figure class="imgR">
16
- <a href="{{url}}" target="_blank"><img alt="{{title}}" loading="lazy" src="{{cover}}" style="border:1px solid #808080;" width="100" title="{{title}}" /></a></figure>
16
+ <a href="{{url}}" target="_blank"><img alt="{{title}}" loading="lazy" src="{{cover}}" style="border:1px solid #808080; width:100px;" title="{{title}}" /></a></figure>
17
17
  <p markdown="1"> {{& description}}</p>
18
18
  </div>
19
19
  EOT
@@ -21,7 +21,7 @@ class Casts < Mustache
21
21
  {{#title_sw}}<h4>{{title}}</h4>{{/title_sw}}
22
22
  <div class="imgLRBlock cf">
23
23
  <figure class="imgL">
24
- <img src="{{fig_src}}" loading="lazy" alt="{{name}}" height="135" width="110" />
24
+ <img src="{{fig_src}}" loading="lazy" alt="{{name}}" style="height:135px;" />
25
25
  </figure>
26
26
  <p class="ovh" markdown="span" style="font-size:14px; line-height:1.7; margin-bottom:10px;"><strong style="font-size:15px;">{{name}}({{huri}})氏</strong><br />{{& caption}}</p>
27
27
  </div>
@@ -10,7 +10,8 @@ module Fig_00
10
10
  a_img[:fig_src] = make_src(h["src"])
11
11
  a_img[:href] = h["href"]
12
12
  a_img[:alt] = make_alt(h["alt"])
13
- a_img[:img_size] = make_img_size(h["width"], h["height"])
13
+ a_img[:img_style] = make_img_style(h["width"], h["height"]) \
14
+ unless h["width"].nil? && h["height"].nil?
14
15
  result << a_img
15
16
  end
16
17
  result
@@ -53,11 +54,13 @@ module Fig_00
53
54
  end
54
55
  end
55
56
 
56
- def make_img_size(l_width, l_height)
57
+ def make_img_style(l_width, l_height)
57
58
  s = []
58
- s << %Q{width="#{l_width}"} unless l_width.nil?
59
- s << %Q{height="#{l_height}"} unless l_height.nil?
60
- s.join(' ').strip
59
+ s << "width:#{l_width};" unless l_width.nil?
60
+ s << "height:#{l_height};" unless l_height.nil?
61
+ unless s.all?{|v| v.nil? }
62
+ %Q{style="#{s.join(' ').strip}" }
63
+ end
61
64
  end
62
65
 
63
66
  end
@@ -17,7 +17,7 @@ class Fig_A < Mustache
17
17
  @template = <<EOT
18
18
  <figure>
19
19
  {{#imgs_list}}
20
- <a href="{{fig_src}}" target="_blank"><img src="{{fig_src}}" loading="lazy" alt="{{alt}}"{{#width}} width="{{width}}"{{/width}}{{#height}} height="{{height}}"{{/height}} /></a>
20
+ <a href="{{fig_src}}" target="_blank"><img src="{{fig_src}}" loading="lazy" alt="{{alt}}" {{& img_style}} /></a>
21
21
  {{/imgs_list}}
22
22
  <figcaption markdown="span">{{#caption}}{{& caption}}<br/>{{/caption}}[画像クリックで拡大表示]</figcaption>
23
23
  </figure>
@@ -18,7 +18,7 @@ class Fig_H < Mustache
18
18
  @template = <<EOT
19
19
  <figure>
20
20
  {{#imgs_list}}
21
- <a href="{{href}}" target="_blank"><img src="{{fig_src}}" loading="lazy" alt="{{alt}}"{{#width}} width="{{width}}"{{/width}}{{#height}} height="{{height}}"{{/height}} /></a>
21
+ <a href="{{href}}" target="_blank"><img src="{{fig_src}}" loading="lazy" alt="{{alt}}" {{& img_style}} /></a>
22
22
  {{/imgs_list}}
23
23
  {{#caption}}<figcaption markdown="span">{{& caption}}</figcaption>{{/caption}}
24
24
  </figure>
@@ -13,12 +13,11 @@ class Fig_N < Mustache
13
13
  # width: 画像幅
14
14
  # height: 画像高さ
15
15
  # cap: キャプション
16
- # from: 出典 << 出典URL
17
16
 
18
17
  @template = <<EOT
19
18
  <figure>
20
19
  {{#imgs_list}}
21
- <img src="{{fig_src}}" loading="lazy" alt="{{alt}}"{{#width}} width="{{width}}"{{/width}}{{#height}} height="{{height}}"{{/height}} />
20
+ <img src="{{fig_src}}" loading="lazy" alt="{{alt}}" {{& img_style}} />
22
21
  {{/imgs_list}}
23
22
  {{#caption}}<figcaption markdown="span">{{caption}}</figcaption>{{/caption}}
24
23
  </figure>
@@ -20,7 +20,7 @@ class Fig_P < Mustache
20
20
  @template = <<EOT
21
21
  <figure>
22
22
  {{#imgs_list}}
23
- <img src="{{fig_src}}" loading="lazy" alt="{{name}}氏"{{#width}} width="{{width}}"{{/width}}{{#height}} height="{{height}}"{{/height}} />
23
+ <img src="{{fig_src}}" loading="lazy" alt="{{name}}氏" {{& img_style}} />
24
24
  {{/imgs_list}}
25
25
  <div style="text-align:left; padding:0px 35px;">
26
26
  <figcaption><strong>{{name}}({{huri}})氏</strong></figcaption>
@@ -17,7 +17,7 @@ class Fig_Z < Mustache
17
17
  @template = <<EOT
18
18
  <figure>
19
19
  {{#imgs_list}}
20
- <a href="{{fig_src}}" rel="lightbox" target="_blank"><img src="{{fig_src}}" loading="lazy" alt="{{alt}}"{{#width}} width="{{width}}"{{/width}}{{#height}} height="{{height}}"{{/height}} /></a>
20
+ <a href="{{fig_src}}" rel="lightbox" target="_blank"><img src="{{fig_src}}" alt="{{alt}}" {{& img_style}}/></a>
21
21
  {{/imgs_list}}
22
22
  <figcaption markdown="span">{{#caption}}{{& caption}}<br/>{{/caption}}[画像クリックで拡大表示]</figcaption>
23
23
  </figure>
@@ -1,3 +1,3 @@
1
1
  module ZineBrewer
2
- VERSION = "1.9.0"
2
+ VERSION = "1.10.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zine_brewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori Ichigo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-18 00:00:00.000000000 Z
11
+ date: 2021-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mustache