whiteblog-theme 0.0.20 → 0.0.21

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/gallery +47 -0
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18d23441081ed308167365af074137f917352549420620bbcb95187f6af62b4c
4
- data.tar.gz: 69bf43122d8bb8d4716c8d42bc41ba93d2f2aa88ec0ca80002d1371a2fcd2894
3
+ metadata.gz: 15bcb8eac8e1218457e74a8e2bff77b012042da5ba41730c9de8c268d55bb6a9
4
+ data.tar.gz: 53d0f5d2713912966eb4a3753bda17a95d432b60da6a908da51b6d84161863f8
5
5
  SHA512:
6
- metadata.gz: cadbfd3b46e5cbb03047df5f6858e1df3634ea01f6fce50a5ce2f8293c674a71db76041eced9cbc378f0856d6c2ee91ba5bea74bedbd1d5d10c4890f7bc7fc49
7
- data.tar.gz: faeb588e63e64d789ff095cbfda7ede9b00facbe445e160cc73af36a6bb3a3f9df818c427b6bf9acf205a2d204403c08e05c01d89282a8951453c0fc43cbf221
6
+ metadata.gz: 559c658ff801ada7a8d800f9ca782557e5b98559a179775ecfd593bbbf817e6ce22748f8a312f7c3fb86f69c35f57e0d4b22f1c7c2dd4e34210f34504180f2b6
7
+ data.tar.gz: 5cbdd7aea52e9392689e33bee69967b562a2ee0a39e8fcdeb29ba87a8ab6d07dff8e4bcbf9544bcbdbd6cdbbb96ba9c1755f140496b43b7c353f3d6deae19853
data/_includes/gallery ADDED
@@ -0,0 +1,47 @@
1
+ {% if include.id %}
2
+ {% assign gallery = page[include.id] %}
3
+ {% else %}
4
+ {% assign gallery = page.gallery %}
5
+ {% endif %}
6
+
7
+ {% if gallery.size == 2 %}
8
+ {% assign gallery_layout = 'half' %}
9
+ {% elsif gallery.size >= 3 %}
10
+ {% assign gallery_layout = 'third' %}
11
+ {% else %}
12
+ {% assign gallery_layout = '' %}
13
+ {% endif %}
14
+
15
+ <figure class="{{ gallery_layout }} {{ include.class }}">
16
+ {% for img in gallery %}
17
+ {% if img.url %}
18
+ <a href=
19
+ {% if img.url contains "://" %}
20
+ "{{ img.url }}"
21
+ {% else %}
22
+ "{{ img.url | absolute_url }}"
23
+ {% endif %}
24
+ {% if img.title %}title="{{ img.title }}"{% endif %}
25
+ >
26
+ <img src=
27
+ {% if img.image_path contains "://" %}
28
+ "{{ img.image_path }}"
29
+ {% else %}
30
+ "{{ img.image_path | absolute_url }}"
31
+ {% endif %}
32
+ alt="{% if img.alt %}{{ img.alt }}{% endif %}">
33
+ </a>
34
+ {% else %}
35
+ <img src=
36
+ {% if img.image_path contains "://" %}
37
+ "{{ img.image_path }}"
38
+ {% else %}
39
+ "{{ img.image_path | absolute_url }}"
40
+ {% endif %}
41
+ alt="{% if img.alt %}{{ img.alt }}{% endif %}">
42
+ {% endif %}
43
+ {% endfor %}
44
+ {% if include.caption %}
45
+ <figcaption>{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}</figcaption>
46
+ {% endif %}
47
+ </figure>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiteblog-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Silva
@@ -79,6 +79,7 @@ files:
79
79
  - _includes/backtotop.html
80
80
  - _includes/comments-providers/disqus.html
81
81
  - _includes/footer.html
82
+ - _includes/gallery
82
83
  - _includes/head.html
83
84
  - _includes/header.html
84
85
  - _includes/scripts.html