jekyll-theme-endless 0.3.1 → 0.4.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: '048954cb6b01292c57d7aeddb592a94e02e71ca49ea3ff6bc17cc128e0a5dac5'
4
- data.tar.gz: cc6597fcda7de04fd940b0904d0d542b18e9119201ccb0ddc1140080486ab456
3
+ metadata.gz: e98eb87261733403dbca146fb89841f052a45169adeea35c02fa36149ac302fc
4
+ data.tar.gz: '0919fc28e1e060fdc9d47afef6ff5e5988197b4432b6f231400d324541e694db'
5
5
  SHA512:
6
- metadata.gz: 03d0427df894a7fa5d29e4d7a2021db478c702befa0ef8e43a0786cf3f7985a522310ff518df391282b8101e57cce2d993fbdfe4b7d82d4f961746adf3aa4e68
7
- data.tar.gz: 77afae077fa3b9d8eaee554e650c5333a682ea6aba3ee003a28992d94dfb70dcc50631f1dd7425db003b04f67d41cd34948ca2ae56c83fec92df5632b34e3c7c
6
+ metadata.gz: a63b4c5156fa3333a938bc58b0e0d5e6cafe55b203649fdc4bb40ba54eb47de07653489136f34cc82a5fb1d72b421ba8a3cdf004e701b9c00100513574c20d0b
7
+ data.tar.gz: e4cee9e0caf44d517007ae71651c65c6ff2fd9d585c6485fe3fd431c22565a07311383777205959bff0268ccc9553e3008a6e7026ade78ef0c1c7690e4b25009
@@ -200,6 +200,24 @@ username_xing: XXXX
200
200
  username_linkedin: XXXX
201
201
  ----
202
202
 
203
+ `_includes/function_tag-list.html`::
204
+ Generates a formatted list of tags.
205
+ This is e.g. used to display the tags of a blog post.
206
+
207
+ `_includes/function_show-dates.html`::
208
+ Show the creation date and (if present) the date a blog post was last edited.
209
+ The date of the last edit can be configured by setting a value for the page-variable `lastedit`.
210
+
211
+ In AsciiDoc this would be e.g.:
212
+
213
+ [source, AsciiDoc]
214
+ ----
215
+ :page-lastedit: 2020-10-29
216
+ ----
217
+
218
+ `_includes/function_show-prev-next-navigation.html`::
219
+ Displays links to the previous and the next post of your blog.
220
+
203
221
 
204
222
 
205
223
  === Plugins
@@ -0,0 +1,16 @@
1
+ <div class="text-right">
2
+
3
+ <time class="created" datetime="{{ include.created | date_to_xmlschema }}">
4
+ <span class="sr-only sr-only-focusable">created:</span>
5
+ <strong title="date of creation">{{ include.created | date: "%b %-d, %Y" }}</strong>
6
+ </time>
7
+
8
+ {% if include.edited != "" and include.edited %}
9
+ /
10
+ <time class="edited" datetime="{{ include.edited | date_to_xmlschema }}">
11
+ <span class="sr-only sr-only-focusable">edited:</span>
12
+ <strong title="date of last edit">{{ include.edited | date: "%b %-d, %Y" }}</strong>
13
+ </time>
14
+ {% endif %}
15
+
16
+ </div>
@@ -0,0 +1,19 @@
1
+ <div class="row text-left">
2
+ <div class="col">
3
+ {% if page.next %}
4
+ <a href="{{ page.next.url }}">
5
+ <i class="fa fa-arrow-left d-md-none"></i>
6
+ <span class="d-none d-md-inline">&laquo; {{page.next.title}}</span>
7
+ </a>
8
+ {% endif %}
9
+ </div>
10
+ <div class="col text-right">
11
+ {% if page.previous %}
12
+ <a href="{{ page.previous.url }}">
13
+ <span class="d-none d-md-inline">{{page.previous.title}} &raquo;</span>
14
+ <i class="fa fa-arrow-right d-md-none"></i>
15
+ </a>
16
+ {% endif %}
17
+ </div>
18
+ </div>
19
+
@@ -1,7 +1,24 @@
1
1
  {% comment %}
2
+ Creates a tag cloud with tags beeing sized according to the number of occurences in blog posts.
3
+ {% endcomment %}
2
4
 
5
+ {% comment %}
6
+ Create an empty array.
7
+ {% endcomment %}
8
+ {% assign tags = "" | split:"" %}
9
+
10
+ {% comment %}
11
+ Fill the tags-array with tag-names.
12
+ The push-filter is a Jekyll specific filter.
13
+ {% endcomment %}
14
+ {% for tag in site.tags %}
15
+ {% assign tags = tags | push: tag.first %}
16
+ {% endfor %}
17
+
18
+ {% comment %}
19
+ Sort the tag-array case-insensitive.
3
20
  {% endcomment %}
4
- {% assign tags = site.tags | sort %}
21
+ {% assign tags_sorted = tags | sort_natural %}
5
22
 
6
23
  {% comment %}
7
24
  Requirements:
@@ -16,8 +33,8 @@ Assumption: Non of the tags occurs more than one million times.
16
33
  {% assign min = 1000000 %}
17
34
  {% assign max = 0 %}
18
35
 
19
- {% for tag in tags %}
20
- {% assign postsWithThisTag = tag | last | size %}
36
+ {% for tag in tags_sorted %}
37
+ {% assign postsWithThisTag = site.tags[tag] | size %}
21
38
  {% if postsWithThisTag > max %}
22
39
  {% assign max = postsWithThisTag %}
23
40
  {% endif %}
@@ -31,7 +48,7 @@ Assumption: Non of the tags occurs more than one million times.
31
48
 
32
49
  <ul class="tag-cloud list-unstyled">
33
50
 
34
- {% for tag in tags %}
51
+ {% for tag in tags_sorted %}
35
52
  <li>
36
53
  {% comment %}
37
54
  The size difference should be 150%.
@@ -46,12 +63,12 @@ Assumption: Non of the tags occurs more than one million times.
46
63
  To be on the safe side, create a float (times: 1.0)
47
64
  {% endcomment %}
48
65
 
49
- {% assign number = tag | last | size %}
66
+ {% assign number = site.tags[tag] | size %}
50
67
  {% assign percent = number | times: 1.0 | minus: min | times: sizeDifference | divided_by: steps | plus: 100 %}
51
- {% assign tagname = tag | first | replace:'-', ' ' %}
68
+ {% assign tagname = tag | replace:'-', ' ' %}
52
69
 
53
70
  <a
54
- href = "/{{ site.tag_dir | default: 'tags' }}/{{ tag | first }}"
71
+ href = "/{{ site.tag_dir | default: 'tags' }}/{{ tag }}"
55
72
  style = "font-size: {{ percent }}%"
56
73
  title = "Number of posts with the tag '{{ tagname }}': {{ number }}"
57
74
  >{{ tagname }}</a>
@@ -0,0 +1,15 @@
1
+ {% comment %}
2
+ Generates an unsorted list of tags.
3
+ Requires an array of tags beeing provided via the parameter `tags`.
4
+ {% endcomment %}
5
+ {% assign asize = include.tags | size %}
6
+ {% if asize > 0 %}
7
+ <ul class="list-inline">
8
+ {% for current_tag in include.tags %}
9
+ <li class="list-inline-item"><a
10
+ class="badge badge-pill badge-secondary"
11
+ href="/{{ site.tag_dir | default: 'tags' }}/{{ current_tag }}"
12
+ >{{ current_tag }}</a></li>
13
+ {% endfor %}
14
+ </ul>
15
+ {% endif %}
@@ -51,15 +51,15 @@ layout: html
51
51
 
52
52
 
53
53
  <!-- Page content -->
54
- <main class="container pt-4 pb-5" style="flex-grow: 1;" aria-label="Content">
54
+ <main class="container pt-4" style="flex-grow: 1;" aria-label="Content">
55
55
 
56
56
  <div class="row">
57
57
 
58
- <div class="col-lg-8">
58
+ <div class="col-lg-8 pb-5">
59
59
  {{ content }}
60
60
  </div>
61
61
 
62
- <div class="col-lg-4">
62
+ <div class="col-lg-4 pb-5">
63
63
  <aside>
64
64
  <h3>Blog Navigation</h3>
65
65
 
@@ -8,7 +8,7 @@
8
8
  <meta charset="utf-8">
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
10
10
  <title>
11
- {{ page.title }}
11
+ {{ page.title | default: page.menu_label | strip_html }}
12
12
  </title>
13
13
 
14
14
  <!-- Font-awesome CSS: https://www.bootstrapcdn.com/fontawesome/ -->
@@ -1,12 +1,42 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- {% comment %}
5
- In Markdown posts, page.title defaults to parts of the filename.
6
- Thus, do not use `# Heading` in Blog posts, otherwise two H1-heading will appear.
7
- {% endcomment %}
8
- {% if page.title %}
9
- <h1>{{ page.title }}</h1>
10
- {% endif %}
11
-
12
- {{ content }}
4
+ <article>
5
+ <header>
6
+
7
+ {% comment %}Show link to previous/next post.{% endcomment %}
8
+ {% include function_show-prev-next-navigation.html %}
9
+
10
+ {% comment %}Show dates of the post.{% endcomment %}
11
+ {% include function_show-dates.html
12
+ created = page.date
13
+ edited = page.lastedit
14
+ %}
15
+
16
+ {% comment %}
17
+ In Markdown posts, page.title defaults to parts of the filename.
18
+ Thus, do not use `# Heading` in Blog posts, otherwise two H1-heading will appear.
19
+ {% endcomment %}
20
+ {% if page.title %}
21
+ <h1>{{ page.title }}</h1>
22
+ {% endif %}
23
+
24
+ {% comment %}Show tags of the post.{% endcomment %}
25
+ {% include function_tag-list.html
26
+ tags=page.tags
27
+ %}
28
+
29
+ </header>
30
+
31
+ <div>
32
+ {{ content }}
33
+ </div>
34
+
35
+ {% comment %}Show link to previous/next post.{% endcomment %}
36
+ {% include function_show-prev-next-navigation.html %}
37
+
38
+ </article>
39
+
40
+
41
+
42
+
@@ -0,0 +1,16 @@
1
+ time {
2
+ color: #999;
3
+
4
+ &:before {
5
+ font-family: FontAwesome;
6
+ top:0;
7
+ padding-right:-1px;
8
+
9
+ &.created {
10
+ content: "\f017";
11
+ }
12
+ &.edited {
13
+ content: "\f044";
14
+ }
15
+ }
16
+ }
@@ -10,6 +10,7 @@
10
10
  @import "background";
11
11
  @import "address";
12
12
  @import "tag-cloud";
13
+ @import "posts";
13
14
 
14
15
  /*
15
16
  * import SCSS-Code contributed by the user of the theme.
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Endless
3
- VERSION = '0.3.1'
3
+ VERSION = '0.4.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-endless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Boekhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2020-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -37,7 +37,10 @@ files:
37
37
  - _includes/content_footer-usernames.html
38
38
  - _includes/function_list-pages.html
39
39
  - _includes/function_list-posts.html
40
+ - _includes/function_show-dates.html
41
+ - _includes/function_show-prev-next-navigation.html
40
42
  - _includes/function_tag-cloud.html
43
+ - _includes/function_tag-list.html
41
44
  - _layouts/default.html
42
45
  - _layouts/html.html
43
46
  - _layouts/page-postlist.html
@@ -46,6 +49,7 @@ files:
46
49
  - _layouts/post.html
47
50
  - _sass/address.scss
48
51
  - _sass/background.scss
52
+ - _sass/posts.scss
49
53
  - _sass/tag-cloud.scss
50
54
  - _sass/user.scss
51
55
  - assets/css/main.scss