jekyll-theme-abd3lraouf 5.2.6 → 5.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +105 -105
- data/_data/assets/cross_origin.yml +62 -62
- data/_data/assets/self_host.yml +51 -51
- data/_data/authors.yml +17 -17
- data/_data/contact.yml +30 -30
- data/_data/locales/bg-BG.yml +83 -83
- data/_data/locales/en.yml +83 -83
- data/_data/locales/es-ES.yml +79 -79
- data/_data/locales/fr-FR.yml +79 -79
- data/_data/locales/hu-HU.yml +81 -81
- data/_data/locales/id-ID.yml +79 -79
- data/_data/locales/ko-KR.yml +79 -79
- data/_data/locales/my-MM.yml +79 -79
- data/_data/locales/pt-BR.yml +79 -79
- data/_data/locales/ru-RU.yml +79 -79
- data/_data/locales/tr-TR.yml +79 -79
- data/_data/locales/uk-UA.yml +79 -79
- data/_data/locales/vi-VN.yml +77 -77
- data/_data/locales/zh-CN.yml +78 -78
- data/_data/share.yml +27 -27
- data/_includes/assets-origin.html +12 -12
- data/_includes/comments/disqus.html +54 -54
- data/_includes/comments/giscus.html +56 -56
- data/_includes/comments/utterances.html +51 -51
- data/_includes/comments.html +5 -5
- data/_includes/datetime.html +21 -21
- data/_includes/favicons.html +17 -17
- data/_includes/footer.html +17 -36
- data/_includes/google-analytics.html +14 -14
- data/_includes/head.html +116 -116
- data/_includes/js-selector.html +104 -104
- data/_includes/jsdelivr-combine.html +32 -32
- data/_includes/lang.html +8 -8
- data/_includes/language-alias.html +70 -70
- data/_includes/mermaid.html +57 -57
- data/_includes/mode-toggle.html +129 -129
- data/_includes/no-linenos.html +10 -10
- data/_includes/post-nav.html +30 -30
- data/_includes/post-paginator.html +88 -88
- data/_includes/post-sharing.html +27 -27
- data/_includes/read-time.html +30 -30
- data/_includes/refactor-content.html +282 -282
- data/_includes/related-posts.html +103 -103
- data/_includes/search-loader.html +46 -46
- data/_includes/search-results.html +11 -11
- data/_includes/sidebar.html +93 -93
- data/_includes/toc.html +16 -16
- data/_includes/topbar.html +70 -70
- data/_includes/trending-tags.html +50 -50
- data/_includes/update-list.html +40 -40
- data/_layouts/archives.html +48 -48
- data/_layouts/categories.html +120 -120
- data/_layouts/category.html +24 -24
- data/_layouts/compress.html +10 -10
- data/_layouts/default.html +74 -74
- data/_layouts/home.html +103 -103
- data/_layouts/page.html +64 -64
- data/_layouts/post.html +159 -159
- data/_layouts/tag.html +23 -23
- data/_layouts/tags.html +23 -23
- data/_plugins/posts-lastmod-hook.rb +14 -14
- data/_sass/addon/commons.scss +1678 -1680
- data/_sass/addon/module.scss +151 -151
- data/_sass/addon/syntax.scss +289 -289
- data/_sass/addon/variables.scss +34 -34
- data/_sass/colors/dark-syntax.scss +88 -88
- data/_sass/colors/dark-typography.scss +157 -157
- data/_sass/colors/light-syntax.scss +84 -84
- data/_sass/colors/light-typography.scss +94 -94
- data/_sass/layout/archives.scss +147 -147
- data/_sass/layout/categories.scss +67 -67
- data/_sass/layout/category-tag.scss +73 -73
- data/_sass/layout/home.scss +184 -184
- data/_sass/layout/post.scss +369 -369
- data/_sass/layout/tags.scss +19 -19
- data/_sass/variables-hook.scss +3 -3
- data/_tabs/about.md +8 -8
- data/_tabs/archives.md +7 -7
- data/_tabs/categories.md +6 -6
- data/_tabs/tags.md +6 -6
- data/assets/404.html +16 -16
- data/assets/css/style.scss +12 -12
- data/assets/feed.xml +61 -61
- data/assets/img/favicons/browserconfig.xml +13 -13
- data/assets/img/favicons/site.webmanifest +26 -26
- data/assets/js/data/search.json +18 -18
- data/assets/js/data/swcache.js +55 -55
- data/assets/js/pwa/app.js +47 -47
- data/assets/js/pwa/sw.js +89 -89
- data/assets/js/pwa/unregister.js +12 -12
- data/assets/robots.txt +10 -10
- data/index.html +4 -4
- metadata +7 -7
data/_includes/js-selector.html
CHANGED
@@ -1,104 +1,104 @@
|
|
1
|
-
<!--
|
2
|
-
JS selector for site.
|
3
|
-
-->
|
4
|
-
|
5
|
-
<!-- layout specified -->
|
6
|
-
|
7
|
-
{% if page.layout == 'post' %}
|
8
|
-
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
9
|
-
<!-- pv-report needs countup.js -->
|
10
|
-
<script async src="{{ site.data.assets[origin].countup.js | relative_url }}"></script>
|
11
|
-
<script defer src="{{ '/assets/js/dist/pvreport.min.js' | relative_url }}"></script>
|
12
|
-
{% endif %}
|
13
|
-
{% endif %}
|
14
|
-
|
15
|
-
{% if page.layout == 'post' or page.layout == 'page' %}
|
16
|
-
<!-- image lazy-loading & popup & clipboard -->
|
17
|
-
{% assign _urls = site.data.assets[origin].magnific-popup.js
|
18
|
-
| append: ',' | append: site.data.assets[origin].lozad.js
|
19
|
-
| append: ',' | append: site.data.assets[origin].clipboard.js
|
20
|
-
%}
|
21
|
-
|
22
|
-
{% include jsdelivr-combine.html urls=_urls %}
|
23
|
-
|
24
|
-
{% endif %}
|
25
|
-
|
26
|
-
{% if page.layout == 'home'
|
27
|
-
or page.layout == 'post'
|
28
|
-
or page.layout == 'archives'
|
29
|
-
or page.layout == 'category'
|
30
|
-
or page.layout == 'tag' %}
|
31
|
-
|
32
|
-
{% if site.prefer_datetime_locale %}
|
33
|
-
{% assign locale = site.prefer_datetime_locale | downcase %}
|
34
|
-
{% else %}
|
35
|
-
{% assign locale = site.lang | split: '-' | first %}
|
36
|
-
{% endif %}
|
37
|
-
|
38
|
-
{% assign _urls = site.data.assets[origin].dayjs.js.common
|
39
|
-
| append: ',' | append: site.data.assets[origin].dayjs.js.locale
|
40
|
-
| replace: ':LOCALE', locale
|
41
|
-
| append: ',' | append: site.data.assets[origin].dayjs.js.relativeTime
|
42
|
-
| append: ',' | append: site.data.assets[origin].dayjs.js.localizedFormat
|
43
|
-
%}
|
44
|
-
|
45
|
-
{% include jsdelivr-combine.html urls=_urls %}
|
46
|
-
|
47
|
-
{% endif %}
|
48
|
-
|
49
|
-
{% if page.layout == 'home'
|
50
|
-
or page.layout == 'categories'
|
51
|
-
or page.layout == 'post'
|
52
|
-
or page.layout == 'page' %}
|
53
|
-
{% assign type = page.layout %}
|
54
|
-
{% elsif page.layout == 'archives'
|
55
|
-
or page.layout == 'category'
|
56
|
-
or page.layout == 'tag' %}
|
57
|
-
{% assign type = "misc" %}
|
58
|
-
{% else %}
|
59
|
-
{% assign type = "commons" %}
|
60
|
-
{% endif %}
|
61
|
-
|
62
|
-
{% capture script %}/assets/js/dist/{{ type }}.min.js{% endcapture %}
|
63
|
-
<script defer src="{{ script | relative_url }}"></script>
|
64
|
-
|
65
|
-
{% if page.math %}
|
66
|
-
<!-- MathJax -->
|
67
|
-
<script>
|
68
|
-
/* see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options> */
|
69
|
-
MathJax = {
|
70
|
-
tex: {
|
71
|
-
inlineMath: [ /* start/end delimiter pairs for in-line math */
|
72
|
-
['$','$'],
|
73
|
-
['\\(','\\)']
|
74
|
-
],
|
75
|
-
displayMath: [ /* start/end delimiter pairs for display math */
|
76
|
-
['$$', '$$'],
|
77
|
-
['\\[', '\\]']
|
78
|
-
]
|
79
|
-
}
|
80
|
-
};
|
81
|
-
</script>
|
82
|
-
<script src="{{ site.data.assets[origin].polyfill.js | relative_url }}"></script>
|
83
|
-
<script id="MathJax-script" async src="{{ site.data.assets[origin].mathjax.js | relative_url }}">
|
84
|
-
</script>
|
85
|
-
{% endif %}
|
86
|
-
|
87
|
-
<!-- commons -->
|
88
|
-
|
89
|
-
<script src="{{ site.data.assets[origin].bootstrap.js | relative_url }}"></script>
|
90
|
-
|
91
|
-
{% if jekyll.environment == 'production' %}
|
92
|
-
<!-- PWA -->
|
93
|
-
{% if site.pwa.enabled %}
|
94
|
-
<script defer src="{{ '/app.js' | relative_url }}"></script>
|
95
|
-
{% else %}
|
96
|
-
<script defer src="{{ '/unregister.js' | relative_url }}"></script>
|
97
|
-
{% endif %}
|
98
|
-
|
99
|
-
<!-- GA -->
|
100
|
-
{% if site.google_analytics.id != empty and site.google_analytics.id %}
|
101
|
-
{% include google-analytics.html %}
|
102
|
-
{% endif %}
|
103
|
-
|
104
|
-
{% endif %}
|
1
|
+
<!--
|
2
|
+
JS selector for site.
|
3
|
+
-->
|
4
|
+
|
5
|
+
<!-- layout specified -->
|
6
|
+
|
7
|
+
{% if page.layout == 'post' %}
|
8
|
+
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
9
|
+
<!-- pv-report needs countup.js -->
|
10
|
+
<script async src="{{ site.data.assets[origin].countup.js | relative_url }}"></script>
|
11
|
+
<script defer src="{{ '/assets/js/dist/pvreport.min.js' | relative_url }}"></script>
|
12
|
+
{% endif %}
|
13
|
+
{% endif %}
|
14
|
+
|
15
|
+
{% if page.layout == 'post' or page.layout == 'page' %}
|
16
|
+
<!-- image lazy-loading & popup & clipboard -->
|
17
|
+
{% assign _urls = site.data.assets[origin].magnific-popup.js
|
18
|
+
| append: ',' | append: site.data.assets[origin].lozad.js
|
19
|
+
| append: ',' | append: site.data.assets[origin].clipboard.js
|
20
|
+
%}
|
21
|
+
|
22
|
+
{% include jsdelivr-combine.html urls=_urls %}
|
23
|
+
|
24
|
+
{% endif %}
|
25
|
+
|
26
|
+
{% if page.layout == 'home'
|
27
|
+
or page.layout == 'post'
|
28
|
+
or page.layout == 'archives'
|
29
|
+
or page.layout == 'category'
|
30
|
+
or page.layout == 'tag' %}
|
31
|
+
|
32
|
+
{% if site.prefer_datetime_locale %}
|
33
|
+
{% assign locale = site.prefer_datetime_locale | downcase %}
|
34
|
+
{% else %}
|
35
|
+
{% assign locale = site.lang | split: '-' | first %}
|
36
|
+
{% endif %}
|
37
|
+
|
38
|
+
{% assign _urls = site.data.assets[origin].dayjs.js.common
|
39
|
+
| append: ',' | append: site.data.assets[origin].dayjs.js.locale
|
40
|
+
| replace: ':LOCALE', locale
|
41
|
+
| append: ',' | append: site.data.assets[origin].dayjs.js.relativeTime
|
42
|
+
| append: ',' | append: site.data.assets[origin].dayjs.js.localizedFormat
|
43
|
+
%}
|
44
|
+
|
45
|
+
{% include jsdelivr-combine.html urls=_urls %}
|
46
|
+
|
47
|
+
{% endif %}
|
48
|
+
|
49
|
+
{% if page.layout == 'home'
|
50
|
+
or page.layout == 'categories'
|
51
|
+
or page.layout == 'post'
|
52
|
+
or page.layout == 'page' %}
|
53
|
+
{% assign type = page.layout %}
|
54
|
+
{% elsif page.layout == 'archives'
|
55
|
+
or page.layout == 'category'
|
56
|
+
or page.layout == 'tag' %}
|
57
|
+
{% assign type = "misc" %}
|
58
|
+
{% else %}
|
59
|
+
{% assign type = "commons" %}
|
60
|
+
{% endif %}
|
61
|
+
|
62
|
+
{% capture script %}/assets/js/dist/{{ type }}.min.js{% endcapture %}
|
63
|
+
<script defer src="{{ script | relative_url }}"></script>
|
64
|
+
|
65
|
+
{% if page.math %}
|
66
|
+
<!-- MathJax -->
|
67
|
+
<script>
|
68
|
+
/* see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options> */
|
69
|
+
MathJax = {
|
70
|
+
tex: {
|
71
|
+
inlineMath: [ /* start/end delimiter pairs for in-line math */
|
72
|
+
['$','$'],
|
73
|
+
['\\(','\\)']
|
74
|
+
],
|
75
|
+
displayMath: [ /* start/end delimiter pairs for display math */
|
76
|
+
['$$', '$$'],
|
77
|
+
['\\[', '\\]']
|
78
|
+
]
|
79
|
+
}
|
80
|
+
};
|
81
|
+
</script>
|
82
|
+
<script src="{{ site.data.assets[origin].polyfill.js | relative_url }}"></script>
|
83
|
+
<script id="MathJax-script" async src="{{ site.data.assets[origin].mathjax.js | relative_url }}">
|
84
|
+
</script>
|
85
|
+
{% endif %}
|
86
|
+
|
87
|
+
<!-- commons -->
|
88
|
+
|
89
|
+
<script src="{{ site.data.assets[origin].bootstrap.js | relative_url }}"></script>
|
90
|
+
|
91
|
+
{% if jekyll.environment == 'production' %}
|
92
|
+
<!-- PWA -->
|
93
|
+
{% if site.pwa.enabled %}
|
94
|
+
<script defer src="{{ '/app.js' | relative_url }}"></script>
|
95
|
+
{% else %}
|
96
|
+
<script defer src="{{ '/unregister.js' | relative_url }}"></script>
|
97
|
+
{% endif %}
|
98
|
+
|
99
|
+
<!-- GA -->
|
100
|
+
{% if site.google_analytics.id != empty and site.google_analytics.id %}
|
101
|
+
{% include google-analytics.html %}
|
102
|
+
{% endif %}
|
103
|
+
|
104
|
+
{% endif %}
|
@@ -1,32 +1,32 @@
|
|
1
|
-
{% assign urls = include.urls | split: ',' %}
|
2
|
-
|
3
|
-
{% assign combined_urls = nil %}
|
4
|
-
|
5
|
-
{% assign domain = 'https://cdn.jsdelivr.net/' %}
|
6
|
-
|
7
|
-
{% for url in urls %}
|
8
|
-
|
9
|
-
{% if url contains domain %}
|
10
|
-
{% assign url_snippet = url | slice: domain.size, url.size %}
|
11
|
-
|
12
|
-
{% if combined_urls %}
|
13
|
-
{% assign combined_urls = combined_urls | append: ',' | append: url_snippet %}
|
14
|
-
{% else %}
|
15
|
-
{% assign combined_urls = domain | append: 'combine/' | append: url_snippet %}
|
16
|
-
{% endif %}
|
17
|
-
|
18
|
-
{% elsif url contains '//' %}
|
19
|
-
|
20
|
-
<script src="{{ url }}"></script>
|
21
|
-
|
22
|
-
{% else %}
|
23
|
-
|
24
|
-
<script src="{{ url | relative_url }}"></script>
|
25
|
-
|
26
|
-
{% endif %}
|
27
|
-
|
28
|
-
{% endfor %}
|
29
|
-
|
30
|
-
{% if combined_urls %}
|
31
|
-
<script src="{{ combined_urls }}"></script>
|
32
|
-
{% endif %}
|
1
|
+
{% assign urls = include.urls | split: ',' %}
|
2
|
+
|
3
|
+
{% assign combined_urls = nil %}
|
4
|
+
|
5
|
+
{% assign domain = 'https://cdn.jsdelivr.net/' %}
|
6
|
+
|
7
|
+
{% for url in urls %}
|
8
|
+
|
9
|
+
{% if url contains domain %}
|
10
|
+
{% assign url_snippet = url | slice: domain.size, url.size %}
|
11
|
+
|
12
|
+
{% if combined_urls %}
|
13
|
+
{% assign combined_urls = combined_urls | append: ',' | append: url_snippet %}
|
14
|
+
{% else %}
|
15
|
+
{% assign combined_urls = domain | append: 'combine/' | append: url_snippet %}
|
16
|
+
{% endif %}
|
17
|
+
|
18
|
+
{% elsif url contains '//' %}
|
19
|
+
|
20
|
+
<script src="{{ url }}"></script>
|
21
|
+
|
22
|
+
{% else %}
|
23
|
+
|
24
|
+
<script src="{{ url | relative_url }}"></script>
|
25
|
+
|
26
|
+
{% endif %}
|
27
|
+
|
28
|
+
{% endfor %}
|
29
|
+
|
30
|
+
{% if combined_urls %}
|
31
|
+
<script src="{{ combined_urls }}"></script>
|
32
|
+
{% endif %}
|
data/_includes/lang.html
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
{% comment %}
|
2
|
-
Detect appearance language and return it through variable "lang"
|
3
|
-
{% endcomment %}
|
4
|
-
{% if site.data.locales[site.lang] %}
|
5
|
-
{% assign lang = site.lang %}
|
6
|
-
{% else %}
|
7
|
-
{% assign lang = 'en' %}
|
8
|
-
{% endif %}
|
1
|
+
{% comment %}
|
2
|
+
Detect appearance language and return it through variable "lang"
|
3
|
+
{% endcomment %}
|
4
|
+
{% if site.data.locales[site.lang] %}
|
5
|
+
{% assign lang = site.lang %}
|
6
|
+
{% else %}
|
7
|
+
{% assign lang = 'en' %}
|
8
|
+
{% endif %}
|
@@ -1,70 +1,70 @@
|
|
1
|
-
{% comment %}
|
2
|
-
|
3
|
-
Convert the alias of the syntax language to the official name
|
4
|
-
|
5
|
-
See: <https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers>
|
6
|
-
|
7
|
-
{% endcomment %}
|
8
|
-
|
9
|
-
{% assign _lang = include.language | default: '' %}
|
10
|
-
|
11
|
-
{% case _lang %}
|
12
|
-
{% when 'actionscript', 'as', 'as3' %}
|
13
|
-
{{ 'ActionScript' }}
|
14
|
-
{% when 'applescript' %}
|
15
|
-
{{ 'AppleScript' }}
|
16
|
-
{% when 'brightscript', 'bs', 'brs' %}
|
17
|
-
{{ 'BrightScript' }}
|
18
|
-
{% when 'cfscript', 'cfc' %}
|
19
|
-
{{ 'CFScript' }}
|
20
|
-
{% when 'coffeescript', 'coffee', 'coffee-script' %}
|
21
|
-
{{ 'CoffeeScript' }}
|
22
|
-
{% when 'cs', 'csharp' %}
|
23
|
-
{{ 'C#' }}
|
24
|
-
{% when 'erl' %}
|
25
|
-
{{ 'Erlang' }}
|
26
|
-
{% when 'graphql' %}
|
27
|
-
{{ 'GraphQL' }}
|
28
|
-
{% when 'haskell', 'hs' %}
|
29
|
-
{{ 'Haskell' }}
|
30
|
-
{% when 'javascript', 'js' %}
|
31
|
-
{{ 'JavaScript' }}
|
32
|
-
{% when 'make', 'mf', 'gnumake', 'bsdmake' %}
|
33
|
-
{{ 'Makefile' }}
|
34
|
-
{% when 'md', 'mkd' %}
|
35
|
-
{{ 'Markdown' }}
|
36
|
-
{% when 'm' %}
|
37
|
-
{{ 'Matlab' }}
|
38
|
-
{% when 'objective_c', 'objc', 'obj-c', 'obj_c', 'objectivec' %}
|
39
|
-
{{ 'Objective-C' }}
|
40
|
-
{% when 'perl', 'pl' %}
|
41
|
-
{{ 'Perl' }}
|
42
|
-
{% when 'php','php3','php4','php5' %}
|
43
|
-
{{ 'PHP' }}
|
44
|
-
{% when 'py' %}
|
45
|
-
{{ 'Python' }}
|
46
|
-
{% when 'rb' %}
|
47
|
-
{{ 'Ruby' }}
|
48
|
-
{% when 'rs','no_run','ignore','should_panic' %}
|
49
|
-
{{ 'Rust' }}
|
50
|
-
{% when 'bash', 'zsh', 'ksh', 'sh' %}
|
51
|
-
{{ 'Shell' }}
|
52
|
-
{% when 'st', 'squeak' %}
|
53
|
-
{{ 'Smalltalk' }}
|
54
|
-
{% when 'tex'%}
|
55
|
-
{{ 'TeX' }}
|
56
|
-
{% when 'latex' %}
|
57
|
-
{{ 'LaTex' }}
|
58
|
-
{% when 'ts', 'typescript' %}
|
59
|
-
{{ 'TypeScript' }}
|
60
|
-
{% when 'vb', 'visualbasic' %}
|
61
|
-
{{ 'Visual Basic' }}
|
62
|
-
{% when 'vue', 'vuejs' %}
|
63
|
-
{{ 'Vue.js' }}
|
64
|
-
{% when 'yml' %}
|
65
|
-
{{ 'YAML' }}
|
66
|
-
{% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml', 'json' %}
|
67
|
-
{{ _lang | upcase }}
|
68
|
-
{% else %}
|
69
|
-
{{ _lang | capitalize }}
|
70
|
-
{% endcase %}
|
1
|
+
{% comment %}
|
2
|
+
|
3
|
+
Convert the alias of the syntax language to the official name
|
4
|
+
|
5
|
+
See: <https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers>
|
6
|
+
|
7
|
+
{% endcomment %}
|
8
|
+
|
9
|
+
{% assign _lang = include.language | default: '' %}
|
10
|
+
|
11
|
+
{% case _lang %}
|
12
|
+
{% when 'actionscript', 'as', 'as3' %}
|
13
|
+
{{ 'ActionScript' }}
|
14
|
+
{% when 'applescript' %}
|
15
|
+
{{ 'AppleScript' }}
|
16
|
+
{% when 'brightscript', 'bs', 'brs' %}
|
17
|
+
{{ 'BrightScript' }}
|
18
|
+
{% when 'cfscript', 'cfc' %}
|
19
|
+
{{ 'CFScript' }}
|
20
|
+
{% when 'coffeescript', 'coffee', 'coffee-script' %}
|
21
|
+
{{ 'CoffeeScript' }}
|
22
|
+
{% when 'cs', 'csharp' %}
|
23
|
+
{{ 'C#' }}
|
24
|
+
{% when 'erl' %}
|
25
|
+
{{ 'Erlang' }}
|
26
|
+
{% when 'graphql' %}
|
27
|
+
{{ 'GraphQL' }}
|
28
|
+
{% when 'haskell', 'hs' %}
|
29
|
+
{{ 'Haskell' }}
|
30
|
+
{% when 'javascript', 'js' %}
|
31
|
+
{{ 'JavaScript' }}
|
32
|
+
{% when 'make', 'mf', 'gnumake', 'bsdmake' %}
|
33
|
+
{{ 'Makefile' }}
|
34
|
+
{% when 'md', 'mkd' %}
|
35
|
+
{{ 'Markdown' }}
|
36
|
+
{% when 'm' %}
|
37
|
+
{{ 'Matlab' }}
|
38
|
+
{% when 'objective_c', 'objc', 'obj-c', 'obj_c', 'objectivec' %}
|
39
|
+
{{ 'Objective-C' }}
|
40
|
+
{% when 'perl', 'pl' %}
|
41
|
+
{{ 'Perl' }}
|
42
|
+
{% when 'php','php3','php4','php5' %}
|
43
|
+
{{ 'PHP' }}
|
44
|
+
{% when 'py' %}
|
45
|
+
{{ 'Python' }}
|
46
|
+
{% when 'rb' %}
|
47
|
+
{{ 'Ruby' }}
|
48
|
+
{% when 'rs','no_run','ignore','should_panic' %}
|
49
|
+
{{ 'Rust' }}
|
50
|
+
{% when 'bash', 'zsh', 'ksh', 'sh' %}
|
51
|
+
{{ 'Shell' }}
|
52
|
+
{% when 'st', 'squeak' %}
|
53
|
+
{{ 'Smalltalk' }}
|
54
|
+
{% when 'tex'%}
|
55
|
+
{{ 'TeX' }}
|
56
|
+
{% when 'latex' %}
|
57
|
+
{{ 'LaTex' }}
|
58
|
+
{% when 'ts', 'typescript' %}
|
59
|
+
{{ 'TypeScript' }}
|
60
|
+
{% when 'vb', 'visualbasic' %}
|
61
|
+
{{ 'Visual Basic' }}
|
62
|
+
{% when 'vue', 'vuejs' %}
|
63
|
+
{{ 'Vue.js' }}
|
64
|
+
{% when 'yml' %}
|
65
|
+
{{ 'YAML' }}
|
66
|
+
{% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml', 'json' %}
|
67
|
+
{{ _lang | upcase }}
|
68
|
+
{% else %}
|
69
|
+
{{ _lang | capitalize }}
|
70
|
+
{% endcase %}
|
data/_includes/mermaid.html
CHANGED
@@ -1,57 +1,57 @@
|
|
1
|
-
<!--
|
2
|
-
mermaid-js loader
|
3
|
-
-->
|
4
|
-
|
5
|
-
<script src="{{ site.data.assets[origin].mermaid.js | relative_url }}"></script>
|
6
|
-
|
7
|
-
<script>
|
8
|
-
$(function() {
|
9
|
-
function updateMermaid(event) {
|
10
|
-
if (event.source === window && event.data &&
|
11
|
-
event.data.direction === ModeToggle.ID) {
|
12
|
-
|
13
|
-
const mode = event.data.message;
|
14
|
-
|
15
|
-
if (typeof mermaid === "undefined") {
|
16
|
-
return;
|
17
|
-
}
|
18
|
-
|
19
|
-
let expectedTheme = (mode === ModeToggle.DARK_MODE? "dark" : "default");
|
20
|
-
let config = { theme: expectedTheme };
|
21
|
-
|
22
|
-
/* Re-render the SVG › <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
|
23
|
-
$(".mermaid").each(function() {
|
24
|
-
let svgCode = $(this).prev().children().html();
|
25
|
-
$(this).removeAttr("data-processed");
|
26
|
-
$(this).html(svgCode);
|
27
|
-
});
|
28
|
-
|
29
|
-
mermaid.initialize(config);
|
30
|
-
mermaid.init(undefined, ".mermaid");
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
let initTheme = "default";
|
35
|
-
|
36
|
-
if ($("html[data-mode=dark]").length > 0
|
37
|
-
|| ($("html[data-mode]").length == 0
|
38
|
-
&& window.matchMedia("(prefers-color-scheme: dark)").matches ) ) {
|
39
|
-
initTheme = "dark";
|
40
|
-
}
|
41
|
-
|
42
|
-
let mermaidConf = {
|
43
|
-
theme: initTheme /* <default|dark|forest|neutral> */
|
44
|
-
};
|
45
|
-
|
46
|
-
/* Markdown converts to HTML */
|
47
|
-
$("pre").has("code.language-mermaid").each(function() {
|
48
|
-
let svgCode = $(this).children().html();
|
49
|
-
$(this).addClass("unloaded");
|
50
|
-
$(this).after(`<div class=\"mermaid\">${svgCode}</div>`);
|
51
|
-
});
|
52
|
-
|
53
|
-
mermaid.initialize(mermaidConf);
|
54
|
-
|
55
|
-
window.addEventListener("message", updateMermaid);
|
56
|
-
});
|
57
|
-
</script>
|
1
|
+
<!--
|
2
|
+
mermaid-js loader
|
3
|
+
-->
|
4
|
+
|
5
|
+
<script src="{{ site.data.assets[origin].mermaid.js | relative_url }}"></script>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
$(function() {
|
9
|
+
function updateMermaid(event) {
|
10
|
+
if (event.source === window && event.data &&
|
11
|
+
event.data.direction === ModeToggle.ID) {
|
12
|
+
|
13
|
+
const mode = event.data.message;
|
14
|
+
|
15
|
+
if (typeof mermaid === "undefined") {
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
|
19
|
+
let expectedTheme = (mode === ModeToggle.DARK_MODE? "dark" : "default");
|
20
|
+
let config = { theme: expectedTheme };
|
21
|
+
|
22
|
+
/* Re-render the SVG › <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
|
23
|
+
$(".mermaid").each(function() {
|
24
|
+
let svgCode = $(this).prev().children().html();
|
25
|
+
$(this).removeAttr("data-processed");
|
26
|
+
$(this).html(svgCode);
|
27
|
+
});
|
28
|
+
|
29
|
+
mermaid.initialize(config);
|
30
|
+
mermaid.init(undefined, ".mermaid");
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
let initTheme = "default";
|
35
|
+
|
36
|
+
if ($("html[data-mode=dark]").length > 0
|
37
|
+
|| ($("html[data-mode]").length == 0
|
38
|
+
&& window.matchMedia("(prefers-color-scheme: dark)").matches ) ) {
|
39
|
+
initTheme = "dark";
|
40
|
+
}
|
41
|
+
|
42
|
+
let mermaidConf = {
|
43
|
+
theme: initTheme /* <default|dark|forest|neutral> */
|
44
|
+
};
|
45
|
+
|
46
|
+
/* Markdown converts to HTML */
|
47
|
+
$("pre").has("code.language-mermaid").each(function() {
|
48
|
+
let svgCode = $(this).children().html();
|
49
|
+
$(this).addClass("unloaded");
|
50
|
+
$(this).after(`<div class=\"mermaid\">${svgCode}</div>`);
|
51
|
+
});
|
52
|
+
|
53
|
+
mermaid.initialize(mermaidConf);
|
54
|
+
|
55
|
+
window.addEventListener("message", updateMermaid);
|
56
|
+
});
|
57
|
+
</script>
|