simple-gh-pages-theme 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12967e97aa2aa5b43721966c8492eddc5af65fec011efe74e1a0663f3cf2eb6f
4
- data.tar.gz: 8fe85c3a47977940b7de00ab1cdf03fd5f983428dd6c7da88b50193d472554e9
3
+ metadata.gz: e58f1f0573784a6e6e508ba81f4e7be5e498883fdcc582ccbd3b3177e059d582
4
+ data.tar.gz: d7ee6d6b8980f489885b3516b68006a426e449676a020fc8fa35bc2f01d7c327
5
5
  SHA512:
6
- metadata.gz: 98252b992b5a40be8cf747718f1aace6eed54528b2b55e3986786498d0cb77122308b72a461da9597d82a73ec131c0743053e557e90f2ecb0947cb8ce7a74d14
7
- data.tar.gz: 93b60c44be6866381274cd377d4eb305ab4c2e0716765cd4a300cd07da52bc9991919f0f87ed5155c9a9776c7e4384774f79e8224df899d8f42ac5f729d9d1b3
6
+ metadata.gz: 83753f4852053453298ff3a5e144905b9d0d078e64569499510bf571fc81677dae93fe357b8b4d5210d386c0b1d770767a747a3b18003b870aa5ab80d7dd8a1a
7
+ data.tar.gz: f4f88e93e15d8d07f563aeed4bc35018377c090d3490558d6bf1069943c76bdfffbe9a45353a2b0fc0668aa48851953607ba7aa7eed9826c345537852396d296
@@ -2,7 +2,7 @@
2
2
  <div class="line"></div>
3
3
  <div>
4
4
  <!-- prettier-ignore -->
5
- {% for category in site.categories %}
5
+ {% for category in site.categories, limit: 10 %}
6
6
  {% assign nr_of_posts = 0 %}
7
7
  {% assign cat = category | first %}
8
8
  {% assign posts = site.categories[cat] %}
@@ -23,11 +23,68 @@
23
23
  </li>
24
24
  {% endfor %}
25
25
  </div>
26
+
27
+ <button
28
+ id="show-more-categories"
29
+ onclick="showMoreCategories()"
30
+ style="
31
+ border-width: 0;
32
+ padding: 0;
33
+ background: white;
34
+ margin-top: 0;
35
+ font-size: 0.8em;
36
+ color: #272b32;
37
+ "
38
+ >
39
+ more..
40
+ </button>
41
+
42
+ <div id="extra-categories" style="display: none">
43
+ <!-- prettier-ignore -->
44
+ {% for category in site.categories offset: 10 %}
45
+ {% assign nr_of_posts = 0 %}
46
+ {% assign cat = category | first %}
47
+ {% assign posts = site.categories[cat] %}
48
+ {% assign selection = posts | where_exp:"post", "post.layout == 'post'" %}
49
+ {% assign selection = selection | where_exp:"post", "post.content.size > 1" %}
50
+ {% for post in selection %}
51
+ {% assign nr_of_posts = nr_of_posts | plus:1 %}
52
+ {% endfor %}
53
+
54
+ <li class="posts-list-item short-post category-list-item">
55
+ <span class="categories">
56
+ <h4>
57
+ <a class="category" href="/category/{{ cat }}">
58
+ {{ cat }} ({{ nr_of_posts }})
59
+ </a>
60
+ </h4>
61
+ </span>
62
+ </li>
63
+ {% endfor %}
64
+ </div>
65
+
66
+ <script>
67
+ function showMoreCategories() {
68
+ var extraCategories = document.getElementById("extra-categories");
69
+ var showMoreButtonCategories = document.getElementById(
70
+ "show-more-categories"
71
+ );
72
+
73
+ if (extraCategories.style.display === "none") {
74
+ extraCategories.style.display = "block";
75
+ showMoreButtonCategories.innerText = "less..";
76
+ } else {
77
+ extraCategories.style.display = "none";
78
+ showMoreButtonCategories.innerText = "more..";
79
+ }
80
+ }
81
+ </script>
82
+
26
83
  <h2 class="title no-decoration" style="margin-top: 20px">Tags</h2>
27
84
  <div class="line"></div>
28
85
  <div>
29
86
  <!-- prettier-ignore -->
30
- {% for tag_post in site.tags %}
87
+ {% for tag_post in site.tags limit: 10 %}
31
88
  {% assign nr_of_posts = 0 %}
32
89
  {% assign tag = tag_post | first %}
33
90
  {% assign tag_posts = site.tags[tag] %}
@@ -48,3 +105,57 @@
48
105
  </li>
49
106
  {% endfor %}
50
107
  </div>
108
+
109
+ <button
110
+ id="show-more-tags"
111
+ onclick="showMoreTags()"
112
+ style="
113
+ border-width: 0;
114
+ padding: 0;
115
+ background: white;
116
+ margin-top: 0;
117
+ font-size: 0.8em;
118
+ color: #272b32;
119
+ "
120
+ >
121
+ more..
122
+ </button>
123
+
124
+ <div id="extra-tags" style="display: none">
125
+ <!-- prettier-ignore -->
126
+ {% for tag_post in site.tags offset: 10 %}
127
+ {% assign nr_of_posts = 0 %}
128
+ {% assign tag = tag_post | first %}
129
+ {% assign tag_posts = site.tags[tag] %}
130
+ {% assign tag_posts_selection = tag_posts | where_exp:"post", "post.layout == 'post'" %}
131
+ {% assign tag_posts_selection = tag_posts_selection | where_exp:"post", "post.content.size > 1" %}
132
+ {% for post in tag_posts_selection %}
133
+ {% assign nr_of_posts = nr_of_posts | plus:1 %}
134
+ {% endfor %}
135
+
136
+ <li class="posts-list-item short-post category-list-item">
137
+ <span class="categories">
138
+ <h4>
139
+ <a class="category" href="/tag/{{ tag }}">
140
+ {{ tag }} ({{ nr_of_posts }})
141
+ </a>
142
+ </h4>
143
+ </span>
144
+ </li>
145
+ {% endfor %}
146
+ </div>
147
+
148
+ <script>
149
+ function showMoreTags() {
150
+ var extraTags = document.getElementById("extra-tags");
151
+ var showMoreButton = document.getElementById("show-more-tags");
152
+
153
+ if (extraTags.style.display === "none") {
154
+ extraTags.style.display = "block";
155
+ showMoreButton.innerText = "less..";
156
+ } else {
157
+ extraTags.style.display = "none";
158
+ showMoreButton.innerText = "more..";
159
+ }
160
+ }
161
+ </script>
data/_layouts/index.html CHANGED
@@ -7,7 +7,7 @@ title: home
7
7
  <div class="posts-top">
8
8
  <!-- prettier-ignore -->
9
9
  {% assign selection = site.posts | where_exp:"post", "post.short != true" %}
10
- {% for post in selection limit: 5 %}
10
+ {% for post in selection limit: 6 %}
11
11
  {% include post-list-item.html %}
12
12
  {% endfor %}
13
13
  <h2 style="font-family: 'Arvo'">
data/assets/css/main.scss CHANGED
@@ -261,7 +261,7 @@ body {
261
261
  .social {
262
262
  margin-left: auto;
263
263
  a {
264
- padding-right: 0px;
264
+ padding-right: 4px;
265
265
  text-decoration: none;
266
266
  }
267
267
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-gh-pages-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - LiveNL
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-24 00:00:00.000000000 Z
11
+ date: 2023-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll-archives