spring-jekyll-theme 0.0.5 → 0.0.6

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/_layouts/home.html +30 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92d410223dc986c4052f85bcc5d67afa2115132c56eb7bff697ec63cad0d0045
4
- data.tar.gz: 553d56c7d4d42b480e358afdae736ccfa5a945fd298da8d88dcb7e8fd7b63384
3
+ metadata.gz: 9a9afa2762eacd35c0a1a50f89a811f3fedcf7b8b8b0ad31b1f620e94b65cff2
4
+ data.tar.gz: de180426e889babbd619edf91863494b1fb3e48a01d1e76881a54e779ac84cc1
5
5
  SHA512:
6
- metadata.gz: a834ff20d72b53d2982fc00b082543f7b09586d8539fcb77d255872664dab119165277f5ebca0ccbec984eefd9ea0dc26440c0500bf6a4896f1f9031ef07c235
7
- data.tar.gz: 1af75a576a19f75692f25685f6646804cb3d1c7fb4cbd4afe86152fa799fb7cc7fec09dc6abddfc32a4eae32fb9556f42702ed52de014b09ea6ef93cd0176bda
6
+ metadata.gz: 7a7ced9f01eb2934337a31b23174730fd09093e4fc52ac18afaaaa30eb7c4824c8a86f8def001085ef2e3bec1f1fc370a1dfea483e97ab558f164f11e33a66c7
7
+ data.tar.gz: '09e03610655039ea18c1138da8b16e835f10bf3bfb025838c12909d9672f9b3ff6d26ea20a21614f9d60a34d959cb587500c3949a2c9dc9f46f3ab997df79ed9'
data/README.md CHANGED
@@ -16,7 +16,7 @@ bundle config mirror.https://rubygems.org https://gems.ruby-china.com
16
16
 
17
17
  ```shell
18
18
  export http_proxy=http://127.0.0.1:49295
19
- export http_proxy=https://127.0.0.1:49295
19
+ export https_proxy=http://127.0.0.1:49295
20
20
  ```
21
21
 
22
22
  参考
data/_layouts/home.html CHANGED
@@ -9,10 +9,10 @@ layout: default
9
9
 
10
10
  {{ content }}
11
11
 
12
- {%- if site.posts.size > 0 -%}
12
+ {%- if paginator.posts.size > 0 -%}
13
13
  <h2 class="post-list-heading">{{ page.list_title | default: "主题" }}</h2>
14
14
  <ul class="post-list">
15
- {%- for post in site.posts -%}
15
+ {%- for post in paginator.posts -%}
16
16
  <li>
17
17
  {%- assign date_format = site.spring-jekyll-theme.date_format | default: "%b %-d, %Y" -%}
18
18
  <span class="post-meta">{{ post.date | date: date_format }}</span>
@@ -27,7 +27,34 @@ layout: default
27
27
  </li>
28
28
  {%- endfor -%}
29
29
  </ul>
30
-
30
+
31
+ <!-- 分页链接 -->
32
+ {% if paginator.total_pages > 1 %}
33
+ <div class="pagination">
34
+ {% if paginator.previous_page %}
35
+ <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; 上一页</a>
36
+ {% else %}
37
+ <span>&laquo; 上一页</span>
38
+ {% endif %}
39
+
40
+ {% for page in (1..paginator.total_pages) %}
41
+ {% if page == paginator.page %}
42
+ <em>{{ page }}</em>
43
+ {% elsif page == 1 %}
44
+ <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
45
+ {% else %}
46
+ <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
47
+ {% endif %}
48
+ {% endfor %}
49
+
50
+ {% if paginator.next_page %}
51
+ <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">下一页 &raquo;</a>
52
+ {% else %}
53
+ <span>下一页 &raquo;</span>
54
+ {% endif %}
55
+ </div>
56
+ {% endif %}
57
+
31
58
  <p class="feed-subscribe"><svg class="svg-icon orange"><use xlink:href="{{ '/assets/social-icons.svg#rss' | relative_url }}"></use></svg><a href="{{ "/feed.xml" | relative_url }}">Subscribe</a></p>
32
59
  {%- endif -%}
33
60
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spring-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Chen