jekyll-theme-2038 0.1.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.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +53 -0
  5. data/README.old.md +52 -0
  6. data/_config.yml +40 -0
  7. data/_data/theme-2038-i18n.yml +28 -0
  8. data/_includes/custom-head.html +2 -0
  9. data/_includes/drawer.html +26 -0
  10. data/_includes/footer.html +36 -0
  11. data/_includes/head.html +15 -0
  12. data/_includes/link-item.html +8 -0
  13. data/_includes/page-link.html +19 -0
  14. data/_includes/pick-language.html +6 -0
  15. data/_includes/plain-list.html +17 -0
  16. data/_includes/social.html +21 -0
  17. data/_includes/time-line.html +38 -0
  18. data/_includes/toc.html +182 -0
  19. data/_layouts/default.html +14 -0
  20. data/_layouts/page.html +12 -0
  21. data/_layouts/post.html +64 -0
  22. data/_sass/2038/colour-relative.scss +221 -0
  23. data/_sass/2038/colour/auto.scss +6 -0
  24. data/_sass/2038/colour/dark.scss +14 -0
  25. data/_sass/2038/colour/light.scss +10 -0
  26. data/_sass/2038/drawer.scss +121 -0
  27. data/_sass/2038/footer.scss +80 -0
  28. data/_sass/2038/init.scss +5 -0
  29. data/_sass/2038/miscellaneous.scss +194 -0
  30. data/_sass/2038/resize.scss +125 -0
  31. data/_sass/2038/syntax-dark.scss +87 -0
  32. data/_sass/2038/syntax-light.scss +87 -0
  33. data/_sass/2038/typo.scss +364 -0
  34. data/assets/billingual-annotation.svg +1 -0
  35. data/assets/dot-dark.svg +3 -0
  36. data/assets/dot-light.svg +3 -0
  37. data/assets/main.scss +9 -0
  38. data/assets/minima-social-icons.svg +50 -0
  39. data/assets/screenshot-light.jpg +0 -0
  40. data/assets/screenshot.jpg +0 -0
  41. data/assets/underline-dark.svg +3 -0
  42. data/assets/underline-light.svg +3 -0
  43. data/assets/wordmark.svg +28 -0
  44. metadata +99 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8b5e740add7ad1f7050b14f5f1bcbff16ec4220d8199a5656e47c7fba7c931a0
4
+ data.tar.gz: 17fb3368bcf71d32dc95bde3e84d36ffe17b2f636df4dec60619b8d98badab2c
5
+ SHA512:
6
+ metadata.gz: 1ef85fcf5099fa8640f1e308cd6f90e8784f0f82af43502d26cac642f91e37fa70cdfc1561ac9bcbac4cee43ec0c40052253452be4cd91149f1ce94280712a06
7
+ data.tar.gz: 39cddc5b487b3f43f98293c80ba8c6a4bbc41c3f9ed49eceab02dde653357342343310c242be1c0b6ba8cb1a8512a12fbc16beee3f34460557f3adb36cf3ca6e
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 物灵
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 物灵
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ <img src="assets/wordmark.svg" align="right" />
2
+
3
+ # 2038
4
+
5
+ ![Version 0.1.0 with Gem](https://img.shields.io/badge/gem-0.1.0-519dd9.svg)
6
+
7
+ > Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So, throw off the bowlines. Sail away from the safe harbour. Catch the trade winds in your sails. Explore. Dream. Discover.
8
+ > 20 年后,比起已做之事,你将更因未做之事绝望。所以,抛掉缰绳,驶离避风港,乘信风远航吧。去探索,去梦想,去发现。
9
+ >
10
+ > —— Unknown 佚名
11
+
12
+ 2038 is a minimalist Jekyll theme.
13
+
14
+ ## Screenshots
15
+
16
+ ![Light and English Screenshot](assets/screenshot-light.jpg)
17
+
18
+ ![Dark and Chinese Screenshot](assets/screenshot.jpg)
19
+
20
+ ## Features
21
+
22
+ * JavaScript-free
23
+ * Light/Dark colour theme
24
+ * Multilingual site
25
+ * Two ways of post list: Pagination and time line
26
+
27
+ ## Installation
28
+
29
+ Add this line to your Jekyll site's `Gemfile`:
30
+
31
+ ```ruby
32
+ gem "jekyll-theme2038"
33
+ ```
34
+
35
+ And add this line to your Jekyll site's `_config.yml`:
36
+
37
+ ```yaml
38
+ theme: jekyll-theme-2038
39
+ ```
40
+
41
+ And then execute:
42
+
43
+ $ bundle
44
+
45
+ Or install it yourself as:
46
+
47
+ $ gem install jekyll-theme-2038
48
+
49
+ ## Todo
50
+
51
+ * Support of UnicodeMath or ASCIIMath
52
+ * Right-to-left and vertical page
53
+
data/README.old.md ADDED
@@ -0,0 +1,52 @@
1
+ # 2038
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
+
9
+
10
+ ## Installation
11
+
12
+ Add this line to your Jekyll site's `Gemfile`:
13
+
14
+ ```ruby
15
+ gem "2038"
16
+ ```
17
+
18
+ And add this line to your Jekyll site's `_config.yml`:
19
+
20
+ ```yaml
21
+ theme: 2038
22
+ ```
23
+
24
+ And then execute:
25
+
26
+ $ bundle
27
+
28
+ Or install it yourself as:
29
+
30
+ $ gem install 2038
31
+
32
+ ## Usage
33
+
34
+ TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
35
+
36
+ ## Contributing
37
+
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.
39
+
40
+ ## Development
41
+
42
+ To set up your environment to develop this theme, run `bundle install`.
43
+
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.
45
+
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 `2038.gemspec` accordingly.
48
+
49
+ ## License
50
+
51
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
52
+
data/_config.yml ADDED
@@ -0,0 +1,40 @@
1
+ title: Your Awesome Site
2
+ author:
3
+ name: 物灵
4
+ email: mat-ling@139.com
5
+ description:
6
+ lang: cmn-Hans
7
+
8
+ # Show excerpts in timelines and lists.
9
+ # show_excerpts: true
10
+
11
+ theme-2038:
12
+ wordmark: /assets/wordmark.svg
13
+ from-year: 2038
14
+ footer-desc: default-slogan
15
+ # license: Some license
16
+ social:
17
+ # github: 0xis-cn
18
+ # instagram: mat__ling
19
+ # telegram: cn_0xis
20
+ drawer-links:
21
+ # -
22
+ # name: category
23
+ # url: /category
24
+ # -
25
+ # name: tag
26
+ # url: /tag
27
+ footer-links:
28
+ # -
29
+ # name: { cmn-Hans: 中文名, default: English name }
30
+ # url: https://www.example.com
31
+ # -
32
+ # name: One name for all languages
33
+ # url: https://www.example.org
34
+
35
+ highlighter: rouge
36
+ markdown: kramdown
37
+ kramdown:
38
+ input: GFM
39
+ syntax_highlighter: rouge
40
+
@@ -0,0 +1,28 @@
1
+ cmn-Hans:
2
+ main-page: 首页
3
+ toc: 目录
4
+ license: 除非另有声明,以上内容以LICENSE协议提供。
5
+ copyright: 版权所有 ©
6
+ date-format: '%Y 年 %m 月 %e 日'
7
+ time-format: '%Y 年 %m 月 %e 日 %H:%M:%S'
8
+ published-at: 创建于 TIME
9
+ post-length: LENGTH 千字
10
+ tag: 标签
11
+ category: 类别
12
+ rss-subscribe: RSS 订阅
13
+ default-slogan: 冲动与你同在。
14
+
15
+ en:
16
+ main-page: Main page
17
+ toc: Table of Content
18
+ license: The content is available under LICENSE license unless otherwise specified.
19
+ copyright: Copyright ©
20
+ date-format: '%b %e, %Y'
21
+ time-format: '%b %e, %Y %H:%M:%S'
22
+ published-at: Created in TIME
23
+ post-length: LENGTHk characters
24
+ tag: Tags
25
+ category: Categories
26
+ rss-subscribe: RSS Subscription
27
+ default-slogan: May the Impulse be with you.
28
+
@@ -0,0 +1,2 @@
1
+ <!-- Write your own head here -->
2
+
@@ -0,0 +1,26 @@
1
+ {%- assign lang = page.lang | default: site.lang | default: 'cmn-Hans' -%}
2
+ {%- assign info-array = site.data.theme-2038-i18n | map: lang -%}
3
+ {%- assign info = info-array[0] -%}
4
+ {%- assign t2038 = site.theme-2038 -%}
5
+
6
+ <details class="ml-drawer">
7
+ <summary class="ml-menu-button">≡</summary>
8
+ <div class="ml-drawer-inside">
9
+ <ul class="ml-bookmark">
10
+ <li>
11
+ <a href="{{ '/' | relative_url }}">
12
+ {{ info.main-page }}
13
+ </a>
14
+ </li>
15
+ {%- include link-item.html links=t2038.drawer-links -%}
16
+ </ul>
17
+ {%- unless page.no-toc -%}
18
+ <details open>
19
+ <summary>{{ info.toc }}</summary>
20
+ {% include toc.html html=content class='ml-toc'
21
+ submenu_class='ml-toc-sub' item_class='ml-toc-%level%' %}
22
+ </details>
23
+ {%- endunless -%}
24
+ </div>
25
+ </details>
26
+
@@ -0,0 +1,36 @@
1
+ {%- assign lang = page.lang | default: site.lang | default: 'cmn-Hans' -%}
2
+ {%- assign info-array = site.data.theme-2038-i18n | map: lang -%}
3
+ {%- assign info = info-array[0] -%}
4
+ {%- assign t2038 = site.theme-2038 -%}
5
+
6
+ <footer class="ml-footer">
7
+ <aside class="ml-footer-main">
8
+ {%- include social.html -%}
9
+ {%- if t2038.wordmark -%}
10
+ <img alt="{{ site.title }}" class="ml-wordmark" src="{{ t2038.wordmark }}" />
11
+ {%- endif -%}
12
+ <div class="ml-footer-divider"></div>
13
+ <ul class="ml-ul-dot-line">
14
+ {%- include link-item.html links=t2038.footer-links -%}
15
+ </ul>
16
+ <div class="ml-clear"></div>
17
+ {%- if t2038.footer-desc -%}
18
+ <p class="ml-footer-desc">{%- include pick-language.html text=t2038.footer-desc -%}</p>
19
+ {%- endif -%}
20
+ {%- if t2038.from-year -%}
21
+ <p class="ml-smaller">
22
+ {%- assign now-year = 'now' | date: '%Y' -%}
23
+ {{ info.copyright }}
24
+ {% if t2038.from-year != now-year -%}{{ t2038.from-year }}—{%- endif -%}{{ now-year }}
25
+ {% include pick-language.html text=site.author.name %}
26
+ </p>
27
+ {%- endif -%}
28
+ {%- if t2038.license -%}
29
+ <p class="ml-smaller">
30
+ {%- capture lname -%}{%- include pick-language.html text=t2038.license -%}{%- endcapture -%}
31
+ {{ info.license | replace: 'LICENSE', lname }}
32
+ </p>
33
+ {%- endif -%}
34
+ </aside>
35
+ </footer>
36
+
@@ -0,0 +1,15 @@
1
+ <head>
2
+ <meta charset="UTF-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
4
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ayaka14732/syyon-vencie@6b08e67/charissil/CharisSIL.css" />
5
+ <title>
6
+ {%- if page.title -%}
7
+ {{ page.title }} | {{ site.title }}
8
+ {%- else -%}
9
+ {{ site.title }}
10
+ {%- endif -%}
11
+ </title>
12
+ <link rel="stylesheet" href="{{ '/assets/main.css' | relative_path }}" />
13
+ {%- include custom-head.html -%}
14
+ </head>
15
+
@@ -0,0 +1,8 @@
1
+ {%- for item in include.links -%}
2
+ <li>
3
+ <a href="{{ item.url }}">
4
+ {%- include pick-language.html text=item.name -%}
5
+ </a>
6
+ </li>
7
+ {%- endfor -%}
8
+
@@ -0,0 +1,19 @@
1
+ <ul class="ml-page-list">
2
+ {%- assign title = include.title | default: 'NUM' -%}
3
+ {% for i in (include.from .. include.to) %}
4
+ <li>
5
+ {% if i == include.current %}
6
+ <span class="ml-placeholder">{{ i }}</span>
7
+ {%- elsif include.first-url and i == 1 -%}
8
+ <a href="{{ include.first-url }}" title="{{ include.first-title | default: '1' }}">
9
+ {{ i }}
10
+ </a>
11
+ {% else %}
12
+ <a href="{{ include.url }}" title="{{ title | replace: 'NUM', i }}">
13
+ {{ i }}
14
+ </a>
15
+ {% endif %}
16
+ </li>
17
+ {% endfor %}
18
+ </ul>
19
+
@@ -0,0 +1,6 @@
1
+ {%- assign lang = page.lang | default: site.lang | default: 'cmn-Hans' -%}
2
+ {%- assign info = site.data.theme-2038-i18n | map: lang | first -%}
3
+ {%- assign speech = include.text -%}
4
+ {%- assign preset = info | map: speech | first -%}
5
+ {{- speech | map: lang | first | default: preset | default: speech.default | default: speech -}}
6
+
@@ -0,0 +1,17 @@
1
+ {%- assign posts = include.posts | reverse -%}
2
+ <ul class="ml-block-list">
3
+ {%- for cur in posts -%}
4
+ {%- if cur.hidden != true -%}
5
+ <li>
6
+ <a href="{{ cur.url | relative_url }}" class="ml-block-anchor">
7
+ <h2>{{ cur.title }}</h2>
8
+ {%- if site.show_excerpts -%}
9
+ {{ cur.excerpt }}
10
+ {%- endif -%}
11
+ 测试文字
12
+ </a>
13
+ </li>
14
+ {%- endif -%}
15
+ {%- endfor -%}
16
+ </ul>
17
+
@@ -0,0 +1,21 @@
1
+ {%- assign social = site.theme-2038.social -%}
2
+
3
+ <ul class="ml-social-list">
4
+ {%- for glb in social.gitlab -%}{%- if glb.username and glb.instance -%}<li><a rel="me" href="https://{{ glb.instance | cgi_escape | escape}}/{{glb.username}}" title="{{ glb.username | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#gitlab' | relative_url }}"></use></svg></a></li>{%- endif -%}{%- endfor -%}
5
+ {%- if social.dribbble -%}<li><a rel="me" href="https://dribbble.com/{{ social.dribbble | cgi_escape | escape }}" title="{{ social.dribbble | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#dribbble' | relative_url }}"></use></svg></a></li>{%- endif -%}
6
+ {%- if social.facebook -%}<li><a rel="me" href="https://www.facebook.com/{{ social.facebook | cgi_escape | escape }}" title="{{ social.facebook | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#facebook' | relative_url }}"></use></svg></a></li>{%- endif -%}
7
+ {%- if social.flickr -%}<li><a rel="me" href="https://www.flickr.com/photos/{{ social.flickr | cgi_escape | escape }}" title="{{ social.flickr | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#flickr' | relative_url }}"></use></svg></a></li>{%- endif -%}
8
+ {%- if social.github -%}<li><a rel="me" href="https://github.com/{{ social.github | cgi_escape | escape }}" title="{{ social.github | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#github' | relative_url }}"></use></svg></a></li>{%- endif -%}
9
+ {%- if social.stackoverflow -%}<li><a rel="me" href="https://stackoverflow.com/users/{{ social.stackoverflow | cgi_escape | escape }}" title="{{ social.stackoverflow | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#stackoverflow' | relative_url }}"></use></svg></a></li>{%- endif -%}
10
+ {%- if social.instagram -%}<li><a rel="me" href="https://www.instagram.com/{{ social.instagram | cgi_escape | escape }}" title="{{ social.instagram | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#instagram' | relative_url }}"></use></svg></a></li>{%- endif -%}
11
+ {%- if social.linkedin -%}<li><a rel="me" href="https://www.linkedin.com/in/{{ social.linkedin | cgi_escape | escape }}" title="{{ social.linkedin | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#linkedin' | relative_url }}"></use></svg></a></li>{%- endif -%}
12
+ {%- if social.pinterest -%}<li><a rel="me" href="https://www.pinterest.com/{{ social.pinterest | cgi_escape | escape }}" title="{{ social.pinterest | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#pinterest' | relative_url }}"></use></svg></a></li>{%- endif -%}
13
+ {%- for mst in social.mastodon -%}{%- if mst.username and mst.instance -%}<li><a rel="me" href="https://{{ mst.instance | cgi_escape | escape}}/@{{mst.username}}" title="{{ mst.username | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#mastodon' | relative_url }}"></use></svg></a></li>{%- endif -%}{%- endfor -%}
14
+ {%- if social.twitter -%}<li><a rel="me" href="https://twitter.com/{{ social.twitter | cgi_escape | escape }}" title="{{ social.twitter | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#twitter' | relative_url }}"></use></svg></a></li>{%- endif -%}
15
+ {%- if social.youtube -%}<li><a rel="me" href="https://www.youtube.com/{{ social.youtube | cgi_escape | escape }}" title="{{ social.youtube | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#youtube' | relative_url }}"></use></svg></a></li>{%- endif -%}
16
+ {%- if social.youtube_channel -%}<li><a rel="me" href="https://www.youtube.com/channel/{{ social.youtube_channel | cgi_escape | escape }}" title="{{ social.youtube_channel_name | escape | default: 'YouTube' }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#youtube' | relative_url }}"></use></svg></a></li>{%- endif -%}
17
+ {%- if social.telegram -%}<li><a rel="me" href="https://t.me/{{ social.telegram | cgi_escape | escape }}" title="{{ social.telegram | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#telegram' | relative_url }}"></use></svg></a></li>{%- endif -%}
18
+ {%- if social.keybase -%}<li><a rel="me" href="https://keybase.io/{{ social.keybase | cgi_escape | escape }}" title="{{ social.keybase | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#keybase' | relative_url }}"></use></svg></a></li>{%- endif -%}
19
+ {%- if social.microdotblog -%}<li><a rel="me" href="https://micro.blog/{{ social.microdotblog | cgi_escape | escape }}" title="{{ social.microdotblog | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#microdotblog' | relative_url }}"></use></svg></a></li>{%- endif -%}
20
+ {%- if social.devto -%}<li><a href="https://dev.to/{{ social.devto | cgi_escape | escape }}" title="{{ social.devto | escape }}"><svg viewBox="0 0 16 16" class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#devto' | relative_url }}"></use></svg></a></li>{%- endif -%}
21
+ </ul>
@@ -0,0 +1,38 @@
1
+ {%- assign last = 'first' -%}
2
+ {%- assign posts = include.posts | reverse -%}
3
+ {%- for cur in posts -%}
4
+ {%- assign trigger = cur.date | date: include.first -%}
5
+ {%- if trigger == include.range and cur.hidden != true -%}
6
+ {%- assign now = cur.date | date: include.second -%}
7
+ {%- if now != last -%}
8
+ {%- if last == 'first' -%}
9
+ <dl class="ml-card-list">
10
+ {%- else -%}
11
+ </ul>
12
+ </dd>
13
+ {%- endif -%}
14
+ {%- assign last = now -%}
15
+ <dt>{{ last }}</dt>
16
+ <dd>
17
+ <ul>
18
+ {%- endif -%}
19
+ <li>
20
+ <a href="{{ cur.url | relative_url }}" class="ml-card-anchor">
21
+ {%- if cur.image -%}
22
+ <img src="{{ cur.image | relative_url }}" />
23
+ {%- endif -%}
24
+ <div class="ml-card-text">
25
+ <h2>{{ cur.title }}</h2>
26
+ {%- if site.show_excerpts -%}
27
+ {{ cur.excerpt }}
28
+ {%- endif -%}
29
+ </div>
30
+ </a>
31
+ </li>
32
+ {%- endif -%}
33
+ {%- endfor -%}
34
+ </ul>
35
+ </dd>
36
+ </dl>
37
+
38
+
@@ -0,0 +1,182 @@
1
+ {% capture tocWorkspace %}
2
+ {% comment %}
3
+ Copyright (c) 2017 Vladimir "allejo" Jimenez
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the "Software"), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
25
+ {% endcomment %}
26
+ {% comment %}
27
+ Version 1.1.0
28
+ https://github.com/allejo/jekyll-toc
29
+
30
+ "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
31
+
32
+ Usage:
33
+ {% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
34
+
35
+ Parameters:
36
+ * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
37
+
38
+ Optional Parameters:
39
+ * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
40
+ * class (string) : '' - a CSS class assigned to the TOC
41
+ * id (string) : '' - an ID to assigned to the TOC
42
+ * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
43
+ * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
44
+ * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
45
+ * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
46
+ * submenu_class (string) : '' - add custom class(es) for each child group of headings; has support for '%level%' placeholder which is the current "submenu" heading level
47
+ * base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
48
+ * anchor_class (string) : '' - add custom class(es) for each anchor element
49
+ * skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
50
+
51
+ Output:
52
+ An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
53
+ generate the table of contents and will NOT output the markdown given to it
54
+ {% endcomment %}
55
+
56
+ {% capture newline %}
57
+ {% endcapture %}
58
+ {% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->
59
+
60
+ {% capture deprecation_warnings %}{% endcapture %}
61
+
62
+ {% if include.baseurl %}
63
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead -->{{ newline }}{% endcapture %}
64
+ {% endif %}
65
+
66
+ {% if include.skipNoIDs %}
67
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead -->{{ newline }}{% endcapture %}
68
+ {% endif %}
69
+
70
+ {% capture jekyll_toc %}{% endcapture %}
71
+ {% assign orderedList = include.ordered | default: false %}
72
+ {% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
73
+ {% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
74
+ {% assign minHeader = include.h_min | default: 1 %}
75
+ {% assign maxHeader = include.h_max | default: 6 %}
76
+ {% assign nodes = include.html | strip | split: '<h' %}
77
+
78
+ {% assign firstHeader = true %}
79
+ {% assign currLevel = 0 %}
80
+ {% assign lastLevel = 0 %}
81
+
82
+ {% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
83
+
84
+ {% for node in nodes %}
85
+ {% if node == "" %}
86
+ {% continue %}
87
+ {% endif %}
88
+
89
+ {% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
90
+
91
+ {% if currLevel < minHeader or currLevel > maxHeader %}
92
+ {% continue %}
93
+ {% endif %}
94
+
95
+ {% assign _workspace = node | split: '</h' %}
96
+
97
+ {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
98
+ {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
99
+ {% assign htmlID = _idWorkspace[0] %}
100
+
101
+ {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
102
+ {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
103
+ {% assign htmlClass = _classWorkspace[0] %}
104
+
105
+ {% if htmlClass contains "no_toc" %}
106
+ {% continue %}
107
+ {% endif %}
108
+
109
+ {% if firstHeader %}
110
+ {% assign minHeader = currLevel %}
111
+ {% endif %}
112
+
113
+ {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
114
+ {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
115
+
116
+ {% if include.item_class and include.item_class != blank %}
117
+ {% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
118
+ {% endif %}
119
+
120
+ {% if include.submenu_class and include.submenu_class != blank %}
121
+ {% assign subMenuLevel = currLevel | minus: 1 %}
122
+ {% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
123
+ {% endif %}
124
+
125
+ {% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
126
+
127
+ {% if htmlID %}
128
+ {% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
129
+
130
+ {% if include.anchor_class %}
131
+ {% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
132
+ {% endif %}
133
+
134
+ {% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
135
+ {% elsif skipNoIDs == true %}
136
+ {% continue %}
137
+ {% else %}
138
+ {% capture listItem %}{{ anchorBody }}{% endcapture %}
139
+ {% endif %}
140
+
141
+ {% if currLevel > lastLevel %}
142
+ {% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
143
+ {% elsif currLevel < lastLevel %}
144
+ {% assign repeatCount = lastLevel | minus: currLevel %}
145
+
146
+ {% for i in (1..repeatCount) %}
147
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
148
+ {% endfor %}
149
+
150
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
151
+ {% else %}
152
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
153
+ {% endif %}
154
+
155
+ {% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
156
+
157
+ {% assign lastLevel = currLevel %}
158
+ {% assign firstHeader = false %}
159
+ {% endfor %}
160
+
161
+ {% assign repeatCount = minHeader | minus: 1 %}
162
+ {% assign repeatCount = lastLevel | minus: repeatCount %}
163
+ {% for i in (1..repeatCount) %}
164
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
165
+ {% endfor %}
166
+
167
+ {% if jekyll_toc != '' %}
168
+ {% assign rootAttributes = '' %}
169
+ {% if include.class and include.class != blank %}
170
+ {% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
171
+ {% endif %}
172
+
173
+ {% if include.id and include.id != blank %}
174
+ {% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
175
+ {% endif %}
176
+
177
+ {% if rootAttributes %}
178
+ {% assign nodes = jekyll_toc | split: '>' %}
179
+ {% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
180
+ {% endif %}
181
+ {% endif %}
182
+ {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}