klst-theme 0.1.0 → 0.1.1

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: 461a936cb5b05011c7f15f5d660e0615a249c70443ec2cdc4bc1436aeae903f5
4
- data.tar.gz: 4b7922cc453e0c7557ec2131be455c601c729456d2b38ad951a49a081208e63a
3
+ metadata.gz: 97cc5bf0b4b51eee9a22f9fffb341f2d1b35d397cb1fccda1cf301aea613d082
4
+ data.tar.gz: 8cf1869b9b5b9f9449918d8477e5ec5cc189f85e440fd1fca2a13dfcf654b255
5
5
  SHA512:
6
- metadata.gz: e6907f0527b17d2a5f31ccda6790aed020b872d3e46f0dca22b16dc436131c85648901267ca6b2468b074547d4102a1d74a6f06530385d142088e2f3c5c54c26
7
- data.tar.gz: 6e6b1a80393ad0cf6076d74c79e049272b0d3bd897b353ade7d55f91f20c20a7b6205ef4445aa15630cde7b6a9cdc3543008d5b0556bdeea3a4beb04267c0cf8
6
+ metadata.gz: e3a70cf708d07c8001af64e9ea2793987d1fe3bc2d09265c85fb88f9b5aee401f5a8fde60cd22341265c83eacb62c0a99c9ba4ede6c765fe8114226f0d38bcb7
7
+ data.tar.gz: fb21a5c4f2a383a67e84f9a15b04926b6934325a107ef64b5433e14552e8cbb7022a8c498287d00941ea6736718089a4255fae9bfa8409f51b0a389acdbeae7e
@@ -0,0 +1,77 @@
1
+
2
+ <!-- This loops through the paginated posts -->
3
+ {% for post in paginator.posts %}
4
+ <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
5
+ <p class="author">
6
+ <span class="date">{{ post.date }}</span>
7
+ </p>
8
+ <div class="content">
9
+ {{ post.content }}
10
+ </div>
11
+ {% endfor %}
12
+
13
+ {% if paginator.total_pages > 1 %}
14
+ <ul class="pagination">
15
+ {% if paginator.previous_page %}
16
+ <li> <a href="{{ paginator.previous_page_path | relative_url }}">&laquo; Prev</a></li>
17
+ {% else %}
18
+ <li><span>&laquo; Prev</span></li>
19
+ {% endif %}
20
+
21
+ {% comment %}what follows is logic to make the current page number surrounded by the next and previous page number{% endcomment %}
22
+ {% assign limit = 3 %}
23
+ {% if paginator.total_pages > limit %}
24
+ {% assign max_pages = 3 %}
25
+ {% else %}
26
+ {% assign max_pages = paginator.total_pages %}
27
+ {% endif %}
28
+
29
+ {% comment %}in shopify liquid, math cannot be done nested{% endcomment %}
30
+ {% assign max_pages_minus_one = max_pages | minus: 1 %}
31
+ {% assign total_pages_minus_one = paginator.total_pages | minus: 1 %}
32
+
33
+ {% if paginator.next_page == nil %}
34
+ <li><span>...</span></li>
35
+
36
+ {% for page in (paginator.previous_page..paginator.total_pages) %}
37
+ {% if page == paginator.total_pages %}
38
+ <li class="-active"><a href="#">{{ page }}</a></li>
39
+ {% else %}
40
+ <li><a href="{{paginator.previous_page_path}}">{{ page }}</a></li>
41
+ {% endif %}
42
+ {% endfor %}
43
+
44
+ {% elsif paginator.page >= max_pages_minus_one %}
45
+
46
+ {% for page in (paginator.previous_page..paginator.next_page) %}
47
+ {% if page == paginator.page-1 %}
48
+ <li><a href="paginator.previous_page_path">{{ page }}</a></li>
49
+ {% elsif page == paginator.page %}
50
+ <li class="-active"><a href="#">{{ page }}</a></li>
51
+ {% else %}
52
+ <li><a href="{{paginator.next_page_path}}">{{ page }}</a></li>
53
+ {% endif %}
54
+ {% endfor %}
55
+
56
+ {% else %}
57
+ {% for page in (1..paginator.total_pages) limit:max_pages_minus_one %}
58
+ {% if page == paginator.page %}
59
+ <li class="-active"><a href="#">{{ page }}</a></li>
60
+ {% elsif page == 1 %}
61
+ <li><a href="{{ site.paginate_path | relative_url | replace: 'page:num/', '' }}">{{ page }}</a></li>
62
+ {% else %}
63
+ <li><a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a></li>
64
+ {% endif %}
65
+ {% endfor %}
66
+ <li><span>...</span></li>
67
+
68
+ {% endif %}
69
+
70
+
71
+ {% if paginator.next_page %}
72
+ <li><a href="{{ paginator.next_page_path | relative_url }}">Next &raquo;</a></li>
73
+ {% else %}
74
+ <li><span>Next &raquo;</span></li>
75
+ {% endif %}
76
+ </ul>
77
+ {% endif %}
data/_layouts/page.html CHANGED
@@ -4,6 +4,6 @@
4
4
  {% include head.html %}
5
5
  </head>
6
6
  <body>
7
- {% include body.html%}
7
+ {% include body.html %}
8
8
  </body>
9
9
  </html>
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Posts
3
+ layout: page
4
+ ---
5
+ {% include posts.html %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klst-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - neko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-22 00:00:00.000000000 Z
11
+ date: 2025-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -70,6 +70,7 @@ files:
70
70
  - _includes/month.html
71
71
  - _includes/nav.html
72
72
  - _includes/postlist.html
73
+ - _includes/posts.html
73
74
  - _includes/sidebar.html
74
75
  - _includes/year.html
75
76
  - _includes/years.html
@@ -77,6 +78,7 @@ files:
77
78
  - _layouts/archive-year.html
78
79
  - _layouts/archive.html
79
80
  - _layouts/page.html
81
+ - _layouts/posts.html
80
82
  - assets/css/ash.css
81
83
  - assets/css/ash.css.map
82
84
  - assets/css/main.css