jekyll-theme-nettoyer 0.0.11 → 0.0.12

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
  SHA1:
3
- metadata.gz: 7e61f9e18b3dd8d56f7efb0bda4c4619cafc3842
4
- data.tar.gz: 9243f7039f2de437c404f7e9de7938ac7a0065ae
3
+ metadata.gz: 7cffbec6341f8d8cc05c1c551ef2b85418750c66
4
+ data.tar.gz: fcddc43fa132ef66f40423115d7cceaa06059a2a
5
5
  SHA512:
6
- metadata.gz: 6ae05e6873f5616166075bc05869e3fa5f5ad90454511c8af34bdfe9b9cbd21683ce979b10b71b7c230adf0171dac6da7b4fde46168fbffd0125f7991583309a
7
- data.tar.gz: 0c19ab53744b1db060d0ad6a8d9696ccadcdcda48b019d91898690cd9247a7c92675e6c492cd85448ff4c64fb187ee891d7e815d6476d8d9ca820d94dde7a214
6
+ metadata.gz: 19c914900c3d91faa660258308ea950cbe1d0bd9da4adecb9cb3f5795e1cc1061b0e39093eb83559bfad14089de694343f0049248f1b2d44edb68b194ce25b02
7
+ data.tar.gz: 65add4c6552c7621bdbf876e683e917ac786d264a88be047a82bbd7922ca256f6a605a7655a496a5df3aee5875e99a6449ac86247f84de40a9c26641ecab75ca
@@ -0,0 +1,20 @@
1
+ {% assign posts_count = site.posts | size %}
2
+
3
+ {% if posts_count != 0 %}
4
+ <ul class="articles">
5
+ {% for article in site.posts %}
6
+ <li>
7
+ {% if article.external_link %}
8
+ <a class="post-content" href="{{ article.external_link }}" target="_blank">
9
+ {% else %}
10
+ <a class="post-content" href="{{ article.url }}">
11
+ {% endif %}
12
+ <h3 class="title">{{ article.title }}</h3>
13
+ <time class="date">{{ article.date | date_to_string }}</time>
14
+ </a>
15
+ </li>
16
+ {% endfor %}
17
+ </ul>
18
+ {% else %}
19
+ <p>{{ site.data.i18n[site.locale].articles_not_found | default: 'no articles posted yet' }}</p>
20
+ {% endif %}
@@ -0,0 +1,16 @@
1
+ <section class="breadcrumbs">
2
+ <span class="section -path">
3
+ <a href="{{ site.url | absolute_url }}{% if site.baseurl %}{{ site.baseurl }}{% endif %}">
4
+ {{ site.data.i18n.home | default: 'home' }}
5
+ </a>
6
+ </span>
7
+
8
+ {% if page.postsurl %}
9
+ <span class="section -path">
10
+ <a href="{{ page.postsurl | absolute_url }}">{{ page.postsurl }}</a>
11
+ </span>
12
+ {% endif %}
13
+
14
+ <span class="section -current">{{ page.title }}</span>
15
+ </section>
16
+
@@ -0,0 +1,12 @@
1
+ {% assign words_in_content = content | number_of_words %}
2
+ {% assign words_per_minute = site.words_per_minute | default: 180 %}
3
+ {% assign double_words_per_minute = words_per_minute | times: 2 | default: 360 %}
4
+
5
+ {% assign minute_to_read = site.data.i18n[site.locale].minute_to_read | default: 'minute to read' %}
6
+ {% assign minutes_to_read = site.data.i18n[site.locale].minutes_to_read | default: 'minutes to read' %}
7
+
8
+ {% if words_in_content < double_words_per_minute %}
9
+ {% assign reading_time = '1 ' | append: minute_to_read %}
10
+ {% else %}
11
+ {% assign reading_time = words_in_content | divided_by: words_per_minute | append: ' ' | append: minutes_to_read %}
12
+ {% endif %}
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <section class="articles-list">
6
+ <h2 class="title">
7
+ {{ site.data.i18n[site.locale].latest_articles | default: 'latest articles' }}
8
+ </h2>
9
+
10
+ {% include _articles-list.html %}
11
+ </section>
data/_layouts/home.html CHANGED
@@ -5,23 +5,11 @@ layout: default
5
5
  <section class="home-wrapper">
6
6
  {{ content }}
7
7
 
8
- {% assign postsCount = site.posts | size %}
9
- {% if postsCount != 0 %}
10
- <section class="latest-articles">
11
- <h2 class="title">
12
- {{ site.data.i18n[site.locale].latest_articles | default: 'Latest articles' }}
13
- </h2>
8
+ <section class="articles-list">
9
+ <h2 class="title">
10
+ {{ site.data.i18n[site.locale].latest_articles | default: 'latest articles' }}
11
+ </h2>
14
12
 
15
- <ul class="articles">
16
- {% for article in site.posts %}
17
- <li>
18
- <a class="post-content" href="{{ article.url }}">
19
- <h3 class="title">{{ article.title }}</h3>
20
- <time class="date">{{ article.date | date_to_string }}</time>
21
- </a>
22
- </li>
23
- {% endfor %}
24
- </ul>
25
- </section>
26
- {% endif %}
13
+ {% include _articles-list.html %}
14
+ </section>
27
15
  </section>
data/_layouts/post.html CHANGED
@@ -2,12 +2,18 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
+ {% include _reading-time.html %}
6
+
5
7
  <article class="post-wrapper">
8
+
9
+ {% include _breadcrumbs.html %}
10
+
6
11
  <header class="post-header">
7
12
  <h2 class="title">{{ page.title }}</h2>
8
13
 
9
14
  <ul class="post-meta">
10
15
  <li class="info -date">{{ page.date | date_to_string }}</li>
16
+ <li class="info -reading-time">{{ reading_time }}</li>
11
17
 
12
18
  {% for category in page.categories %}
13
19
  <li class="info -category">
@@ -1,4 +1,4 @@
1
- .latest-articles {
1
+ .articles-list {
2
2
  @extend %section-commom;
3
3
 
4
4
  margin-top: 50px;
@@ -0,0 +1,16 @@
1
+ .breadcrumbs {
2
+ margin-bottom: 10px;
3
+
4
+ > .section {
5
+ font-family: $f_sans;
6
+ font-size: 14px;
7
+
8
+ &:not(:first-child)::before {
9
+ content: "> ";
10
+ color: $c_gray;
11
+ }
12
+ }
13
+
14
+ > .-path { text-transform: capitalize; }
15
+ > .-current { color: $c_darkgray; }
16
+ }
data/_sass/nettoyer.scss CHANGED
@@ -6,13 +6,14 @@
6
6
  @import 'core/objects';
7
7
  @import 'core/base';
8
8
 
9
+ @import 'components/breadcrumbs';
9
10
  @import 'components/main-header';
10
11
  @import 'components/main-nav';
11
12
  @import 'components/main-footer';
12
13
  @import 'components/post-header';
13
14
  @import 'components/post-meta';
14
15
  @import 'components/post-content';
15
- @import 'components/latest-articles';
16
+ @import 'components/articles-list';
16
17
 
17
18
  @import 'layout/main-template';
18
19
  @import 'layout/error-template';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-nettoyer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luan Vicente
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-23 00:00:00.000000000 Z
11
+ date: 2017-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -61,17 +61,22 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - LICENSE.txt
63
63
  - README.md
64
+ - _includes/_articles-list.html
65
+ - _includes/_breadcrumbs.html
64
66
  - _includes/_head.html
65
67
  - _includes/_main-footer.html
66
68
  - _includes/_main-header.html
67
69
  - _includes/_main-nav.html
70
+ - _includes/_reading-time.html
71
+ - _layouts/articles.html
68
72
  - _layouts/default.html
69
73
  - _layouts/error.html
70
74
  - _layouts/home.html
71
75
  - _layouts/log.html
72
76
  - _layouts/page.html
73
77
  - _layouts/post.html
74
- - _sass/components/_latest-articles.scss
78
+ - _sass/components/_articles-list.scss
79
+ - _sass/components/_breadcrumbs.scss
75
80
  - _sass/components/_main-footer.scss
76
81
  - _sass/components/_main-header.scss
77
82
  - _sass/components/_main-nav.scss