klst-theme 0.1.0 → 0.1.2

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: b7312384541d5d69e94a10ed089453d1892572150ce2875bbf2561ffa68468c9
4
+ data.tar.gz: 1df138e0386bb112e4863d48621455d6e450529200c08e58176bddffff27d15a
5
5
  SHA512:
6
- metadata.gz: e6907f0527b17d2a5f31ccda6790aed020b872d3e46f0dca22b16dc436131c85648901267ca6b2468b074547d4102a1d74a6f06530385d142088e2f3c5c54c26
7
- data.tar.gz: 6e6b1a80393ad0cf6076d74c79e049272b0d3bd897b353ade7d55f91f20c20a7b6205ef4445aa15630cde7b6a9cdc3543008d5b0556bdeea3a4beb04267c0cf8
6
+ metadata.gz: 1d0c9db31f24ddbb8a8567c8df08f6c710038f67c8c9e953492ff237ca4cad54fc472a86248bb03526925324ae5a59562b4096f5f2ed8cf46a555df02478aa43
7
+ data.tar.gz: 6c182cd2520307951a6a25b473924ddf6d96f6c3737e5fe0ec2199719351ed3d42597fe09f9080faed93e214061a46ce8efdd10b0c0266eca14fd04c446b06fa
data/_config.yml CHANGED
@@ -7,8 +7,9 @@ plugins:
7
7
  - jekyll-paginate
8
8
  - jekyll-archives
9
9
 
10
- paginate_path: "/posts/page:num/"
11
- paginate: 5
10
+ jekyll-paginate:
11
+ paginate_path: "/posts/page:num/"
12
+ paginate: 5
12
13
 
13
14
  jekyll-archives:
14
15
  enabled: ['year', 'month']
@@ -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,13 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - neko
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-06-22 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: jekyll
@@ -52,7 +51,6 @@ dependencies:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
53
  version: '2.3'
55
- description:
56
54
  email:
57
55
  - neko@koneko.at
58
56
  executables: []
@@ -70,6 +68,7 @@ files:
70
68
  - _includes/month.html
71
69
  - _includes/nav.html
72
70
  - _includes/postlist.html
71
+ - _includes/posts.html
73
72
  - _includes/sidebar.html
74
73
  - _includes/year.html
75
74
  - _includes/years.html
@@ -77,6 +76,7 @@ files:
77
76
  - _layouts/archive-year.html
78
77
  - _layouts/archive.html
79
78
  - _layouts/page.html
79
+ - _layouts/posts.html
80
80
  - assets/css/ash.css
81
81
  - assets/css/ash.css.map
82
82
  - assets/css/main.css
@@ -85,7 +85,6 @@ homepage: https://klst.at/
85
85
  licenses:
86
86
  - MIT
87
87
  metadata: {}
88
- post_install_message:
89
88
  rdoc_options: []
90
89
  require_paths:
91
90
  - lib
@@ -100,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
99
  - !ruby/object:Gem::Version
101
100
  version: '0'
102
101
  requirements: []
103
- rubygems_version: 3.4.20
104
- signing_key:
102
+ rubygems_version: 3.6.7
105
103
  specification_version: 4
106
104
  summary: This is a simple jekyll theme for our local linux group
107
105
  test_files: []