simple-gh-pages-theme 0.1.6 → 0.1.8

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: e1b001d584058182c14af02f8aed427f2de1cca434c7befbc98bcfff4e4252a7
4
+ data.tar.gz: 7e79992d6862fed3ddf3d3c025826143f6f154e5f5bd00173ac2268ced7bcd3d
5
5
  SHA512:
6
- metadata.gz: 98252b992b5a40be8cf747718f1aace6eed54528b2b55e3986786498d0cb77122308b72a461da9597d82a73ec131c0743053e557e90f2ecb0947cb8ce7a74d14
7
- data.tar.gz: 93b60c44be6866381274cd377d4eb305ab4c2e0716765cd4a300cd07da52bc9991919f0f87ed5155c9a9776c7e4384774f79e8224df899d8f42ac5f729d9d1b3
6
+ metadata.gz: 3449cc2a90fef5111cdea63ede9e42f672e4b49ab4c31f4dead423a7a8c8c7356244b01401b61f15540fdc2448da53f25de27bfc999b6004b91d31d215601a0f
7
+ data.tar.gz: 836970b5adf7de6696ea5c208e0894ea207d2722d1ed982142c16932e10b868a5e864186a92565eef627807c229e9a84d1e172e2d5e2eba839e46a1379e0a6ca
@@ -0,0 +1,29 @@
1
+ <!-- prettier-ignore -->
2
+ {% capture items %}
3
+ {% for item in include.items %}
4
+ {% assign nr_of_posts = 0 %}
5
+ {% assign it = item | first %}
6
+ {% assign posts = include.items[it] %}
7
+ {% assign selection = posts | where_exp:"post", "post.layout == 'post'" %}
8
+ {% assign selection = selection | where_exp:"post", "post.content.size > 1" %}
9
+ {% for post in selection %}
10
+ {% assign nr_of_posts = nr_of_posts | plus:1 %}
11
+ {% endfor %}
12
+
13
+ {{ nr_of_posts | plus: 1000 }}#{{ item[0] }}#{{ nr_of_posts }}
14
+ {% endfor %}
15
+ {% endcapture %}
16
+
17
+ {% assign sorted_items = items | split:' ' | sort | reverse %}
18
+ {% for item in sorted_items limit: include.limit, offset: include.offset %}
19
+ {% assign item_items = item | split: '#' %}
20
+ <li class="posts-list-item short-post category-list-item">
21
+ <span class="categories">
22
+ <h4>
23
+ <a class="category" href="/{{include.item_type}}/{{ item_items[1] }}">
24
+ {{ item_items[1] }} ({{ item_items[2] }})
25
+ </a>
26
+ </h4>
27
+ </span>
28
+ </li>
29
+ {% endfor %}
@@ -1,23 +1,23 @@
1
1
  <nav>
2
2
  <!-- prettier-ignore -->
3
3
  {% for item in site.data.navigation %}
4
- <a href="{{ item.link }}" {% if page.url == item.link %} class="current_page" {% endif %}>
4
+ {% assign current_page = page.url | remove: ".html" %}
5
+ <a href="{{ item.link }}" {% if current_page == item.link %} class="current_page" {% endif %}>
5
6
  <h2>{{ item.name }}</h2>
6
7
  </a>
7
8
  {% endfor %}
8
9
  <div class="social">
10
+ <!-- prettier-ignore -->
9
11
  {% assign socials = site.about.socials %}
10
12
  {% for social in socials %}
11
- {% assign social_type = social[0] %}
12
- {% assign social_url = social[1] %}
13
- <a target="_blank" href="{{social_url}}">
14
- <i class="fa-brands fa-{{social_type}} text-muted" aria-hidden="true"></i>
15
- </a>
13
+ {% assign social_type = social[0] %}
14
+ {% assign social_url = social[1] %}
15
+ <a target="_blank" href="{{social_url}}">
16
+ <i class="fa-brands fa-{{social_type}} text-muted" aria-hidden="true"></i>
17
+ </a>
16
18
  {% endfor %}
17
19
  <a href="mailto: {{site.about.email}}">
18
20
  <i class="fa fa-envelope text-muted" aria-hidden="true"></i>
19
21
  </a>
20
22
  </div>
21
23
  </nav>
22
-
23
-
@@ -1,50 +1,49 @@
1
1
  <h2 class="title no-decoration">Categories</h2>
2
2
  <div class="line"></div>
3
- <div>
3
+ <div id="categories-list">
4
4
  <!-- prettier-ignore -->
5
- {% for category in site.categories %}
6
- {% assign nr_of_posts = 0 %}
7
- {% assign cat = category | first %}
8
- {% assign posts = site.categories[cat] %}
9
- {% assign selection = posts | where_exp:"post", "post.layout == 'post'" %}
10
- {% assign selection = selection | where_exp:"post", "post.content.size > 1" %}
11
- {% for post in selection %}
12
- {% assign nr_of_posts = nr_of_posts | plus:1 %}
13
- {% endfor %}
14
-
15
- <li class="posts-list-item short-post category-list-item">
16
- <span class="categories">
17
- <h4>
18
- <a class="category" href="/category/{{ cat }}">
19
- {{ cat }} ({{ nr_of_posts }})
20
- </a>
21
- </h4>
22
- </span>
23
- </li>
24
- {% endfor %}
5
+ {% include categories.html limit=10 items=site.categories item_type="category" %}
6
+ </div>
7
+ <div id="extra-categories" style="display: none">
8
+ {% include categories.html offset=10 items=site.categories
9
+ item_type="category" %}
25
10
  </div>
11
+
12
+ <button
13
+ id="show-more-categories"
14
+ class="show-more"
15
+ onclick="toggleItems('categories')"
16
+ >
17
+ show more
18
+ </button>
19
+
26
20
  <h2 class="title no-decoration" style="margin-top: 20px">Tags</h2>
27
21
  <div class="line"></div>
28
- <div>
22
+ <div id="categories-list">
29
23
  <!-- prettier-ignore -->
30
- {% for tag_post in site.tags %}
31
- {% assign nr_of_posts = 0 %}
32
- {% assign tag = tag_post | first %}
33
- {% assign tag_posts = site.tags[tag] %}
34
- {% assign tag_posts_selection = tag_posts | where_exp:"post", "post.layout == 'post'" %}
35
- {% assign tag_posts_selection = tag_posts_selection | where_exp:"post", "post.content.size > 1" %}
36
- {% for post in tag_posts_selection %}
37
- {% assign nr_of_posts = nr_of_posts | plus:1 %}
38
- {% endfor %}
39
-
40
- <li class="posts-list-item short-post category-list-item">
41
- <span class="categories">
42
- <h4>
43
- <a class="category" href="/tag/{{ tag }}">
44
- {{ tag }} ({{ nr_of_posts }})
45
- </a>
46
- </h4>
47
- </span>
48
- </li>
49
- {% endfor %}
24
+ {% include categories.html limit=10 items=site.tags item_type="tag" %}
50
25
  </div>
26
+ <div id="extra-tags" style="display: none">
27
+ {% include categories.html offset=10 items=site.tags item_type="tag" %}
28
+ </div>
29
+
30
+ <button id="show-more-tags" class="show-more" onclick="toggleItems('tags')">
31
+ show more
32
+ </button>
33
+
34
+ <script>
35
+ function toggleItems(itemType) {
36
+ var extraItems = document.getElementById("extra-" + itemType);
37
+ var showMoreButton = document.getElementById("show-more-" + itemType);
38
+
39
+ if (extraItems.style.display === "none") {
40
+ extraItems.style.display = "block";
41
+ showMoreButton.style.color = "#fc036f";
42
+ showMoreButton.innerText = "show less";
43
+ } else {
44
+ extraItems.style.display = "none";
45
+ showMoreButton.style.color = "#272b32";
46
+ showMoreButton.innerText = "show more";
47
+ }
48
+ }
49
+ </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/_layouts/post.html CHANGED
@@ -17,10 +17,9 @@ title: post
17
17
  style="text-decoration: none !important"
18
18
  href="/tag/{{ tag }}"
19
19
  >
20
- {{ tag }}</a
21
- >
20
+ {{ tag }}{% if page.tags.size > 1 %}, &nbsp;{% endif %}
21
+ </a>
22
22
  <!-- prettier-ignore -->
23
- {% if page.tags.size > 1 %}, &nbsp;{% endif %}
24
23
  {% endfor %}
25
24
  {% endif %}
26
25
  {% assign date = page.date | date: "%d %b %Y" %}
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
  }
@@ -365,3 +365,50 @@ body {
365
365
  .div-subtitle {
366
366
  height: 35px;
367
367
  }
368
+
369
+ .show-more {
370
+ border-width: 0;
371
+ padding: 0;
372
+ background: white;
373
+ margin-top: 0;
374
+ font-size: 0.8em;
375
+ }
376
+
377
+ /* Style for code blocks */
378
+ pre {
379
+ background-color: #f7f7f7; /* Background color for the code block */
380
+ border: 1px solid #e1e1e1; /* Border around the code block */
381
+ padding: 20px; /* Spacing around the code block */
382
+ border-radius: 5px; /* Rounded corners for the code block */
383
+ font-family: Monaco, monospace; /* Font for the code */
384
+ font-size: 12px; /* Font size for the code */
385
+ line-height: 1.5; /* Line height for the code */
386
+ overflow-x: auto; /* Add horizontal scroll bar if code overflows */
387
+ }
388
+
389
+ /* Style for code syntax highlighting */
390
+ pre code {
391
+ display: block; /* Ensure code is displayed as a block */
392
+ padding: 0; /* Remove padding for code */
393
+ margin: 0; /* Remove margin for code */
394
+ }
395
+
396
+ /* Style for code syntax highlighting colors */
397
+ pre code span {
398
+ color: #333; /* Default text color for code */
399
+ }
400
+
401
+ /* Style for specific code syntax elements */
402
+ pre code .comment {
403
+ color: #888; /* Color for comments */
404
+ }
405
+
406
+ pre code .keyword {
407
+ color: #0074d9; /* Color for keywords */
408
+ }
409
+
410
+ pre code .string {
411
+ color: #d35400; /* Color for strings */
412
+ }
413
+
414
+ /* Add more styles for different syntax elements as needed */
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.8
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-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll-archives
@@ -64,6 +64,7 @@ files:
64
64
  - README.md
65
65
  - _config.yml
66
66
  - _data/navigation.yml
67
+ - _includes/categories.html
67
68
  - _includes/highlights.html
68
69
  - _includes/intro.html
69
70
  - _includes/navigation.html