jekyll-theme-so-simple 3.0.0
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 +7 -0
- data/CHANGELOG.md +235 -0
- data/LICENSE +49 -0
- data/README.md +1145 -0
- data/_data/authors.yml +16 -0
- data/_data/navigation.yml +14 -0
- data/_data/text.yml +36 -0
- data/_includes/disqus-comments.html +19 -0
- data/_includes/documents-collection.html +3 -0
- data/_includes/entry-date.html +6 -0
- data/_includes/entry.html +39 -0
- data/_includes/footer-custom.html +3 -0
- data/_includes/footer.html +24 -0
- data/_includes/google-analytics.html +9 -0
- data/_includes/head-custom.html +5 -0
- data/_includes/head-feed.html +1 -0
- data/_includes/head-seo.html +1 -0
- data/_includes/head.html +50 -0
- data/_includes/lunr-search-scripts.html +106 -0
- data/_includes/masthead.html +13 -0
- data/_includes/navigation.html +17 -0
- data/_includes/page-author.html +37 -0
- data/_includes/page-categories.html +14 -0
- data/_includes/page-date.html +4 -0
- data/_includes/page-image.html +14 -0
- data/_includes/page-pagination.html +19 -0
- data/_includes/page-tags.html +14 -0
- data/_includes/posts-all.html +3 -0
- data/_includes/posts-category.html +3 -0
- data/_includes/posts-limit.html +3 -0
- data/_includes/posts-paginated.html +74 -0
- data/_includes/posts-tag.html +3 -0
- data/_includes/read-time.html +16 -0
- data/_includes/responsive-embed +16 -0
- data/_includes/scripts.html +43 -0
- data/_includes/skip-links.html +8 -0
- data/_includes/social-share.html +6 -0
- data/_includes/toc +9 -0
- data/_layouts/categories.html +48 -0
- data/_layouts/category.html +9 -0
- data/_layouts/collection.html +9 -0
- data/_layouts/default.html +22 -0
- data/_layouts/home.html +17 -0
- data/_layouts/page.html +30 -0
- data/_layouts/post.html +41 -0
- data/_layouts/posts.html +29 -0
- data/_layouts/search.html +11 -0
- data/_layouts/tag.html +9 -0
- data/_layouts/tags.html +48 -0
- data/_sass/so-simple.scss +31 -0
- data/_sass/so-simple/_author.scss +45 -0
- data/_sass/so-simple/_base.scss +112 -0
- data/_sass/so-simple/_buttons.scss +92 -0
- data/_sass/so-simple/_entries.scss +182 -0
- data/_sass/so-simple/_functions.scss +4 -0
- data/_sass/so-simple/_global.scss +393 -0
- data/_sass/so-simple/_icons.scss +43 -0
- data/_sass/so-simple/_mixins.scss +5 -0
- data/_sass/so-simple/_notices.scss +93 -0
- data/_sass/so-simple/_page.scss +282 -0
- data/_sass/so-simple/_reset.scss +523 -0
- data/_sass/so-simple/_syntax-highlighting.scss +334 -0
- data/_sass/so-simple/_tables.scss +34 -0
- data/_sass/so-simple/_utilities.scss +7 -0
- data/_sass/so-simple/_variables.scss +132 -0
- data/_sass/so-simple/functions/_color.scss +21 -0
- data/_sass/so-simple/functions/_em.scss +7 -0
- data/_sass/so-simple/functions/_fluid-type.scss +33 -0
- data/_sass/so-simple/functions/_yiq.scss +38 -0
- data/_sass/so-simple/mixins/_clearfix.scss +32 -0
- data/_sass/so-simple/mixins/_float.scss +15 -0
- data/_sass/so-simple/mixins/_image.scss +38 -0
- data/_sass/so-simple/mixins/_lists.scss +9 -0
- data/_sass/so-simple/mixins/_text-truncate.scss +10 -0
- data/_sass/so-simple/utilities/_accessibility.scss +43 -0
- data/_sass/so-simple/utilities/_align.scss +60 -0
- data/_sass/so-simple/utilities/_animations.scss +99 -0
- data/_sass/so-simple/utilities/_clearfix.scss +7 -0
- data/_sass/so-simple/utilities/_float.scss +7 -0
- data/_sass/so-simple/utilities/_responsive-embed.scss +66 -0
- data/_sass/so-simple/utilities/_text.scss +48 -0
- data/_sass/so-simple/vendor/breakpoint/_breakpoint.scss +114 -0
- data/_sass/so-simple/vendor/breakpoint/_context.scss +95 -0
- data/_sass/so-simple/vendor/breakpoint/_helpers.scss +151 -0
- data/_sass/so-simple/vendor/breakpoint/_legacy-settings.scss +50 -0
- data/_sass/so-simple/vendor/breakpoint/_no-query.scss +15 -0
- data/_sass/so-simple/vendor/breakpoint/_parsers.scss +215 -0
- data/_sass/so-simple/vendor/breakpoint/_respond-to.scss +82 -0
- data/_sass/so-simple/vendor/breakpoint/_settings.scss +71 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/_double.scss +33 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/_query.scss +82 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/_resolution.scss +31 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/_single.scss +26 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/_triple.scss +36 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/double/_default-pair.scss +21 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/double/_default.scss +22 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/double/_double-string.scss +22 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/resolution/_resolution.scss +60 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/single/_default.scss +13 -0
- data/_sass/so-simple/vendor/breakpoint/parsers/triple/_default.scss +18 -0
- data/_sass/so-simple/vendor/lity/_lity.scss +221 -0
- data/assets/css/main.scss +8 -0
- data/assets/js/lunr/lunr.da.min.js +18 -0
- data/assets/js/lunr/lunr.de.min.js +18 -0
- data/assets/js/lunr/lunr.du.min.js +18 -0
- data/assets/js/lunr/lunr.es.min.js +18 -0
- data/assets/js/lunr/lunr.fi.min.js +18 -0
- data/assets/js/lunr/lunr.fr.min.js +18 -0
- data/assets/js/lunr/lunr.hu.min.js +18 -0
- data/assets/js/lunr/lunr.it.min.js +18 -0
- data/assets/js/lunr/lunr.ja.min.js +1 -0
- data/assets/js/lunr/lunr.jp.min.js +1 -0
- data/assets/js/lunr/lunr.min.js +6 -0
- data/assets/js/lunr/lunr.multi.min.js +1 -0
- data/assets/js/lunr/lunr.no.min.js +18 -0
- data/assets/js/lunr/lunr.pt.min.js +18 -0
- data/assets/js/lunr/lunr.ro.min.js +18 -0
- data/assets/js/lunr/lunr.ru.min.js +18 -0
- data/assets/js/lunr/lunr.stemmer.support.min.js +1 -0
- data/assets/js/lunr/lunr.sv.min.js +18 -0
- data/assets/js/lunr/lunr.tr.min.js +18 -0
- data/assets/js/main.js +15 -0
- data/assets/js/main.min.js +6 -0
- data/assets/js/plugins/jquery.smooth-scroll.js +358 -0
- data/assets/js/plugins/jquery.smooth-scroll.min.js +9 -0
- data/assets/js/plugins/lity.js +655 -0
- data/assets/js/plugins/lity.min.js +5 -0
- data/assets/js/plugins/table-of-contents.js +59 -0
- data/assets/js/search-data.json +27 -0
- metadata +312 -0
data/_data/authors.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Sample Authors
|
|
2
|
+
# Remove file or replace with your own
|
|
3
|
+
|
|
4
|
+
Billy Rick:
|
|
5
|
+
name: Billy Rick
|
|
6
|
+
picture: /images/bio-photo-2.jpg
|
|
7
|
+
twitter: "@billyrick"
|
|
8
|
+
links:
|
|
9
|
+
- title: Twitter
|
|
10
|
+
url: https://twitter.com/billyrick
|
|
11
|
+
icon: fab fa-twitter-square
|
|
12
|
+
|
|
13
|
+
Cornelius Fiddlebone:
|
|
14
|
+
name: Cornelius Fiddlebone
|
|
15
|
+
picture: /images/bio-photo.jpg
|
|
16
|
+
twitter: corneliusfiddlebone
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Sample site navigation links
|
|
2
|
+
|
|
3
|
+
- title: Home
|
|
4
|
+
url: /
|
|
5
|
+
# - title: Posts
|
|
6
|
+
# url: /posts/
|
|
7
|
+
# - title: Categories
|
|
8
|
+
# url: /categories/
|
|
9
|
+
# - title: Tags
|
|
10
|
+
# url: /tags/
|
|
11
|
+
# - title: Recipes
|
|
12
|
+
# url: /recipes/
|
|
13
|
+
# - title: Search
|
|
14
|
+
# url: /search/
|
data/_data/text.yml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Theme text and labels
|
|
2
|
+
|
|
3
|
+
# English (default)
|
|
4
|
+
# -----------------
|
|
5
|
+
en: &DEFAULT_EN
|
|
6
|
+
skip_links: "Skip links"
|
|
7
|
+
skip_primary_nav: "Skip to primary navigation"
|
|
8
|
+
skip_content: "Skip to content"
|
|
9
|
+
skip_footer: "Skip to footer"
|
|
10
|
+
menu_label: "Menu"
|
|
11
|
+
by: "by"
|
|
12
|
+
min_read: "min read"
|
|
13
|
+
read_more: "Read more…"
|
|
14
|
+
categories: "Categories"
|
|
15
|
+
tags: "Tags"
|
|
16
|
+
pages_categorized: "Pages filed under"
|
|
17
|
+
pages_tagged: "Pages tagged"
|
|
18
|
+
table_of_contents: "Table of Contents"
|
|
19
|
+
results_found: "Result(s) found"
|
|
20
|
+
share: "Share"
|
|
21
|
+
tweet: "Tweet"
|
|
22
|
+
next: "Next"
|
|
23
|
+
previous: "Previous"
|
|
24
|
+
newer: "Newer"
|
|
25
|
+
older: "Older"
|
|
26
|
+
back_to_top: "Back to Top"
|
|
27
|
+
search_placeholder_text: "Enter your search term..."
|
|
28
|
+
powered_by: "Powered by"
|
|
29
|
+
en-US:
|
|
30
|
+
<<: *DEFAULT_EN
|
|
31
|
+
en-CA:
|
|
32
|
+
<<: *DEFAULT_EN
|
|
33
|
+
en-GB:
|
|
34
|
+
<<: *DEFAULT_EN
|
|
35
|
+
en-AU:
|
|
36
|
+
<<: *DEFAULT_EN
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{% if page.comments != false and jekyll.environment == "production" %}
|
|
2
|
+
<div class="page-comments">
|
|
3
|
+
<div id="disqus_thread"></div>
|
|
4
|
+
<script>
|
|
5
|
+
var disqus_config = function () {
|
|
6
|
+
this.page.url = '{{ page.url | absolute_url }}';
|
|
7
|
+
this.page.identifier = '{{ page.url | absolute_url }}';
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
(function() {
|
|
11
|
+
var d = document, s = d.createElement('script');
|
|
12
|
+
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
|
|
13
|
+
s.setAttribute('data-timestamp', +new Date());
|
|
14
|
+
(d.head || d.body).appendChild(s);
|
|
15
|
+
})();
|
|
16
|
+
</script>
|
|
17
|
+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
|
18
|
+
</div>
|
|
19
|
+
{% endif %}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{%- unless page.layout == 'collection' -%}
|
|
2
|
+
<time class="entry-date dt-published" datetime="{{ entry.date | date_to_xmlschema }}">
|
|
3
|
+
{%- assign date_format = site.date_format | default: "%B %-d, %Y" -%}
|
|
4
|
+
{{ entry.date | date: date_format }}
|
|
5
|
+
</time>
|
|
6
|
+
{%- endunless -%}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{% if entry.id %}
|
|
2
|
+
{% assign title = entry.title | markdownify | strip_html %}
|
|
3
|
+
{% else %}
|
|
4
|
+
{% assign title = entry.title %}
|
|
5
|
+
{% endif %}
|
|
6
|
+
|
|
7
|
+
<article class="entry h-entry">
|
|
8
|
+
<header class="entry-header">
|
|
9
|
+
<h3 class="entry-title p-name">
|
|
10
|
+
{% if entry.link %}
|
|
11
|
+
<a class="u-bookmark-of" href="{{ entry.link }}">{{ title }} <span class="link-arrow">→</span></a>
|
|
12
|
+
{% else %}
|
|
13
|
+
<a href="{{ entry.url | relative_url }}" rel="bookmark">{{ title }}</a>
|
|
14
|
+
{% endif %}
|
|
15
|
+
</h3>
|
|
16
|
+
{% if entry.image.thumbnail %}
|
|
17
|
+
{% assign entry_image = entry.image.thumbnail %}
|
|
18
|
+
{% unless entry_image contains '://' %}
|
|
19
|
+
{% assign entry_image = entry_image | relative_url %}
|
|
20
|
+
{% endunless %}
|
|
21
|
+
{% assign entry_image = entry_image | escape %}
|
|
22
|
+
<img class="entry-image u-photo" src="{{ entry_image }}" alt="">
|
|
23
|
+
{% endif %}
|
|
24
|
+
</header>
|
|
25
|
+
{% unless page.show_excerpts == false %}
|
|
26
|
+
<div class="entry-excerpt p-summary">
|
|
27
|
+
{% if entry.excerpt %}
|
|
28
|
+
{{ entry.excerpt | markdownify }}
|
|
29
|
+
<div class="more-link">
|
|
30
|
+
<a href="{{ entry.url | relative_url }}">{{ site.data.text[site.locale].read_more | default: 'Read More' }}</a>
|
|
31
|
+
</div>
|
|
32
|
+
{% endif %}
|
|
33
|
+
</div>
|
|
34
|
+
{% endunless %}
|
|
35
|
+
<footer class="entry-meta">
|
|
36
|
+
{% if site.read_time %}{% include read-time.html %}{% endif %}
|
|
37
|
+
{% if entry.date %}{% include entry-date.html %}{% endif %}
|
|
38
|
+
</footer>
|
|
39
|
+
</article>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<footer id="footer" class="site-footer">
|
|
2
|
+
{% include footer-custom.html %}
|
|
3
|
+
|
|
4
|
+
{%- if site.footer_links -%}
|
|
5
|
+
<div class="social-icons">
|
|
6
|
+
{%- for footer_link in site.footer_links -%}
|
|
7
|
+
{%- if footer_link.url contains "://" -%}
|
|
8
|
+
{%- assign url = footer_link.url -%}
|
|
9
|
+
{%- else -%}
|
|
10
|
+
{%- assign url = footer_link.url | relative_url -%}
|
|
11
|
+
{%- endif -%}
|
|
12
|
+
<a class="social-icon" href="{{ url }}"><i class="{{ footer_link.icon | default: 'fas fa-link' }} fa-2x" title="{{ footer_link.title }}"></i></a>
|
|
13
|
+
{%- endfor -%}
|
|
14
|
+
</div>
|
|
15
|
+
{%- endif -%}
|
|
16
|
+
|
|
17
|
+
<div class="copyright">
|
|
18
|
+
{% if site.copyright %}
|
|
19
|
+
{{ site.copyright | markdownify }}
|
|
20
|
+
{% else %}
|
|
21
|
+
<p>© {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}. {{ site.data.text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://github.com/mmistakes/so-simple-theme" rel="nofollow">So Simple</a>.</p>
|
|
22
|
+
{% endif %}
|
|
23
|
+
</div>
|
|
24
|
+
</footer>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
3
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
4
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
5
|
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
6
|
+
|
|
7
|
+
ga('create', '{{ site.google_analytics }}', 'auto');
|
|
8
|
+
ga('send', 'pageview');
|
|
9
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<link rel="alternate" type="application/atom+xml" title="{{ site.title | escape }}" href="{{ site.feed.path | default: 'feed.xml' | relative_url }}">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{% seo %}
|
data/_includes/head.html
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<meta charset="utf-8">
|
|
3
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
+
{% if site.owner.google.verify %}<meta name="google-site-verification" content="{{ site.owner.google.verify }}">{% endif %}
|
|
6
|
+
{% if site.owner.bing-verify %}<meta name="msvalidate.01" content="{{ site.owner.bing-verify }}">{% endif %}
|
|
7
|
+
|
|
8
|
+
{% if site.plugins contains 'jekyll-seo-tag' or site.gems contains 'jekyll-seo-tag' %}
|
|
9
|
+
{% comment %}
|
|
10
|
+
Add metadata for search engines and social networks if jekyll-seo-tag plugin is enabled
|
|
11
|
+
{% endcomment %}
|
|
12
|
+
{% include head-seo.html %}
|
|
13
|
+
{% else %}
|
|
14
|
+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
|
|
15
|
+
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
|
|
16
|
+
<link rel="canonical" href="{{ page.url | replace:'index.html', '' | absolute_url }}">
|
|
17
|
+
{% endif %}
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
/* Cut the mustard */
|
|
21
|
+
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
|
22
|
+
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + 'js';
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
|
|
27
|
+
{% if site.google_fonts %}
|
|
28
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={%- for font in site.google_fonts -%}{{ font.name | replace: ' ', '+' }}{% if font.weights %}:{% endif %}{{ font.weights | remove: ' ' }}{% if forloop.last != true %}|{% endif %}{%- endfor -%}">
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
{%- if site.plugins contains 'jekyll-feed' or site.gems contains 'jekyll-feed' -%}
|
|
32
|
+
{%- comment -%}
|
|
33
|
+
Add Atom feed link if jekyll-feed plugin is enabled
|
|
34
|
+
{%- endcomment -%}
|
|
35
|
+
{% include head-feed.html %}
|
|
36
|
+
{%- endif -%}
|
|
37
|
+
|
|
38
|
+
{%- if site.head_scripts -%}
|
|
39
|
+
{%- for script in site.head_scripts -%}
|
|
40
|
+
{%- if script contains "://" -%}
|
|
41
|
+
{%- capture script_path %}{{ script }}{% endcapture -%}
|
|
42
|
+
{%- else -%}
|
|
43
|
+
{%- capture script_path %}{{ script | absolute_url }}{% endcapture -%}
|
|
44
|
+
{%- endif -%}
|
|
45
|
+
<script src="{{ script_path }}"></script>
|
|
46
|
+
{%- endfor -%}
|
|
47
|
+
{%- endif -%}
|
|
48
|
+
|
|
49
|
+
{% include head-custom.html %}
|
|
50
|
+
</head>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{%- assign lang = site.locale | slice: 0,2 | default: "en" -%}
|
|
2
|
+
{%- case lang -%}
|
|
3
|
+
{%- when "da" -%}
|
|
4
|
+
{%- assign lang = "da" -%}
|
|
5
|
+
{%- when "de" -%}
|
|
6
|
+
{%- assign lang = "de" -%}
|
|
7
|
+
{%- when "du" -%}
|
|
8
|
+
{%- assign lang = "du" -%}
|
|
9
|
+
{-% when "es" -%}
|
|
10
|
+
{%- assign lang = "es" -%}
|
|
11
|
+
{%- when "fi" -%}
|
|
12
|
+
{%- assign lang = "fi" -%}
|
|
13
|
+
{%- when "fr" -%}
|
|
14
|
+
{%- assign lang = "fr" -%}
|
|
15
|
+
{%- when "hu" -%}
|
|
16
|
+
{%- assign lang = "hu" -%}
|
|
17
|
+
{%- when "it" -%}
|
|
18
|
+
{%- assign lang = "it" -%}
|
|
19
|
+
{%- when "ja" -%}
|
|
20
|
+
{%- assign lang = "ja" -%}
|
|
21
|
+
{%- when "jp" -%}
|
|
22
|
+
{%- assign lang = "jp" -%}
|
|
23
|
+
{%- when "no" -%}
|
|
24
|
+
{%- assign lang = "no" -%}
|
|
25
|
+
{%- when "pt" -%}
|
|
26
|
+
{%- assign lang = "pt" -%}
|
|
27
|
+
{%- when "ro" -%}
|
|
28
|
+
{%- assign lang = "ro" -%}
|
|
29
|
+
{%- when "ru" -%}
|
|
30
|
+
{%- assign lang = "ru" -%}
|
|
31
|
+
{%- when "sv" -%}
|
|
32
|
+
{%- assign lang = "sv" -%}
|
|
33
|
+
{%- when "tr" -%}
|
|
34
|
+
{%- assign lang = "tr" -%}
|
|
35
|
+
{%- else -%}
|
|
36
|
+
{%- assign lang = "en" -%}
|
|
37
|
+
{%- endcase -%}
|
|
38
|
+
<script src="{{ '/assets/js/lunr/lunr.min.js' | absolute_url }}"></script>
|
|
39
|
+
<script src="{{ '/assets/js/search-data.json' | absolute_url }}"></script>
|
|
40
|
+
{%- unless lang == "en" -%}
|
|
41
|
+
<script src="{{ '/assets/js/lunr/lunr.stemmer.support.min.js' | absolute_url }}"></script>
|
|
42
|
+
<script src="{{ '/assets/js/lunr/lunr.' | append: lang | append: '.min.js' | absolute_url }}"></script>
|
|
43
|
+
{%- endunless %}
|
|
44
|
+
<script>
|
|
45
|
+
var idx = lunr(function () {
|
|
46
|
+
{% unless lang == "en" %}
|
|
47
|
+
// use the language
|
|
48
|
+
this.use(lunr.{{ lang }});
|
|
49
|
+
{% endunless %}
|
|
50
|
+
// the, the normal lunr index initialization
|
|
51
|
+
this.field('title')
|
|
52
|
+
this.field('excerpt')
|
|
53
|
+
this.field('categories')
|
|
54
|
+
this.field('tags')
|
|
55
|
+
this.ref('id')
|
|
56
|
+
|
|
57
|
+
this.pipeline.remove(lunr.trimmer)
|
|
58
|
+
|
|
59
|
+
// add documents to index
|
|
60
|
+
for (var item in store) {
|
|
61
|
+
this.add({
|
|
62
|
+
title: store[item].title,
|
|
63
|
+
excerpt: store[item].excerpt,
|
|
64
|
+
categories: store[item].categories,
|
|
65
|
+
tags: store[item].tags,
|
|
66
|
+
id: item
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
console.log(jQuery.type(idx));
|
|
72
|
+
|
|
73
|
+
$(document).ready(function () {
|
|
74
|
+
$('input#search').on('keyup', function () {
|
|
75
|
+
var resultdiv = $('#results');
|
|
76
|
+
var query = $(this).val().toLowerCase();
|
|
77
|
+
var result =
|
|
78
|
+
idx.query(function (q) {
|
|
79
|
+
query.split(lunr.tokenizer.separator).forEach(function (term) {
|
|
80
|
+
q.term(term, { boost: 100 })
|
|
81
|
+
if (query.lastIndexOf(" ") != query.length - 1) {
|
|
82
|
+
q.term(term, { usePipeline: false, wildcard: lunr.Query.wildcard.TRAILING, boost: 10 })
|
|
83
|
+
}
|
|
84
|
+
if (term != "") {
|
|
85
|
+
q.term(term, { usePipeline: false, editDistance: 1, boost: 1 })
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
resultdiv.empty();
|
|
90
|
+
resultdiv.prepend('<p class="results__found">' + result.length + ' {{ site.data.text[site.locale].results_found | default: "Result(s) found" }}</p>');
|
|
91
|
+
for (var item in result) {
|
|
92
|
+
var ref = result[item].ref;
|
|
93
|
+
var searchitem =
|
|
94
|
+
'<article class="entry">' +
|
|
95
|
+
'<h3 class="entry-title">' +
|
|
96
|
+
'<a href="' + store[ref].url + '">' + store[ref].title + '</a>' +
|
|
97
|
+
'</h3>' +
|
|
98
|
+
'<div class="entry-excerpt">' +
|
|
99
|
+
'<p>' + store[ref].excerpt.split(" ").splice(0, 20).join(" ") + '...</p>' +
|
|
100
|
+
'</div>' +
|
|
101
|
+
'</article>';
|
|
102
|
+
resultdiv.append(searchitem);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<header class="masthead">
|
|
2
|
+
<div class="wrap">
|
|
3
|
+
{% if site.logo %}
|
|
4
|
+
<a href="{{ '/' | relative_url }}" class="site-logo" rel="home" title="{{ site.title }}">
|
|
5
|
+
<img src="{{ site.logo | relative_url }}" class="site-logo-img animated fadeInDown" alt="{{ site.title }}">
|
|
6
|
+
</a>
|
|
7
|
+
{% endif %}
|
|
8
|
+
{% unless page.image.path %}
|
|
9
|
+
<h1 class="site-title animated fadeIn"><a href="{{ '/' | relative_url }}">{{ site.title }}</a></h1>
|
|
10
|
+
<p class="site-description animated fadeIn" itemprop="description">{{ site.description }}</p>
|
|
11
|
+
{% endunless %}
|
|
12
|
+
</div>
|
|
13
|
+
</header><!-- /.masthead -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{% if site.data.navigation %}
|
|
2
|
+
<div class="navigation-wrapper">
|
|
3
|
+
<a href="#menu-toggle" id="menu-toggle">{{ site.data.text[site.locale].menu_label | default: 'Menu' }}</a>
|
|
4
|
+
<nav id="primary-nav" class="site-nav animated drop">
|
|
5
|
+
<ul>
|
|
6
|
+
{%- for link in site.data.navigation -%}
|
|
7
|
+
{%- if link.url contains '://' -%}
|
|
8
|
+
{%- assign url = link.url -%}
|
|
9
|
+
{%- else -%}
|
|
10
|
+
{%- assign url = link.url | relative_url -%}
|
|
11
|
+
{%- endif -%}
|
|
12
|
+
<li><a href="{{ url }}">{{ link.title }}</a></li>
|
|
13
|
+
{%- endfor -%}
|
|
14
|
+
</ul>
|
|
15
|
+
</nav>
|
|
16
|
+
</div><!-- /.navigation-wrapper -->
|
|
17
|
+
{% endif %}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{%- assign author = page.author | default: page.authors[0] | default: site.author -%}
|
|
2
|
+
{%- assign author = site.data.authors[author] | default: author -%}
|
|
3
|
+
|
|
4
|
+
<div class="page-author h-card p-author">
|
|
5
|
+
{%- if author.picture -%}
|
|
6
|
+
{%- if author.picture contains "://" -%}
|
|
7
|
+
{%- assign author_picture = author.picture -%}
|
|
8
|
+
{%- else -%}
|
|
9
|
+
{%- assign author_picture = author.picture | relative_url -%}
|
|
10
|
+
{%- endif -%}
|
|
11
|
+
<img src="{{ author_picture }}" class="author-avatar u-photo" alt="{{ author.name }}">
|
|
12
|
+
{%- endif -%}
|
|
13
|
+
|
|
14
|
+
<div class="author-info">
|
|
15
|
+
{%- if author.name -%}
|
|
16
|
+
<div class="author-name">
|
|
17
|
+
{% if site.data.text[site.locale].by %}<em>{{ site.data.text[site.locale].by }}</em> {% endif %}<span class="p-name">{{ author.name }}</span>
|
|
18
|
+
</div>
|
|
19
|
+
{%- endif -%}
|
|
20
|
+
{%- if author.links[1] -%}
|
|
21
|
+
<ul class="author-links">
|
|
22
|
+
{%- for link in author.links -%}
|
|
23
|
+
{%- if link.url contains "://" -%}
|
|
24
|
+
{%- assign url = link.url -%}
|
|
25
|
+
{%- else -%}
|
|
26
|
+
{%- assign url = link.url | relative_url -%}
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
<li class="author-link">
|
|
29
|
+
<a class="u-url" rel="me" href="{{ url }}"><i class="{{ link.icon | default : 'fas fa-link' }} fa-lg" title="{{ link.title }}"></i></a>
|
|
30
|
+
</li>
|
|
31
|
+
{%- endfor -%}
|
|
32
|
+
</ul>
|
|
33
|
+
{%- endif -%}
|
|
34
|
+
{% if site.read_time %}{% include read-time.html %}{% endif %}
|
|
35
|
+
{% if page.date %}{% include page-date.html %}{% endif %}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{% if page.categories.size > 0 %}
|
|
2
|
+
<h3 class="page-taxonomies-title">{{ site.data.text[site.locale].categories | default: 'Categories' }}</h3>
|
|
3
|
+
<ul class="page-taxonomies">
|
|
4
|
+
{%- for category in page.categories -%}
|
|
5
|
+
<li class="page-taxonomy">
|
|
6
|
+
{%- if site.category_archive_path -%}
|
|
7
|
+
<a class="p-category" href="{{ category | slugify | prepend: site.category_archive_path | relative_url }}" title="{{ site.data.text[site.locale].pages_categorized | default: 'Pages filed under' }} {{ category }}">{{ category }}</a>
|
|
8
|
+
{%- else -%}
|
|
9
|
+
{{ category }}
|
|
10
|
+
{%- endif -%}
|
|
11
|
+
</li>
|
|
12
|
+
{%- endfor- %}
|
|
13
|
+
</ul>
|
|
14
|
+
{% endif %}
|