jekyll-theme-simple-blog 0.0.1 → 0.0.2

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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/{404.md → 404-en.md} +6 -2
  3. data/404-it.md +16 -0
  4. data/README.md +137 -203
  5. data/_includes/article-author-bio-small.html +26 -0
  6. data/_includes/facebook-comments.html +8 -0
  7. data/_includes/facebook-like-post.html +8 -0
  8. data/_includes/facebook-page-message.html +11 -0
  9. data/_includes/facebook-page-summary.html +11 -0
  10. data/_includes/footer.html +76 -0
  11. data/_includes/get-page-url.html +2 -0
  12. data/_includes/go-to-home-page.html +6 -0
  13. data/_includes/language-meta-link.html +18 -0
  14. data/_includes/language-selector.html +35 -0
  15. data/_includes/list-category-posts.html +37 -0
  16. data/_includes/post-meta-info.html +27 -0
  17. data/_includes/read-time.html +13 -0
  18. data/_includes/site-header.html +4 -3
  19. data/_includes/social-metatags.html +58 -34
  20. data/_layouts/category.html +11 -0
  21. data/_layouts/default.html +107 -77
  22. data/_layouts/home.html +0 -21
  23. data/_layouts/post.html +18 -12
  24. data/_layouts/rss-feed.xml +29 -0
  25. data/_sass/blog.scss +5 -4
  26. data/_sass/blog/_extra.scss +27 -0
  27. data/_sass/blog/_layout.scss +19 -2
  28. data/_sass/jekyll-theme-simple-blog.scss +24 -5
  29. data/_sass/variables.scss +2 -2
  30. data/{about.md → about-en.md} +19 -15
  31. data/about-it.md +19 -0
  32. data/assets/img/en.png +0 -0
  33. data/assets/img/home-header.jpg +0 -0
  34. data/assets/img/it.png +0 -0
  35. data/assets/img/profile-225.png +0 -0
  36. data/assets/img/profile-60.png +0 -0
  37. data/assets/patterns/404.png +0 -0
  38. data/{contact.md → contact-en.md} +9 -1
  39. data/contact-it.md +26 -0
  40. data/feed-en.xml +6 -0
  41. data/feed-it.xml +6 -0
  42. data/index-en.md +50 -0
  43. data/index-it.md +50 -0
  44. data/now-en.md +20 -0
  45. data/now-it.md +21 -0
  46. data/projects-en.md +20 -0
  47. data/projects-it.md +19 -0
  48. data/sitemaps.xml +37 -0
  49. metadata +40 -7
  50. data/index.md +0 -19
@@ -0,0 +1,76 @@
1
+ <footer class="site-footer">
2
+ <!-- SVG icons from https://iconmonstr.com -->
3
+
4
+ <!-- Github icon -->
5
+ {% if site.github.owner_url %}
6
+ <span class="my-span-icon">
7
+ <a href="{{ site.github.owner_url }}" target="_blank" aria-label="{{ site.author.name }} {{ site.t[page.lang].on-word }} GitHub" title="{{ site.author.name }} {{ site.t[page.lang].on-word }} GitHub">
8
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
9
+ </a>
10
+ </span>
11
+ {% endif %}
12
+
13
+ {% if site.gitlab.owner_url %}
14
+ <span class="my-span-icon">
15
+ <a href="{{ site.gitlab.owner_url }}" target="_blank" aria-label="{{ site.author.name }} {{ site.t[page.lang].on-word }} GitLab" title="{{ site.author.name }} {{ site.t[page.lang].on-word }} GitLab">
16
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 102 102"><defs><style>.cls-1{fill:#0;}.cls-2{fill:#fff;}</style></defs><title>integration-gitlab-01</title><circle class="cls-1" cx="51" cy="51" r="51"/><g id="Page-1"><g id="logo-square"><g id="logo-no-bg"><path id="path50" class="cls-2" d="M52,83.81h0L64.2,46.27H39.8L52,83.81Z"/><path id="path58" class="cls-1" d="M52,83.81,39.8,46.27H22.71L52,83.81Z"/><path id="path66" class="cls-2" d="M22.71,46.27h0L19,57.67a2.53,2.53,0,0,0,.92,2.82L52,83.81,22.71,46.27Z"/><path id="path74" class="cls-2" d="M22.71,46.27H39.8L32.46,23.66a1.26,1.26,0,0,0-2.4,0L22.71,46.27Z"/><path id="path78" class="cls-1" d="M52,83.81,64.2,46.27H81.29L52,83.81Z"/><path id="path82" class="cls-2" d="M81.29,46.27h0L85,57.67a2.53,2.53,0,0,1-.92,2.82L52,83.81,81.29,46.27Z"/><path id="path86" class="cls-2" d="M81.29,46.27H64.2l7.35-22.61a1.26,1.26,0,0,1,2.4,0l7.35,22.61Z"/></g></g></g></svg>
17
+ </a>
18
+ </span>
19
+ {% endif %}
20
+
21
+
22
+ <!-- Facebook icon -->
23
+ {% assign facebook_profile = site.facebook.publisher_id | default: site.facebook.authors | default: nil | escape %}
24
+ {% if facebook_profile %}
25
+ <span class="my-span-icon">
26
+ <a href="https://facebook.com/{{ facebook_profile }}" target="_blank" aria-label="{{ site.author.name }} {{ site.t[page.lang].on-word }} Facebook" title="{{ site.author.name }} {{ site.t[page.lang].on-word }} Facebook">
27
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm3 8h-1.35c-.538 0-.65.221-.65.778v1.222h2l-.209 2h-1.791v7h-3v-7h-2v-2h2v-2.308c0-1.769.931-2.692 3.029-2.692h1.971v3z"/></svg>
28
+ </a>
29
+ </span>
30
+ {% endif %}
31
+
32
+ <!-- Instagram icon -->
33
+ {% if site.instagram_username %}
34
+ <span class="my-span-icon">
35
+ <a href="https://instagram.com/{{ site.instagram_username }}" target="_blank" aria-label="{{ site.author.name }} {{ site.t[page.lang].on-word }} Instagram" title="{{ site.author.name }} {{ site.t[page.lang].on-word }} Instagram">
36
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.25 7.288v1.269c0 .297-.241.539-.538.539h-1.269c-.299 0-.538-.242-.538-.539v-1.269c0-.297.239-.538.538-.538h1.269c.297 0 .538.241.538.538zm-5.25 7.403c1.486 0 2.693-1.205 2.693-2.692s-1.207-2.69-2.693-2.69c-1.487 0-2.691 1.204-2.691 2.691s1.204 2.691 2.691 2.691zm4.261-3.291c.028.196.046.396.046.599 0 2.38-1.928 4.308-4.307 4.308s-4.307-1.928-4.307-4.307c0-.204.018-.403.046-.599.027-.194.066-.383.118-.567h-1.107v5.879c0 .297.241.538.538.538h9.424c.297 0 .538-.241.538-.538v-5.879h-1.107c.05.184.09.373.118.566zm7.739.6c0 6.627-5.373 12-12 12s-12-5.373-12-12 5.373-12 12-12 12 5.373 12 12zm-5-5.385c0-.892-.723-1.615-1.615-1.615h-10.77c-.892 0-1.615.723-1.615 1.615v10.769c0 .893.723 1.616 1.615 1.616h10.77c.892 0 1.615-.723 1.615-1.616v-10.769z"/></svg>
37
+ </a>
38
+ </span>
39
+ {% endif %}
40
+
41
+ <!-- Twitter icon -->
42
+ {% if site.twitter.username %}
43
+ <span class="my-span-icon">
44
+ <a href="https://twitter.com/{{ site.twitter.username }}" target="_blank" aria-label="{{ site.author.name }} {{ site.t[page.lang].on-word }} Twitter" title="{{ site.author.name }} {{ site.t[page.lang].on-word }} Twitter">
45
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6.066 9.645c.183 4.04-2.83 8.544-8.164 8.544-1.622 0-3.131-.476-4.402-1.291 1.524.18 3.045-.244 4.252-1.189-1.256-.023-2.317-.854-2.684-1.995.451.086.895.061 1.298-.049-1.381-.278-2.335-1.522-2.304-2.853.388.215.83.344 1.301.359-1.279-.855-1.641-2.544-.889-3.835 1.416 1.738 3.533 2.881 5.92 3.001-.419-1.796.944-3.527 2.799-3.527.825 0 1.572.349 2.096.907.654-.128 1.27-.368 1.824-.697-.215.671-.67 1.233-1.263 1.589.581-.07 1.135-.224 1.649-.453-.384.578-.87 1.084-1.433 1.489z"/></svg>
46
+ </a>
47
+ </span>
48
+ {% endif %}
49
+
50
+ <!-- Linkedin icon -->
51
+ {% if site.linkedin_username %}
52
+ <span class="my-span-icon">
53
+ <a href="https://www.linkedin.com/in/{{ site.linkedin_username }}" target="_blank" aria-label="{{ site.author.name }} {{ site.t[page.lang].on-word }} Linkedin" title="{{ site.author.name }} {{ site.t[page.lang].on-word }} Linkedin">
54
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-2 16h-2v-6h2v6zm-1-6.891c-.607 0-1.1-.496-1.1-1.109 0-.612.492-1.109 1.1-1.109s1.1.497 1.1 1.109c0 .613-.493 1.109-1.1 1.109zm8 6.891h-1.998v-2.861c0-1.881-2.002-1.722-2.002 0v2.861h-2v-6h2v1.093c.872-1.616 4-1.736 4 1.548v3.359z"/></svg>
55
+ </a>
56
+ </span>
57
+ {% endif %}
58
+
59
+ <!-- RSS icon -->
60
+ <span class="my-span-icon hide-on-small">
61
+ <a href="{{ '/feed-' | prepend: site.baseurl | prepend: site.url | append: page.lang | append: '.xml' }}" target="_blank" aria-label="RSS feed" title="{{ site.author.name }}'s RSS feed">
62
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-3.374 17c-.897 0-1.626-.727-1.626-1.624s.729-1.624 1.626-1.624 1.626.727 1.626 1.624-.729 1.624-1.626 1.624zm3.885 0c-.03-3.022-2.485-5.474-5.511-5.504v-2.406c4.361.03 7.889 3.555 7.92 7.91h-2.409zm4.081 0c-.016-5.297-4.303-9.571-9.592-9.594v-2.406c6.623.023 11.985 5.384 12 12h-2.408z"/></svg>
63
+ </a>
64
+ </span>
65
+
66
+ <!-- Contact icon -->
67
+ {% assign contact_page = site.pages | where:"ref", "contact" | where:"lang", page.lang | first %}
68
+ {% if contact_page.title %}
69
+ <span class="my-span-icon">
70
+ <a href="{{ contact_page.url | prepend: site.baseurl }}" aria-label="{{ site.t[page.lang].contact }}" title="{{ site.t[page.lang].contact }} {{ site.author.name }}">
71
+ <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 .02c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6.99 6.98l-6.99 5.666-6.991-5.666h13.981zm.01 10h-14v-8.505l7 5.673 7-5.672v8.504z"/></svg>
72
+ </a>
73
+ </span>
74
+ {% endif %}
75
+
76
+ </footer>
@@ -0,0 +1,2 @@
1
+ {% assign thispage = site.pages | where:"ref", include.page_ref | where:"lang", include.page_lang | first %}
2
+ {% if thispage %}{{ thispage.url | prepend: site.baseurl }}{% else %}{{ site.baseurl }}/ciaone{% endif %}
@@ -0,0 +1,6 @@
1
+ {% assign home_page = site.pages | where:"ref", "home" | where:"lang", page.lang | first %}
2
+ {% if home_page %}
3
+ [{{ site.t[page.lang].go-to-home-page }}]({{ home_page.url | prepend: site.baseurl }})
4
+ {% else %}
5
+ [{{ site.t[page.lang].go-to-home-page }}]({{ site.baseurl }}/)
6
+ {% endif %}
@@ -0,0 +1,18 @@
1
+ {% assign posts=site.posts | where:"ref", page.ref | sort: 'lang' %}
2
+ {% assign this_page_lang = page.lang %}
3
+ {% if posts %}
4
+ {% for post in posts %}
5
+ {% if post.lang != this_page_lang %}
6
+ <link rel="alternate" hreflang="{{ post.lang }}" href="{{ post.url | prepend: site.baseurl | prepend: site.url }}" />
7
+ {% endif %}
8
+ {% endfor %}
9
+ {% endif %}
10
+
11
+ {% assign pages = site.pages | where:"ref", page.ref | sort: 'lang' %}
12
+ {% if pages %}
13
+ {% for page in pages %}
14
+ {% if page.lang != this_page_lang %}
15
+ <link rel="alternate" hreflang="{{ page.lang }}" href="{{ page.url | prepend: site.baseurl | prepend: site.url }}" />
16
+ {% endif %}
17
+ {% endfor %}
18
+ {% endif %}
@@ -0,0 +1,35 @@
1
+ <!-- http://icons2.iconarchive.com/show/flat-europe-flag-icons-by-custom-icon-design.html -->
2
+ {% assign posts=site.posts | where:"ref", page.ref | sort: 'lang' %}
3
+ {% assign this_page_lang = page.lang %}
4
+ {% assign posts_number = posts | size %}
5
+ {% if posts_number > 1 %}
6
+ <div style="text-align: right;">
7
+ {% for post in posts %}
8
+ {% if post.ref and post.lang != this_page_lang %}
9
+ <span style="padding-left: 6px; padding-right: 6px;">
10
+ <a href="{{ post.url | prepend: site.baseurl }}">
11
+ {{ post.lang }}
12
+ <!-- <img src="{{ post.lang | prepend: 'assets/img/' }}.png" alt="{{ post.lang }}" class="{{ post.lang }}"> -->
13
+ </a>
14
+ </span>
15
+ {% endif %}
16
+ {% endfor %}
17
+ </div>
18
+ {% endif %}
19
+
20
+ {% assign pages = site.pages | where:"ref", page.ref | sort: 'lang' %}
21
+ {% assign pages_number = pages | size %}
22
+ {% if pages_number > 1 %}
23
+ <div style="text-align: right; padding-bottom: 8px;">
24
+ {% for page in pages %}
25
+ {% if page.ref and page.lang != this_page_lang %}
26
+ <span style="padding-left: 6px; padding-right: 6px;">
27
+ <a href="{{ page.url | prepend: site.baseurl }}">
28
+ {{ page.lang }}
29
+ <!-- <img src="{{ page.lang | prepend: 'assets/img/' }}.png" alt="{{ page.lang }}" class="{{ page.lang }}"> -->
30
+ </a>
31
+ </span>
32
+ {% endif %}
33
+ {% endfor %}
34
+ </div>
35
+ {% endif %}
@@ -0,0 +1,37 @@
1
+ {% assign category = include.category %}
2
+ {% assign lang = include.lang %}
3
+ {% assign posts_lang = site.categories[category] | where:"lang", lang %}
4
+ {% assign max_posts = include.max | posts_lang.size %}
5
+ <ul class="post-list">
6
+ {% for post in posts_lang limit:max_posts %}
7
+ <li>
8
+ {% if site.show_post_image_posts_list %}
9
+ <div style="height:100px;width=100%;margin-bottom:13px;background:url('{{post.header.image | prepend: site.baseurl }}') center center repeat;">
10
+ </div>
11
+ {% endif %}
12
+ <h2>
13
+ <a class="post-link" href="{{ post.url | prepend: site.baseurl }}" title="{{ post.title }}">{{ post.title | escape }}</a>
14
+ </h2>
15
+
16
+ <div class="post-meta-list">
17
+ {% include post-meta-info.html post_date=post.date post_url=post.url post_lang=post.lang %}
18
+ </div>
19
+
20
+ <span>{{ post.excerpt | default: post.tagline | markdownify | truncatewords: 140 }}</span>
21
+
22
+ {%if post.tags.size > 0 %}
23
+ <div class="post-meta-list post-tag-list">
24
+ {% for tag in post.tags %}
25
+ <code>{{ tag | escape }}</code>&nbsp;
26
+ {% endfor %}
27
+ </div>
28
+ {%endif %}
29
+
30
+ <div class="post-meta-list"><a href="{{ post.url | prepend: site.baseurl }}" title="{{ post.title }}">{{ site.t[lang].read-more }}...</a></div>
31
+ </li>
32
+ {% endfor %}
33
+ </ul>
34
+ {% if max_posts < posts_lang.size %}
35
+ {% capture category_url %}{% include get-page-url.html page_ref=category page_lang=lang %}{% endcapture %}
36
+ <a href="{{ category_url }}" class="btn btn-dark">Show More...</a>
37
+ {% endif %}
@@ -0,0 +1,27 @@
1
+ <div>
2
+ <time datetime="{{ include.post_date | date_to_xmlschema }}" itemprop="datePublished">
3
+ {% assign m = include.post_date | date: "%-m" %}
4
+ {% case m %}
5
+ {% when '1' %}{{ site.t[include.post_lang].months.january }}
6
+ {% when '2' %}{{ site.t[include.post_lang].months.february }}
7
+ {% when '3' %}{{ site.t[include.post_lang].months.march }}
8
+ {% when '4' %}{{ site.t[include.post_lang].months.april }}
9
+ {% when '5' %}{{ site.t[include.post_lang].months.may }}
10
+ {% when '6' %}{{ site.t[include.post_lang].months.june }}
11
+ {% when '7' %}{{ site.t[include.post_lang].months.july }}
12
+ {% when '8' %}{{ site.t[include.post_lang].months.august }}
13
+ {% when '9' %}{{ site.t[include.post_lang].months.september }}
14
+ {% when '10' %}{{ site.t[include.post_lang].months.october }}
15
+ {% when '11' %}{{ site.t[include.post_lang].months.november }}
16
+ {% when '12' %}{{ site.t[include.post_lang].months.december }}
17
+ {% endcase %}
18
+ {{ include.post_date | date: " %-d, %Y" }}
19
+ </time>
20
+ <span style="padding-left: 5px; padding-right: 5px;"> • </span>
21
+ <span itemprop="readtime">
22
+ {% capture read_time %}{% include read-time.html %}{% endcapture %}{{ read_time | strip }}
23
+ </span>
24
+ <span style="padding-left: 5px; padding-right: 5px;"> • </span>
25
+ {% assign canonical_url = include.post_url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url %}
26
+ <span><span class="fb-comments-count" data-href="{{ canonical_url }}">0</span> {{ site.t[include.post_lang].comments }}</span>
27
+ </div>
@@ -0,0 +1,13 @@
1
+ <!--
2
+ see:
3
+ https://github.com/mmistakes/jekyll-theme-basically-basic/blob/master/_includes/read-time.html -->
4
+
5
+ {% assign words_per_minute = site.words_per_minute | default: 200 %}
6
+
7
+ {% assign words = post.content | default: content | strip_html | number_of_words %}
8
+
9
+ {% if words < words_per_minute %}
10
+ ~1 {{ site.t[page.lang].read-time }}
11
+ {% else %}
12
+ {{ words | divided_by:words_per_minute }} {{ site.t[page.lang].read-time }}
13
+ {% endif %}
@@ -1,11 +1,12 @@
1
1
  <header class="site-header" role="banner">
2
2
 
3
3
  <div class="wrapper">
4
- {% assign default_paths = site.pages | map: "path" %}
4
+ {% assign default_paths = site.pages | where:"lang", page.lang | sort:"order" | map: "path" %}
5
5
  {% assign page_paths = site.header_pages | default: default_paths %}
6
6
 
7
7
  {% if page.layout != 'home' %}
8
- <a class="site-title" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
8
+ {% assign home_page_path = site.pages | where:"ref", "home" | where:"lang", page.lang | map: "url" | first %}
9
+ <a class="site-title" href="{{ home_page_path | prepend: site.baseurl }}">{{ site.title | escape }}</a>
9
10
  {% endif %}
10
11
 
11
12
  {% if page_paths %}
@@ -27,7 +28,7 @@
27
28
  {% if my_page.title %}
28
29
  {% if my_page.title contains "404" %}
29
30
  {% else %}
30
- <a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
31
+ <a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title | escape }}</a>
31
32
  {% endif %}
32
33
  {% endif %}
33
34
  {% endfor %}
@@ -1,24 +1,30 @@
1
1
  <!-- Update your html tag to include the itemscope and itemtype attributes. -->
2
2
  <html itemscope itemtype="http://schema.org/Article">
3
3
 
4
- {% if page.title %}
4
+ {% if page.title and page.layout == 'page' %}
5
+ {% assign page_title = page.title | append: ' | ' | append: site.title | escape %}
6
+ {% elsif page.title and page.layout == 'category' %}
7
+ {% assign page_title = page.title | append: ' | ' | append: site.title | escape %}
8
+ {% elsif page.title %}
5
9
  {% assign page_title = page.title | escape %}
6
10
  {% else %}
7
11
  {% assign page_title = site.title | escape %}
8
12
  {% endif %}
9
13
 
10
14
 
11
- {% if page.author or page.facebook.publisher %}
12
- {% assign page_author = page.author | default: nil | escape %}
13
- {% assign facebook_publisher = page.facebook.publisher | default: nil | escape %}
15
+ {% if page.author.name or page.facebook.publisher_id %}
16
+ {% assign page_author = page.author.name | default: nil | escape %}
17
+ {% assign facebook_publisher_id = page.facebook.publisher_id | default: nil | escape %}
14
18
  {% assign twitter_creator = page.twitter.username | default: site.twitter.site | default: nil | escape %}
19
+ {% assign facebook_authors = page.facebook.authors | default: nil | escape %}
15
20
  {% else %}
16
- {% assign page_author = site.author | default: nil | escape %}
17
- {% assign facebook_publisher = site.facebook.publisher | default: nil | escape %}
21
+ {% assign page_author = site.author.name | default: nil | escape %}
22
+ {% assign facebook_publisher_id = site.facebook.publisher_id | default: nil | escape %}
18
23
  {% assign twitter_creator = site.twitter.username | default: nil | escape %}
24
+ {% assign facebook_authors = site.facebook.authors | default: nil | escape %}
19
25
  {% endif %}
20
26
 
21
- {% assign page_description = page.excerpt | default: site.description | default: site.github.project_tagline | strip_html | normalize_whitespace | truncate: 152 | escape %}
27
+ {% assign page_description = page.excerpt | default: page.tagline | default: site.description | strip_html | normalize_whitespace | truncate: 300 | escape %}
22
28
 
23
29
  {%if page.image %}
24
30
  {% assign page_image = site.url | append: site.baseurl | append: page.image %}
@@ -26,53 +32,53 @@
26
32
  {% assign page_image = site.url | append: site.baseurl | append: site.image %}
27
33
  {%endif %}
28
34
 
29
- {% assign canonical_url = page.url | replace:'index.html','' | absolute_url %}
35
+ {% assign canonical_url = page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url %}
30
36
 
31
37
  <!-- Place this data between the <head> tags of your website -->
32
38
  {%if page_author %}
33
- <meta name="author" content="{{ page_author }}">
39
+ <meta name="author" content="{{ page_author }}" />
34
40
  {%endif %}
35
41
  <meta name="description" content="{{ page_description }}" />
36
- {%if page.tags.length > 0 %}
42
+ {%if page.tags.size > 0 %}
37
43
  <meta name="keywords" itemprop="tags" content="{{ page.tags | join: ', ' | escape }}"/>
38
44
  {%endif %}
39
45
  {%if page.keywords %}
40
- <meta name="keywords" itemprop="keywords" content="{{ page.keywords | escape }}">
46
+ <meta name="keywords" itemprop="keywords" content="{{ page.keywords | escape }}" />
41
47
  {%endif %}
42
- {%if page.categories.length > 0 %}
43
- <meta name="keywords" itemprop="categories" content="{{ page.categories | join: ', ' | escape }}">
48
+ {%if page.categories.size > 0 %}
49
+ <meta name="keywords" itemprop="categories" content="{{ page.categories | join: ', ' | escape }}" />
44
50
  {%endif %}
45
51
  {%if page.category %}
46
- <meta name="keywords" itemprop="category" content="{{ category | escape }}">
52
+ <meta name="keywords" itemprop="category" content="{{ category | escape }}" />
47
53
  {%endif %}
48
54
 
49
55
  <!-- Schema.org markup for Google+ -->
50
- <meta itemprop="name" content="{{ page_title }}">
51
- <meta itemprop="description" content="{{ page_description }}">
56
+ <meta itemprop="name" content="{{ page_title }}" />
57
+ <meta itemprop="description" content="{{ page_description }}" />
52
58
  {%if page_image %}
53
- <meta itemprop="image" content="{{ page_image }}">
59
+ <meta itemprop="image" content="{{ page_image }}" />
54
60
  {%endif %}
55
61
 
56
62
  <!-- Twitter Card data -->
57
- <meta name="twitter:card" content="summary_large_image">
63
+ <meta name="twitter:card" content="summary_large_image" />
58
64
 
59
65
  {%if site.twitter.site %}
60
- <meta name="twitter:site" content="@{{ site.twitter.site }}">
66
+ <meta name="twitter:site" content="@{{ site.twitter.site }}" />
61
67
  {%endif %}
62
68
 
63
- <meta name="twitter:title" content="{{ page_title }}">
64
- <meta name="twitter:description" content="{{ page_description }}">
69
+ <meta name="twitter:title" content="{{ page_title }}" />
70
+ <meta name="twitter:description" content="{{ page_description }}" />
65
71
 
66
72
  {%if twitter_creator %}
67
- <meta name="twitter:creator" content="@{{ twitter_creator }}">
73
+ <meta name="twitter:creator" content="@{{ twitter_creator }}" />
68
74
  {%endif %}
69
75
 
70
76
  <!-- Twitter summary card with large image must be at least 280x150px -->
71
77
  {%if page_image %}
72
- <meta name="twitter:image:src" content="{{ page_image }}">
73
- <meta property="twitter:image" content="{{ page_image }}">
78
+ <meta name="twitter:image:src" content="{{ page_image }}" />
79
+ <meta name="twitter:image" content="{{ page_image }}" />
74
80
  {%endif %}
75
- <meta property="twitter:url" content="{{ canonical_url }}">
81
+ <meta name="twitter:url" content="{{ canonical_url }}" />
76
82
 
77
83
  <!-- Open Graph data -->
78
84
  <meta property="og:title" content="{{ page_title }}" />
@@ -83,6 +89,14 @@
83
89
  {%endif %}
84
90
  <meta property="og:description" content="{{ page_description }}" />
85
91
  <meta property="og:site_name" content="{{ site.title }}" />
92
+
93
+ {% if page-lang == "en" %}
94
+ {% assign page-lang-country = "en_US" %}
95
+ {% elsif page-lang == "it" %}
96
+ {% assign page-lang-country = "it_IT" %}
97
+ {% endif %}
98
+ <meta property="og:locale" content="{{ page-lang-country }}" />
99
+
86
100
  {%if page.date %}
87
101
  <meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}" />
88
102
  {%endif %}
@@ -91,40 +105,50 @@
91
105
  {%endif %}
92
106
 
93
107
  {%if site.facebook.admins %}
94
- <meta property="fb:admins" content="{{ site.facebook.admins }}" />
108
+ {% for admin in site.facebook.admins %}
109
+ <meta property="fb:admins" content="{{ admin }}" />
110
+ {% endfor %}
95
111
  {%endif %}
96
112
 
97
113
  {%if site.facebook.app_id %}
98
- <meta property="fb:app_id" content="{{ site.facebook.app_id }}">
114
+ <meta property="fb:app_id" content="{{ site.facebook.app_id }}" />
99
115
  {%endif %}
100
116
 
101
117
  {%if site.facebook.profile_id %}
102
- <meta property="fb:profile_id" content="{{ site.facebook.profile_id }}">
118
+ <meta property="fb:profile_id" content="{{ site.facebook.profile_id }}" />
103
119
  {%endif %}
104
120
 
105
- {%if facebook_publisher %}
106
- <meta property="article:author" content="https://www.facebook.com/{{ facebook_publisher }}">
121
+ {%if facebook_publisher_id %}
122
+ <meta property="article:publisher" content="https://www.facebook.com/{{ facebook_publisher_id }}" />
123
+ <meta property="fb:pages" content="{{ facebook_publisher_id }}" />
107
124
  {%endif %}
108
125
 
126
+ {%if facebook_authors %}
127
+ {% for fb_author in facebook_authors %}
128
+ <meta property="article:author" content="https://www.facebook.com/{{ fb_author }}" />
129
+ {% endfor %}
130
+ {%endif %}
131
+
132
+
109
133
  {%if page.tags %}
110
134
  {% for tag in page.tags %}
111
- <meta property="article:tag" content="{{ tag | escape }}">
135
+ <meta property="article:tag" content="{{ tag | escape }}" />
112
136
  {% endfor %}
113
137
  {%endif %}
114
138
 
115
139
  {%if page.keywords %}
116
140
  {% assign keywordsList = page.keywords | split:', ' %}
117
141
  {% for keyword in keywordsList %}
118
- <meta property="article:tag" content="{{ keyword | escape }}">
142
+ <meta property="article:tag" content="{{ keyword | escape }}" />
119
143
  {% endfor %}
120
144
  {%endif %}
121
145
 
122
146
  {%if page.categories %}
123
147
  {% for category in page.categories %}
124
- <meta property="article:tag" content="{{ category | escape }}">
148
+ <meta property="article:tag" content="{{ category | escape }}" />
125
149
  {% endfor %}
126
150
  {%endif %}
127
151
 
128
152
  {%if page.category %}
129
- <meta property="article:tag" content="{{ category | escape }}">
153
+ <meta property="article:tag" content="{{ category | escape }}" />
130
154
  {%endif %}
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div>
6
+
7
+ {{ content }}
8
+
9
+ {% include list-category-posts.html lang=page.lang category=page.category %}
10
+
11
+ </div>
@@ -1,7 +1,15 @@
1
1
  <!DOCTYPE html>
2
- <html lang="{{ page.lang | default: site.lang | default: "en" }}">
2
+ {% assign page-lang = page.lang | default: site.lang | default: "en" %}
3
+ <html lang="{{ page-lang }}">
3
4
 
4
5
  <head>
6
+ {% if page-lang == "en" %}
7
+ {% assign page-lang-country = "en_US" %}
8
+ {% elsif page-lang == "it" %}
9
+ {% assign page-lang-country = "it_IT" %}
10
+ {% endif %}
11
+
12
+ {% include language-meta-link.html %}
5
13
 
6
14
  <!-- Non social metatags -->
7
15
  <meta charset="utf-8">
@@ -9,13 +17,21 @@
9
17
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
10
18
  <meta name="theme-color" content="#157878">
11
19
 
20
+ {% if page.title and page.layout == 'page' %}
21
+ {% assign page_title = page.title | append: ' | ' | append: site.title | escape %}
22
+ {% elsif page.title %}
23
+ {% assign page_title = page.title | escape %}
24
+ {% else %}
25
+ {% assign page_title = site.title | escape %}
26
+ {% endif %}
27
+
12
28
  {% if page.title %}
13
- {% assign page-title = page.title | escape %}
29
+ {% assign header_title = page.title | escape %}
14
30
  {% else %}
15
- {% assign page-title = site.title | escape %}
31
+ {% assign header_title = site.title | escape %}
16
32
  {% endif %}
17
33
 
18
- <title>{{ page-title }}</title>
34
+ <title>{{ page_title }}</title>
19
35
 
20
36
  {% if site.gems contains "jekyll-seo-tag" %}
21
37
  <!-- jekyll-seo-tag -->
@@ -23,114 +39,128 @@
23
39
  {% include social-metatags.html %}
24
40
  {% endif %}
25
41
 
26
- <link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
42
+ {% assign canonical_url = page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url %}
27
43
 
28
- {% if site.gems contains "jekyll-feed" %}
29
- <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
30
- {% endif %}
44
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
31
45
 
32
- <link rel="shortcut icon" href="{{ site.url }}/favicon.ico">
46
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ '/feed-' | prepend: site.baseurl | prepend: site.url | append: page.lang | append: '.xml' }}">
47
+
48
+ <link rel="shortcut icon" href="{{ '/favicon.ico' | prepend: site.baseurl }}">
33
49
  <meta name="robots" content="noarchive">
34
50
 
35
51
  <!-- <link rel="alternate" media="only screen and (max-width: 640px)" href="">
36
52
  <link rel="alternate" media="handheld" href=""> -->
37
53
 
38
-
39
54
  <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
40
- <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
55
+ <link rel="stylesheet" href="{{ '/assets/css/style.css' | prepend: site.baseurl }}">
56
+
57
+ {% if site.facebook.pixelcode %}
58
+ <!-- Facebook Pixel Code -->
59
+ <script>
60
+ !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
61
+ n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
62
+ n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
63
+ t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
64
+ document,'script','https://connect.facebook.net/{{ page-lang-country }}/fbevents.js');
65
+ fbq('init', '{{ site.facebook.pixelcode }}', {
66
+ em: 'insert_email_variable,'
67
+ });
68
+ fbq('track', 'PageView');
69
+ </script>
70
+ <noscript><img height="1" width="1" style="display:none"
71
+ src="https://www.facebook.com/tr?id={{ site.facebook.pixelcode }}&ev=PageView&noscript=1"
72
+ /></noscript>
73
+ <!-- DO NOT MODIFY -->
74
+ <!-- End Facebook Pixel Code -->
75
+ {% endif %}
76
+
41
77
  </head>
42
78
  <body>
79
+ {% if site.facebook.app_id %}
80
+
81
+ <div id="fb-root"></div>
82
+ <script>(function(d, s, id) {
83
+ var js, fjs = d.getElementsByTagName(s)[0];
84
+ if (d.getElementById(id)) return;
85
+ js = d.createElement(s); js.id = id;
86
+ js.src = "//connect.facebook.net/{{ page-lang-country }}/sdk.js#xfbml=1&version=v2.10&appId={{ site.facebook.app_id }}";
87
+ fjs.parentNode.insertBefore(js, fjs);
88
+ }(document, 'script', 'facebook-jssdk'));</script>
89
+ {% endif %}
43
90
 
44
91
  {% include site-header.html %}
45
92
 
46
93
  {% if page.layout == 'home' %}
47
- {% assign page-tagline = site.description | default: site.github.project_tagline | escape %}
94
+ {% assign page-tagline = page.tagline | default: site.description | escape %}
95
+ {% assign header-padding = "80px" %}
96
+ {% assign header-padding-bottom = "40px" %}
97
+ {% else %}
98
+ {% assign header-padding = "40px" %}
99
+ {% assign header-padding-bottom = "20px" %}
48
100
  {% endif %}
49
- {% if page.layout == 'page' %}
101
+
102
+ {% if page.layout == 'page' or page.layout == 'category' %}
50
103
  {% assign page-tagline = page.tagline | escape %}
51
104
  {% endif %}
105
+
52
106
  {% if page.layout == 'post' %}
53
- {% assign page-tagline = page.tagline | escape %}
107
+ {% assign page-tagline = page.tagline | default: page.repository.project_tagline | escape %}
54
108
  {% endif %}
55
109
 
56
- <section class="page-header" style="background: linear-gradient(0deg,rgba(0,0,0,0.5),rgba(0,0,0,0.1)), url('{{ site.baseurl }}{{ page.header.image | default: site.header.image }}') center center repeat;">
57
- <h1 class="project-name">{{ page-title }}</h1>
110
+ <section class="page-header" style="padding-top: {{ header-padding }}; padding-bottom: {{ header-padding-bottom }}; background: linear-gradient(0deg,rgba(0,0,0,0.2),rgba(0,0,0,0.0)), url('{{ site.baseurl }}{{ page.header.image | default: site.header.image }}') center center repeat;">
111
+ <h1 class="project-name">{{ header_title }}</h1>
58
112
  <h2 class="project-tagline">{{ page-tagline }}</h2>
59
- {% if page.layout == 'home' and site.github.is_project_page %}
60
- <a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
61
- {% if site.show_downloads %}
62
- <a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
63
- <a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
113
+
114
+ {% if page.repository.is_project_page %}
115
+ <a href="{{ page.repository.repository_url }}" class="btn" target="_blank">Source Code</a>
116
+ {% if page.repository.show_downloads %}
117
+ <a href="{{ page.repository.zip_url }}" class="btn" target="_blank">Download .zip</a>
118
+ <a href="{{ page.repository.tar_url }}" class="btn" target="_blank">Download .tar.gz</a>
64
119
  {% endif %}
65
120
  {% endif %}
66
121
  <!-- Post tagline -->
67
122
  {% if page.layout == 'post' %}
68
- <h2 class="project-date">
69
- <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
70
- {% assign date_format = site.jekyll-theme-simple-blog.date_format | default: "%b %-d, %Y" %}
71
- {{ page.date | date: date_format }}
72
- </time>
73
- {% assign page_author = page.author | default: site.author | default: nil | escape %}
74
- {% if page_author %}
75
- • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page_author }}</span></span>
76
- {% endif %}
77
- </h2>
123
+ <!-- <h2 class="project-date">
124
+ </h2> -->
78
125
  {% endif %}
79
126
  <!-- End: Post tagline -->
80
127
  </section>
81
128
 
129
+
82
130
  <section class="main-content">
83
131
 
132
+ {% include language-selector.html %}
133
+
84
134
  {{ content }}
85
135
 
86
- <footer class="site-footer">
87
- <!-- SVG icons from https://iconmonstr.com -->
88
-
89
- <!-- Github icon -->
90
- <span class="my-span-icon">
91
- <a href="{{ site.github.owner_url }}" aria-label="{{ site.github.owner_name }}'s GitHub" title="{{ site.github.owner_name }}'s GitHub">
92
- <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
93
- </a>
94
- </span>
95
-
96
- <!-- Twitter icon -->
97
- <span class="my-span-icon">
98
- <a href="https://twitter.com/{{ site.twitter.username }}" aria-label="{{ site.github.owner_name }}'s Twitter" title="{{ site.github.owner_name }}'s Twitter">
99
- <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6.066 9.645c.183 4.04-2.83 8.544-8.164 8.544-1.622 0-3.131-.476-4.402-1.291 1.524.18 3.045-.244 4.252-1.189-1.256-.023-2.317-.854-2.684-1.995.451.086.895.061 1.298-.049-1.381-.278-2.335-1.522-2.304-2.853.388.215.83.344 1.301.359-1.279-.855-1.641-2.544-.889-3.835 1.416 1.738 3.533 2.881 5.92 3.001-.419-1.796.944-3.527 2.799-3.527.825 0 1.572.349 2.096.907.654-.128 1.27-.368 1.824-.697-.215.671-.67 1.233-1.263 1.589.581-.07 1.135-.224 1.649-.453-.384.578-.87 1.084-1.433 1.489z"/></svg>
100
- </a>
101
- </span>
102
-
103
- <!-- RSS icon -->
104
- {% if site.gems contains "jekyll-feed" %}
105
- <span class="my-span-icon">
106
- <a href="{{ "/feed.xml" | relative_url }}" aria-label="RSS feed" title="{{ site.github.owner_name }}'s RSS feed">
107
- <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-3.374 17c-.897 0-1.626-.727-1.626-1.624s.729-1.624 1.626-1.624 1.626.727 1.626 1.624-.729 1.624-1.626 1.624zm3.885 0c-.03-3.022-2.485-5.474-5.511-5.504v-2.406c4.361.03 7.889 3.555 7.92 7.91h-2.409zm4.081 0c-.016-5.297-4.303-9.571-9.592-9.594v-2.406c6.623.023 11.985 5.384 12 12h-2.408z"/></svg>
108
- </a>
109
- </span>
110
- {% endif %}
111
- <!-- Contact icon -->
112
- {% assign about_page = site.pages | where: "path", "about.md" | first %}
113
- {% if about_page.title %}
114
- <span class="my-span-icon">
115
- <a href="{{ about_page.url | relative_url }}" aria-label="Contact" title="Contact {{ site.github.owner_name }}">
116
- <svg class="my-svg-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 .02c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6.99 6.98l-6.99 5.666-6.991-5.666h13.981zm.01 10h-14v-8.505l7 5.673 7-5.672v8.504z"/></svg>
117
- </a>
118
- </span>
119
- {% endif %}
136
+ {% include footer.html %}
120
137
 
121
- </footer>
122
138
  </section>
123
139
 
124
- {% if site.google_analytics %}
125
- <script type="text/javascript">
126
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
127
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
128
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
129
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
130
-
131
- ga('create', '{{ site.google_analytics }}', 'auto');
132
- ga('send', 'pageview');
133
- </script>
134
- {% endif %}
140
+ <script type="text/javascript">
141
+ var menu = document.querySelector("nav.site-nav");
142
+ var checkbox = document.getElementById("nav-trigger");
143
+
144
+ // close menu if click outside menu
145
+ document.addEventListener("click", function(e) {
146
+ if (menu != e.target &&
147
+ ! isDescendant(menu, e.target)) {
148
+ checkbox.checked = false;
149
+ }
150
+
151
+ }, false);
152
+
153
+ function isDescendant(parent, child) {
154
+ var node = child.parentNode;
155
+ while (node != null) {
156
+ if (node == parent) {
157
+ return true;
158
+ }
159
+ node = node.parentNode;
160
+ }
161
+ return false;
162
+ }
163
+
164
+ </script>
135
165
  </body>
136
166
  </html>