jekyll-theme-switch 0.1.1 → 0.5.1.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -22
  3. data/_includes/footer.html +27 -2
  4. data/_includes/head.html +34 -5
  5. data/_includes/post_meta.html +44 -7
  6. data/_includes/rss/post.html +4 -0
  7. data/_layouts/archive.html +1 -1
  8. data/_layouts/category_page.html +30 -10
  9. data/_layouts/default.html +1 -4
  10. data/_layouts/holidays.html +1 -1
  11. data/_layouts/home.html +37 -11
  12. data/_layouts/monthly_archive.html +2 -2
  13. data/_layouts/page.html +29 -7
  14. data/_layouts/post.html +53 -23
  15. data/_layouts/rss.html +32 -0
  16. data/_layouts/series_index.html +1 -1
  17. data/_layouts/series_post.html +3 -3
  18. data/_layouts/tag_page.html +30 -10
  19. data/_layouts/wrapped.html +6 -0
  20. data/_layouts/yearly_archive.html +2 -2
  21. data/_plugins/blog_series_plugin.rb +16 -0
  22. data/_plugins/category_tag_filter.rb +36 -0
  23. data/_plugins/filesize_filter.rb +13 -0
  24. data/_plugins/normalize_whitespace_filter.rb +10 -0
  25. data/_plugins/songlink_tag_plugin.rb +18 -0
  26. data/_plugins/video_tag_plugin.rb +62 -0
  27. data/_plugins/vimeo_tag_plugin.rb +23 -0
  28. data/_plugins/yearly_archive_plugin.rb +81 -0
  29. data/_sass/jekyll-theme-switch/_base.scss +1 -1
  30. data/_sass/jekyll-theme-switch/_dark.scss +51 -5
  31. data/_sass/jekyll-theme-switch/_layout.scss +157 -20
  32. data/_sass/jekyll-theme-switch/_syntax-highlighting.scss +0 -1
  33. data/assets/css/jekyll-theme-switch.scss +5 -5
  34. data/assets/image/arnaud-jaegers-OkXIepDkNBE-unsplash.jpg +0 -0
  35. data/assets/image/fabian-betto-d3npqyXkaGI-unsplash.jpg +0 -0
  36. data/assets/image/jonatan-pie-g6tqHx0ME1o-unsplash.jpg +0 -0
  37. data/assets/image/marek-piwnicki-NPct-Mxw-64-unsplash.jpg +0 -0
  38. metadata +21 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f91ae7534bf0e29a2ff7b72e9c885b01c8bcdd2e45cc8cd43028523be64aa4e
4
- data.tar.gz: d6f1ca2f1b98ec9b1a16f4249ba943b963963b4ffc2b65b3b241efbb03a371d0
3
+ metadata.gz: d0d89a669f8d8aca58df8c8b6da62f5cd77d3f92998de3a8ab986006445ac73c
4
+ data.tar.gz: 3adccd51233b13f211dc0c0d45e24d2f998592787e890b913417e2385e6c05ac
5
5
  SHA512:
6
- metadata.gz: 1d34d8d3d912de3e4560a45ac7714681d7cdcd6b4fe3a14ea588dd309783ca35e0481bc2a1c48c7eba119323e23826080776359339e18876575274d612afe054
7
- data.tar.gz: 402498fef7f2050428619dbb3adeabbcc65661b29f91d20674d39b14cedfd367120d16031f24a945a4ca38eaccbd18404f8afec1fd6dc2a0dad2040dcb6f9177
6
+ metadata.gz: 90607c40091b71556bed547ac674f96c9da8e04dad9a71bd6825e693003e7699f61c17e113c30f47172f98b88b5fb591c97262895fb2c6fb92f8040642af993f
7
+ data.tar.gz: 2feee0d0de9c8916c727f265db17be7810a9f0f066ed3c1bb0b6c5634bfad6e862209603493d0d6cf25c86772e6c6853a18c048fff570bbb6880fa38ee548fd0
data/README.md CHANGED
@@ -1,50 +1,46 @@
1
1
  # jekyll-theme-switch
2
2
 
3
- Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`.
4
-
5
- To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
6
-
7
- TODO: Delete this and the text above, and describe your gem
8
-
3
+ This is the Jekyll theme that powers the [Logging the Switch](https://luijten.org/) blog and is created by the same
4
+ author. It has various interesting features and is customizable to some extent; you might want to consider it.
9
5
 
10
6
  ## Installation
11
7
 
12
- Add this line to your Jekyll site's `Gemfile`:
8
+ Add the gem to your `Gemfile` (it's not on rubygems.org yet):
13
9
 
14
10
  ```ruby
15
- gem "jekyll-theme-switch"
11
+ git 'https://gitlab.com/islandsvinur/jekyll-theme-switch.git' do
12
+ gem 'jekyll-theme-switch', ref: 'v0.5.0'
13
+ end
16
14
  ```
17
15
 
18
- And add this line to your Jekyll site's `_config.yml`:
16
+ Run `bundle install`, then set the theme in your `_config.yml`:
19
17
 
20
- ```yaml
18
+ ```
21
19
  theme: jekyll-theme-switch
22
20
  ```
23
21
 
24
- And then execute:
25
-
26
- $ bundle
27
-
28
- Or install it yourself as:
29
-
30
- $ gem install jekyll-theme-switch
31
-
32
22
  ## Usage
33
23
 
34
24
  TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
35
25
 
36
26
  ## Contributing
37
27
 
38
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
28
+ Bug reports and pull requests are welcome on GitLab at https://gitlab.com/islandsvinur/jekyll-theme-switch. This project
29
+ is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
30
+ the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
39
31
 
40
32
  ## Development
41
33
 
42
34
  To set up your environment to develop this theme, run `bundle install`.
43
35
 
44
- Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
36
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your
37
+ browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like
38
+ normal to test your theme's contents. As you make modifications to your theme and to your content, your site will
39
+ regenerate and you should see the changes in the browser after a refresh, just like normal.
45
40
 
46
- When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
47
- To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-switch.gemspec` accordingly.
41
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be
42
+ bundled. To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-switch.gemspec`
43
+ accordingly.
48
44
 
49
45
  ## License
50
46
 
@@ -56,7 +56,25 @@
56
56
  </svg>
57
57
  </span>
58
58
 
59
- <span class="username">twitter.com/{{ site.twitter_username }}</span>
59
+ <span class="username">@{{ site.twitter_username }}</span>
60
+ </a>
61
+ </li>
62
+ {% endif %}
63
+
64
+ {% if site.instagram_username %}
65
+ <li>
66
+ <a href="https://instagram.com/{{ site.instagram_username }}"
67
+ rel="me">
68
+ <span class="icon icon--instagram">
69
+ <svg viewBox="0 0 512 512">
70
+ <path fill="#828282"
71
+ d="M256,49.471c67.266,0,75.233.257,101.8,1.469,24.562,1.121,37.9,5.224,46.778,8.674a78.052,78.052,0,0,1,28.966,18.845,78.052,78.052,0,0,1,18.845,28.966c3.45,8.877,7.554,22.216,8.674,46.778,1.212,26.565,1.469,34.532,1.469,101.8s-0.257,75.233-1.469,101.8c-1.121,24.562-5.225,37.9-8.674,46.778a83.427,83.427,0,0,1-47.811,47.811c-8.877,3.45-22.216,7.554-46.778,8.674-26.56,1.212-34.527,1.469-101.8,1.469s-75.237-.257-101.8-1.469c-24.562-1.121-37.9-5.225-46.778-8.674a78.051,78.051,0,0,1-28.966-18.845,78.053,78.053,0,0,1-18.845-28.966c-3.45-8.877-7.554-22.216-8.674-46.778-1.212-26.564-1.469-34.532-1.469-101.8s0.257-75.233,1.469-101.8c1.121-24.562,5.224-37.9,8.674-46.778A78.052,78.052,0,0,1,78.458,78.458a78.053,78.053,0,0,1,28.966-18.845c8.877-3.45,22.216-7.554,46.778-8.674,26.565-1.212,34.532-1.469,101.8-1.469m0-45.391c-68.418,0-77,.29-103.866,1.516-26.815,1.224-45.127,5.482-61.151,11.71a123.488,123.488,0,0,0-44.62,29.057A123.488,123.488,0,0,0,17.3,90.982C11.077,107.007,6.819,125.319,5.6,152.134,4.369,179,4.079,187.582,4.079,256S4.369,333,5.6,359.866c1.224,26.815,5.482,45.127,11.71,61.151a123.489,123.489,0,0,0,29.057,44.62,123.486,123.486,0,0,0,44.62,29.057c16.025,6.228,34.337,10.486,61.151,11.71,26.87,1.226,35.449,1.516,103.866,1.516s77-.29,103.866-1.516c26.815-1.224,45.127-5.482,61.151-11.71a128.817,128.817,0,0,0,73.677-73.677c6.228-16.025,10.486-34.337,11.71-61.151,1.226-26.87,1.516-35.449,1.516-103.866s-0.29-77-1.516-103.866c-1.224-26.815-5.482-45.127-11.71-61.151a123.486,123.486,0,0,0-29.057-44.62A123.487,123.487,0,0,0,421.018,17.3C404.993,11.077,386.681,6.819,359.866,5.6,333,4.369,324.418,4.079,256,4.079h0Z"/>
72
+ <path fill="#828282"
73
+ d="M256,126.635A129.365,129.365,0,1,0,385.365,256,129.365,129.365,0,0,0,256,126.635Zm0,213.338A83.973,83.973,0,1,1,339.974,256,83.974,83.974,0,0,1,256,339.973Z"/>
74
+ <circle fill="#828282" cx="390.476" cy="121.524" r="30.23"/>
75
+ </svg>
76
+ </span>
77
+ <span class="username">@{{ site.instagram_username }}</span>
60
78
  </a>
61
79
  </li>
62
80
  {% endif %}
@@ -76,10 +94,17 @@
76
94
  </div>
77
95
 
78
96
  <div class="footer-col footer-col-3">
79
- <p class="text">{{ site.description }}</p>
97
+ {{ site.description | markdownify }}
80
98
  </div>
81
99
  </div>
82
100
 
101
+ <div class="footer-col-wrapper">
102
+ <div class="footer-wide">
103
+ Generated by <a href="https://jekyllrb.com/">Jekyll</a>
104
+ and the <a href="https://islandsvinur.gitlab.io/jekyll-theme-switch/">Logging the Switch theme</a>.
105
+ </div>
106
+ </div>
107
+
83
108
  </div>
84
109
 
85
110
  </footer>
data/_includes/head.html CHANGED
@@ -3,14 +3,43 @@
3
3
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
5
 
6
- <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7
- <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
6
+ {% if page.excerpt %}
7
+ {% assign description = page.excerpt | strip_html | normalize_whitespace | truncate: 160 %}
8
+ {% else %}
9
+ {% assign description = site.description | markdownify | strip_html | normalize_whitespace %}
10
+ {% endif %}
11
+ {% if page.title %}{% assign title = page.title %}{% else %}{% assign title = site.title %}{% endif %}
12
+ <title>{{ title }}</title>
13
+ <meta name="description" content="{{ description }}">
8
14
 
9
15
  <link rel="stylesheet" href="{{ "/assets/css/jekyll-theme-switch.css" | prepend: site.baseurl }}">
16
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
10
17
  {% if page.previous %}<link rel="prev" href="{{ page.previous.url | absolute_url }}">{% endif %}
11
- <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
18
+ {% assign canonical_url = page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url %}
19
+ <link rel="canonical" href="{{ canonical_url }}">
12
20
  {% if page.next %}<link rel="next" href="{{ page.next.url | absolute_url }}">{% endif %}
13
21
  <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
14
- <link rel="webmention" href="https://webmention.io/{{ site.hostname }}/webmention" />
15
- <link rel="pingback" href="https://webmention.io/{{ site.hostname }}/xmlrpc" />
22
+
23
+ {% for link in site.links %}
24
+ <link rel="{{ link.rel }}" href="{{ link.href }}" />
25
+ {% endfor %}
26
+
27
+ <meta property="og:title" content="{{ title }}">
28
+ <meta property="og:description" content="{{ description }}">
29
+ <meta property="og:site_name" content="{{ site.title }}">
30
+ <meta property="og:url" content="{{ canonical_url }}">
31
+ {% if page.lead_image %}
32
+ <meta property="og:image" content="{{ page.lead_image | absolute_url }}" />
33
+ {% endif %}
34
+
35
+ {% if page.lead_image %}
36
+ <meta property="twitter:card" content="summary_large_image" />
37
+ <meta property="twitter:image" content="{{ page.lead_image | absolute_url }}" />
38
+ {% else %}
39
+ <meta property="twitter:card" content="summary" />
40
+ {% endif %}
41
+ <meta property="twitter:title" content="{{ title }}" />
42
+ <meta property="twitter:description" content="{{ description }}" />
43
+ {% if site.twitter_username %}<meta property="twitter:creator" content="@{{ site.twitter_username }}" />{% endif %}
44
+ <meta property="twitter:site" content="{{ canonical_url }}" />
16
45
  </head>
@@ -1,7 +1,44 @@
1
- <span class="post-meta">
2
- {% include date.html date=include.post.date %}
3
- door {{ include.post.author | default: site.author }}
4
- {% if include.post.categories.size > 0 %} in {{ include.post.categories | categorylinks | join: '/' }}{% endif %}
5
- {% if include.post.tags.size > 0 %} · tags: {{ include.post.tags | taglinks | join: ', ' }}{% endif %}
6
- {% if include.post.meta %} · {{ include.post.meta }}{% endif %}
7
- </span>
1
+ <div class="post-meta">
2
+ <ul>
3
+ {% if include.post.date %}
4
+ <li>
5
+ <span class="meta-icon">
6
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path
7
+ d="M29.85 37q-2.05 0-3.45-1.4-1.4-1.4-1.4-3.45 0-2.05 1.4-3.45 1.4-1.4 3.45-1.4 2.05 0 3.45 1.4 1.4 1.4 1.4 3.45 0 2.05-1.4 3.45-1.4 1.4-3.45 1.4ZM9 44q-1.2 0-2.1-.9Q6 42.2 6 41V10q0-1.2.9-2.1Q7.8 7 9 7h3.25V4h3.25v3h17V4h3.25v3H39q1.2 0 2.1.9.9.9.9 2.1v31q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h30V19.5H9V41Zm0-24.5h30V10H9Zm0 0V10v6.5Z"/></svg>
8
+ </span>
9
+ <span class="meta-text">{% include date.html date=include.post.date %}</span>
10
+ </li>
11
+ <li>
12
+ <span class="meta-icon">
13
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path
14
+ d="M24 23.95q-3.3 0-5.4-2.1-2.1-2.1-2.1-5.4 0-3.3 2.1-5.4 2.1-2.1 5.4-2.1 3.3 0 5.4 2.1 2.1 2.1 2.1 5.4 0 3.3-2.1 5.4-2.1 2.1-5.4 2.1ZM8 40v-4.7q0-1.9.95-3.25T11.4 30q3.35-1.5 6.425-2.25Q20.9 27 24 27q3.1 0 6.15.775 3.05.775 6.4 2.225 1.55.7 2.5 2.05.95 1.35.95 3.25V40Zm3-3h26v-1.7q0-.8-.475-1.525-.475-.725-1.175-1.075-3.2-1.55-5.85-2.125Q26.85 30 24 30t-5.55.575q-2.7.575-5.85 2.125-.7.35-1.15 1.075Q11 34.5 11 35.3Zm13-16.05q1.95 0 3.225-1.275Q28.5 18.4 28.5 16.45q0-1.95-1.275-3.225Q25.95 11.95 24 11.95q-1.95 0-3.225 1.275Q19.5 14.5 19.5 16.45q0 1.95 1.275 3.225Q22.05 20.95 24 20.95Zm0-4.5ZM24 37Z"/></svg>
15
+ </span>
16
+ <span class="meta-text">{{ include.post.author | default: site.author }}</span>
17
+ </li>
18
+ {% endif %}
19
+ {% if include.post.categories.size > 0 %}
20
+ <li>
21
+ <span class="meta-icon">
22
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path
23
+ d="m13.05 21.7 11-17.7 11 17.7ZM35.3 44q-3.7 0-6.2-2.5t-2.5-6.2q0-3.7 2.5-6.2t6.2-2.5q3.7 0 6.2 2.5t2.5 6.2q0 3.7-2.5 6.2T35.3 44ZM6 42.75v-15.2h15.2v15.2ZM35.3 41q2.4 0 4.05-1.65T41 35.3q0-2.4-1.65-4.05T35.3 29.6q-2.4 0-4.05 1.65T29.6 35.3q0 2.4 1.65 4.05T35.3 41ZM9 39.75h9.2v-9.2H9Zm9.45-21.05h11.2l-5.6-9.05Zm5.6 0ZM18.2 30.55Zm17.1 4.75Z"/></svg>
24
+ </span>
25
+ <span class="meta-text">{{ include.post.categories | categorylinks | join: ' / ' }}</span>
26
+ </li>
27
+ {% endif %}
28
+ {% if include.post.tags.size > 0 %}
29
+ <li>
30
+ <span class="meta-icon">
31
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path
32
+ d="m42 24-8.45 11.95q-.65.9-1.55 1.475-.9.575-2 .575H9q-1.25 0-2.125-.875T6 35V13q0-1.25.875-2.125T9 10h21q1.1 0 2 .575.9.575 1.55 1.475Zm-3.75 0-7.7-11H9v22h21.55ZM9 24v11-22Z"/>
33
+ </svg>
34
+ </span>
35
+ <span class="meta-text">{{ include.post.tags | taglinks | join: ', ' }}</span>
36
+ </li>
37
+ {% endif %}
38
+ {% if include.post.subtitle %}
39
+ <li>
40
+ <span class="meta-text">{{ include.post.subtitle }}</span>
41
+ </li>
42
+ {% endif %}
43
+ </ul>
44
+ </div>
@@ -0,0 +1,4 @@
1
+ {{ post.content | xml_escape }}
2
+ &lt;p&gt;&lt;em&gt;Originally posted on
3
+ &lt;a href='{{ post.url | prepend: site.baseurl | prepend: site.url }}'&gt;{{ site.title | xml_escape }}&lt;/a&gt;.
4
+ &lt;/em&gt;&lt;/p&gt;
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: default
2
+ layout: wrapped
3
3
  ---
4
4
  <div class="archives">
5
5
  <div>
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: default
2
+ layout: wrapped
3
3
  ---
4
4
 
5
5
  <div class="category-index">
@@ -7,17 +7,37 @@ layout: default
7
7
 
8
8
  <ul class="post-list">
9
9
  {% for post in page.posts %}
10
- <li {% if post.lead_image %}style="background-image: linear-gradient(90deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0.7) 80%), url('{{ post.lead_image }}'); background-size: contain;"{% endif %}>
10
+ {% if post.lead_image %}
11
+ <style type="text/css" scoped>
12
+ li#post-{{ post.id | slugify }} {
13
+ background-image: linear-gradient(90deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0.7) 80%),
14
+ url('{{ post.lead_image | prepend: site.baseurl | prepend: site.url }}');
15
+ background-size: cover;
16
+ background-repeat: no-repeat;
17
+ background-position-x: right;
18
+ }
11
19
 
12
- {% include post_meta.html post=post %}
20
+ @media (prefers-color-scheme: dark) {
21
+ li#post-{{ post.id | slugify }} {
22
+ background-image: linear-gradient(90deg, rgba(31,31,31,1) 50%, rgba(31,31,31,0.7) 80%),
23
+ url('{{ post.lead_image | prepend: site.baseurl | prepend: site.url }}');
24
+ }
25
+ }
26
+ </style>
27
+ {% endif %}
28
+ <li id="post-{{ post.id | slugify }}">
29
+ <article>
13
30
 
14
- <h2>
15
- <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
16
- </h2>
17
- <div>
18
- {{ post.excerpt }}
19
- </div>
20
- <a href="{{ post.url | prepend: site.baseurl }}">lees verder</a>
31
+ {% include post_meta.html post=post %}
32
+
33
+ <h2>
34
+ <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
35
+ </h2>
36
+ <div>
37
+ {{ post.excerpt }}
38
+ </div>
39
+ <a href="{{ post.url | prepend: site.baseurl }}">lees verder</a>
40
+ </article>
21
41
  </li>
22
42
  {% endfor %}
23
43
  </ul>
@@ -8,14 +8,11 @@
8
8
  {% include header.html %}
9
9
 
10
10
  <div class="page-content">
11
- <div class="wrapper">
12
- {{ content }}
13
- </div>
11
+ {{ content }}
14
12
  </div>
15
13
 
16
14
  {% include footer.html %}
17
15
 
18
- <script id="dsq-count-scr" src="//{{ site.disqus_hostname }}.disqus.com/count.js" async></script>
19
16
  </body>
20
17
 
21
18
  </html>
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: default
2
+ layout: wrapped
3
3
  ---
4
4
  <div class="post">
5
5
 
data/_layouts/home.html CHANGED
@@ -1,16 +1,32 @@
1
1
  ---
2
- layout: default
2
+ layout: wrapped
3
3
  ---
4
4
 
5
5
  <div class="home">
6
6
 
7
- <h1 class="page-heading">Posts</h1>
8
-
9
7
  <ul class="post-list">
10
8
  {% assign first = true %}
11
9
  {% for post in paginator.posts %}
12
- <li {% if post.lead_image %}style="background-image: linear-gradient(90deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0.7) 80%), url('{{ post.lead_image }}'); background-size: contain;"{% endif %}>
13
- <article>
10
+ {% if post.lead_image %}
11
+ <style type="text/css" scoped>
12
+ li#post-{{ post.id | slugify }} {
13
+ background-image: linear-gradient(90deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0.7) 80%),
14
+ url('{{ post.lead_image | prepend: site.baseurl | prepend: site.url }}');
15
+ background-size: cover;
16
+ background-repeat: no-repeat;
17
+ background-position: right center;
18
+ }
19
+
20
+ @media (prefers-color-scheme: dark) {
21
+ li#post-{{ post.id | slugify }} {
22
+ background-image: linear-gradient(90deg, rgba(31,31,31,1) 50%, rgba(31,31,31,0.7) 80%),
23
+ url('{{ post.lead_image | prepend: site.baseurl | prepend: site.url }}');
24
+ }
25
+ }
26
+ </style>
27
+ {% endif %}
28
+ <li id="post-{{ post.id | slugify }}">
29
+ <article>
14
30
  {% include post_meta.html post=post %}
15
31
 
16
32
  <h2>
@@ -25,7 +41,7 @@ layout: default
25
41
  <div>
26
42
  {{ post.excerpt }}
27
43
  </div>
28
- <a class="read-more" href="{{ post.url | prepend: site.baseurl }}">lees verder</a>
44
+ <a href="{{ post.url | prepend: site.baseurl }}">lees verder</a>
29
45
  {% endif %}
30
46
  </article>
31
47
  </li>
@@ -35,15 +51,25 @@ layout: default
35
51
  <!-- Pagination links -->
36
52
  <div class="pagination">
37
53
  {% if paginator.previous_page %}
38
- <a href="{{ paginator.previous_page_path }}" class="previous button">Vorige</a>
54
+ <a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="previous button">
55
+ <i class="material-icons">keyboard_arrow_left</i> Vorige
56
+ </a>
39
57
  {% else %}
40
- <span class="previous button">Vorige</span>
58
+ <span class="previous button">
59
+ <i class="material-icons">keyboard_arrow_left</i> Vorige
60
+ </span>
41
61
  {% endif %}
42
- <span class="page_number ">Pagina: {{ paginator.page }} van {{ paginator.total_pages }}</span>
62
+ <span class="page_number" style="display: flex; align-items: center">
63
+ Pagina: {{ paginator.page }} van {{ paginator.total_pages }}
64
+ </span>
43
65
  {% if paginator.next_page %}
44
- <a href="{{ paginator.next_page_path }}" class="next button">Volgende</a>
66
+ <a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="next button">
67
+ Volgende <i class="material-icons">keyboard_arrow_right</i>
68
+ </a>
45
69
  {% else %}
46
- <span class="next button">Volgende</span>
70
+ <span class="next button">
71
+ Volgende <i class="material-icons">keyboard_arrow_right</i>
72
+ </span>
47
73
  {% endif %}
48
74
  </div>
49
75
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: default
2
+ layout: wrapped
3
3
  ---
4
4
  <div class="monthly-archive">
5
5
  <div>
@@ -10,7 +10,7 @@ layout: default
10
10
  <dl>
11
11
  {% for post in page.posts reversed %}
12
12
  <dt>{% include date.html date=post.date %}</dt>
13
- <dd><a href="{{ post.url }}"><span>{{ post.title }}</span></a></dd>
13
+ <dd><a href="{{ post.url | prepend: site.baseurl }}"><span>{{ post.title }}</span></a></dd>
14
14
  {% endfor %}
15
15
  </dl>
16
16
  </div>
data/_layouts/page.html CHANGED
@@ -3,12 +3,34 @@ layout: default
3
3
  ---
4
4
  <div class="post {{ page.path | replace: '/', '-' | replace: '.', '-' }}">
5
5
 
6
- <header class="post-header">
7
- <h1 class="post-title">{{ page.title }}</h1>
8
- </header>
6
+ {% if page.lead_image %}
7
+ <div class="lead-image"
8
+ style="background-image: url('{{ page.lead_image | prepend: site.baseurl | prepend: site.url }}')">
9
+ <header class="post-header">
10
+ {% include post_meta.html post=page %}
11
+ <h1 class="post-title">{{ page.title }}</h1>
12
+ </header>
13
+ </div>
14
+ <div class="wrapper">
15
+ {% else %}
16
+ <div class="wrapper">
17
+ <header class="post-header">
18
+ <h1 class="post-title">{{ page.title }}</h1>
19
+ {% include post_meta.html post=page %}
20
+ </header>
21
+ {% endif %}
9
22
 
10
- <article class="post-content">
11
- {{ content }}
12
- </article>
23
+ <article class="post-content">
24
+ {{ content }}
25
+ </article>
13
26
 
14
- </div>
27
+ {% if page.lead_image_credit.unsplash %}
28
+ <div class="lead-image-credit">
29
+ Cover image by <a
30
+ href="https://unsplash.com/@{{ page.lead_image_credit.unsplash.username }}">{{
31
+ page.lead_image_credit.unsplash.name }}</a> on <a
32
+ href="https://unsplash.com">Unsplash</a>
33
+ </div>
34
+ {% endif %}
35
+ </div>
36
+ </div>
data/_layouts/post.html CHANGED
@@ -3,32 +3,62 @@ layout: default
3
3
  ---
4
4
  <div class="post {{ page.id | replace: '/', '-' }}">
5
5
 
6
- <header class="post-header">
7
- <h1 class="post-title">{{ page.title }}</h1>
8
- {% include post_meta.html post=page %}
9
- </header>
10
-
11
- <article class="post-content">
12
- {{ content }}
6
+ {% if page.lead_image %}
7
+ <div class="lead-image" style="background-image: url('{{ page.lead_image | prepend: site.baseurl | prepend: site.url }}')">
8
+ <header class="post-header">
9
+ {% include post_meta.html post=page %}
10
+ <h1 class="post-title">{{ page.title }}</h1>
11
+ </header>
12
+ </div>
13
+ <div class="wrapper">
14
+ {% else %}
15
+ <div class="wrapper">
16
+ <header class="post-header">
17
+ <h1 class="post-title">{{ page.title }}</h1>
18
+ {% include post_meta.html post=page %}
19
+ </header>
20
+ {% endif %}
13
21
 
14
- <div style="clear: both;"></div>
15
- </article>
22
+ <article class="post-content">
23
+ {{ content }}
16
24
 
17
- {% unless page.comments == false %}
18
- {% include disqus.html %}
19
- {% endunless %}
25
+ <div style="clear: both;"></div>
26
+ </article>
20
27
 
21
- <div class="post-nav">
22
- {% if page.previous %}
23
- <a href="{{ page.previous.url }}" class="previous button" title="{{ page.previous.title }}">Vorige</a>
24
- {% else %}
25
- <span class="previous button disabled">Vorige</span>
26
- {% endif %}
27
- {% if page.next %}
28
- <a href="{{ page.next.url }}" class="next button" title="{{ page.next.title }}">Volgende</a>
29
- {% else %}
30
- <span class="next button disabled">Volgende</span>
28
+ {% if page.lead_image_credit.unsplash %}
29
+ <div class="lead-image-credit">
30
+ Cover image by <a
31
+ href="https://unsplash.com/@{{ page.lead_image_credit.unsplash.username }}">{{
32
+ page.lead_image_credit.unsplash.name }}</a> on <a
33
+ href="https://unsplash.com">Unsplash</a>
34
+ </div>
31
35
  {% endif %}
32
- </div>
33
36
 
37
+ {% unless page.comments == false %}
38
+ {% include disqus.html %}
39
+ {% endunless %}
40
+
41
+ <div class="post-nav">
42
+ {% if page.previous %}
43
+ <a href="{{ page.previous.url | prepend: site.baseurl }}"
44
+ class="previous button" title="{{ page.previous.title }}">
45
+ <i class="material-icons">keyboard_arrow_left</i> Vorige
46
+ </a>
47
+ {% else %}
48
+ <span class="previous button disabled">
49
+ <i class="material-icons">keyboard_arrow_left</i> Vorige
50
+ </span>
51
+ {% endif %}
52
+ {% if page.next %}
53
+ <a href="{{ page.next.url | prepend: site.baseurl }}" class="next button"
54
+ title="{{ page.next.title }}">
55
+ Volgende <i class="material-icons">keyboard_arrow_right</i>
56
+ </a>
57
+ {% else %}
58
+ <span class="next button disabled">
59
+ Volgende <i class="material-icons">keyboard_arrow_right</i>
60
+ </span>
61
+ {% endif %}
62
+ </div>
63
+ </div>
34
64
  </div>
data/_layouts/rss.html ADDED
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3
+ <channel>
4
+ <title>{{ site.title | xml_escape }}</title>
5
+ <description>{{ site.description | markdownify | strip_html | normalize_whitespace }}</description>
6
+ <link>{{ site.url }}{{ site.baseurl }}/</link>
7
+ <atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
8
+ <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
9
+ <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
10
+ <generator>Jekyll v{{ jekyll.version }}</generator>
11
+ {% for post in site.posts limit:10 %}
12
+ <item>
13
+ <title>{{ post.title | xml_escape }}</title>
14
+ <description>
15
+ {% include rss/post.html %}
16
+ </description>
17
+ <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
18
+ <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
19
+ {% if post.lead_image %}
20
+ <enclosure url="{{ post.lead_image | prepend: site.baseurl | prepend: site.url }}" length="{{ post.lead_image | filesize }}"/>
21
+ {% endif %}
22
+ <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
23
+ {% for tag in post.tags %}
24
+ <category>{{ tag | xml_escape }}</category>
25
+ {% endfor %}
26
+ {% for cat in post.categories %}
27
+ <category>{{ cat | xml_escape }}</category>
28
+ {% endfor %}
29
+ </item>
30
+ {% endfor %}
31
+ </channel>
32
+ </rss>
@@ -5,7 +5,7 @@ layout: post
5
5
  <div class="series-footer">
6
6
  <ul>
7
7
  {% for post in page.series_posts %}
8
- <li><a href="{{ post.url }}">{{ post.title }}</a></li>
8
+ <li><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></li>
9
9
  {% endfor %}
10
10
  </ul>
11
11
  </div>
@@ -3,14 +3,14 @@ layout: post
3
3
  ---
4
4
  {% assign series_index = page.series_index[0] %}
5
5
  <div class="series-header">
6
- <p>Deze blogpost is onderdeel van de serie <a href="{{ series_index.url }}">{{ series_index.title }}</a>.</p>
6
+ <p>This post is part of the series <a href="{{ series_index.url | prepend: site.baseurl }}">{{ series_index.title }}</a>.</p>
7
7
  </div>
8
8
  {{ content }}
9
9
  <div class="series-footer">
10
- <p>Deze blogpost is onderdeel van de serie <a href="{{ series_index.url }}">{{ series_index.title }}</a>.</p>
10
+ <p>This post is part of the series <a href="{{ series_index.url | prepend: site.baseurl }}">{{ series_index.title }}</a>.</p>
11
11
  <ul>
12
12
  {% for post in series_index.series_posts %}
13
- <li><a href="{{ post.url }}">{{ post.title }}</a></li>
13
+ <li><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></li>
14
14
  {% endfor %}
15
15
  </ul>
16
16
  </div>