scateu.me-jekyll-theme 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f87313a51088ca53d22821f3b96f5e16d4f001be
4
- data.tar.gz: 8b9c443e46ce0d7aecd8ead628e9bce6e7a9004f
3
+ metadata.gz: 3f66dcd1ff8ae82b55fa1605e934f4f123603afb
4
+ data.tar.gz: 0ebadd97fdd8fa2598d5931bd792f8bb217ea0d9
5
5
  SHA512:
6
- metadata.gz: c4ce2afed0addb2ebbaeb7adc8731c6d37cce2cd1daf964135206e5cd3dbbccc5bdd778bc3bdb83ad0a4910fab7d274e2848b8d4a0173f0de6a7d85b040b0cc3
7
- data.tar.gz: a2bd4c6a37f2cd28c9c7e748d3d8791bf9dc89d3720c50ab4df071ccabbcddedb625083edfc1836d511522df5e4e88d9d79eb7d4505c5f22b276c5ca14cfa035
6
+ metadata.gz: bcab3294b2d775e82ed1cbdd870ec3418c2f730de261c6ed119b2b82fd06bebc7bd99f0055efb12c04e796eccf47608145e12f73fd45628f02e9fb70c51024a6
7
+ data.tar.gz: c342613ab875c04c54a80e0a1e806bd904d810a5e7604bd6511e2b0376217d9e3900e449d2782559700386ffca705f5b179b7a657b487ef2e9827552c4565e4e
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 scateu
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,122 @@
1
+ ## My extra customization
2
+
3
+
4
+ ### MathJax
5
+
6
+ ```yaml
7
+ ---
8
+ title: "Some Title"
9
+ mathjax: true
10
+ ---
11
+ ```
12
+
13
+ eg:
14
+
15
+ ```
16
+ $$ c = m^e \mod n $$
17
+ ```
18
+
19
+ ```
20
+ $$
21
+ m^{ed} \equiv qq^{-1}m + pp^{-1}m \\
22
+ = (1 - k_1p)m + (1 - k_2q)m \\
23
+ = 2m - (k_1p+k_2q)m = m \mod pq
24
+ $$
25
+ ```
26
+
27
+ ### Ruby Notation
28
+
29
+ ```yaml
30
+ ---
31
+ title: "Some Title"
32
+ ruby_notation: true
33
+ ---
34
+ ```
35
+
36
+ which converts
37
+
38
+ ```
39
+ [someword]{释义}
40
+ ```
41
+
42
+ to:
43
+
44
+ ```
45
+ <ruby><rb><a href="http://www.thefreedictionary.com/someword"> someword </a> </rb><rp>(</rp><rt>释义</rt><rp>)</rp></ruby>
46
+ ```
47
+
48
+ <ruby><rb><a href="http://www.thefreedictionary.com/someword"> someword </a> </rb><rp>(</rp><rt>释义</rt><rp>)</rp></ruby>
49
+
50
+ ### Collapsible Table of Contents
51
+
52
+ Currently, can't exist as a switch of YAML frontmatter. (TODO)
53
+
54
+ ```html
55
+ <details markdown="1"><summary>目录</summary>
56
+ * TOC
57
+ {:toc}
58
+ </details>
59
+ ```
60
+
61
+ ### Collapsible Block
62
+
63
+ <details markdown="1"><summary>详细点此展开</summary>
64
+ ```python
65
+ import sys
66
+ print "hello"
67
+ ```
68
+ </details>
69
+
70
+ <details markdown="1"><summary>详细点此展开</summary>
71
+ ```python
72
+ import sys
73
+ print "hello"
74
+ ```
75
+ </details>
76
+
77
+
78
+ ### diagram
79
+
80
+ ```yaml
81
+ ---
82
+ title: "Some Title"
83
+ diagram: true
84
+ ---
85
+ ```
86
+
87
+ sequence语法见: <https://bramp.github.io/js-sequence-diagrams/>
88
+
89
+ ```sequence
90
+ participant Device
91
+ participant Browser
92
+ participant Server
93
+ Browser->Server: username and password
94
+ Note over Server: verify password
95
+ Note over Server: generate challenge
96
+ Server->Browser: challenge
97
+ Browser->Device: challenge
98
+ Note over Device: user touches button
99
+ Device-->Browser: response
100
+ Browser->Server: response
101
+ Note over Server: verify response
102
+ ```
103
+
104
+ flowchart语法见: <http://flowchart.js.org/>
105
+
106
+ ```flowchart
107
+ st=>start: Start:>http://www.google.com[blank]
108
+ e=>end:>http://www.google.com
109
+ op1=>operation: My Operation
110
+ sub1=>subroutine: My Subroutine
111
+ cond=>condition: Yes
112
+ or No?:>http://www.google.com
113
+ io=>inputoutput: catch something...
114
+
115
+ st->op1->cond
116
+ cond(yes)->io->e
117
+ cond(no)->sub1(right)->op1
118
+ ```
119
+
120
+ ### fix-punctuation.sh
121
+
122
+ 用`sed`把中文全角符号转换成`, ` `. ` `; ` `! ` `"` 这样的半角符号. (张贤科老师的教材中多用`. `号)
@@ -0,0 +1,97 @@
1
+ <script src="/js/jquery-3.1.1.min.js"></script>
2
+ <script src="/js/raphael-min.js"></script>
3
+ <script src="/js/underscore-min.js"></script>
4
+ <script src="/js/sequence-diagram-min.js"></script>
5
+ <script src="/js/flowchart-latest.js"></script>
6
+
7
+
8
+ <script>
9
+ // 生成CSS Patch: .flowchart-diagram, .sequence-diagram
10
+ // 自动根据前景色和背景色选颜色
11
+ var word_color=$('p').css("color"); // 找一下颜色 TODO: 这有个BUG: 如果通篇没有一个文字的话,颜色就选不上了
12
+ $('head').append('<style> .sequence-diagram > svg { fill: ' + word_color + '; } .sequence-diagram > svg rect { stroke: ' + word_color + '; fill: none; } .sequence-diagram > svg line { stroke: ' + word_color + '; fill: none; } .sequence-diagram > svg path{ stroke: ' + word_color + '; fill: ' + word_color + '; } .sequence-diagram > svg text{ fill: ' + word_color + '; } </style>'); // 添加css
13
+ $('head').append('<style> .flowchart-diagram > svg { fill: ' + word_color + '; } .flowchart-diagram > svg rect { stroke: ' + word_color + '; fill: none; } .flowchart-diagram > svg line { stroke: ' + word_color + '; fill: none; } .flowchart-diagram > svg path{ stroke: ' + word_color + '; fill: none; } .flowchart-diagram > svg text{ fill: ' + word_color + '; } </style>'); // 添加css
14
+
15
+
16
+ // DONE: 让每一个sequence都能被处理上。
17
+ // DONE: 加一个是否动画的开关
18
+
19
+ // 在页面第一次载入的时候,监听一下事件,首次绘制
20
+ //Reveal.addEventListener('ready', function( event ) { diagramPresentSlide(); });
21
+ if ($("section.present").find(".language-sequence, .language-seq, .language-flowchart, .language-flow").length > 0) {
22
+ diagramPresentSlide();
23
+ Reveal.layout();
24
+ }
25
+
26
+ Reveal.addEventListener('slidechanged', function( event ) { // event.previousSlide, event.currentSlide, event.indexh, event.indexv
27
+ if ($(event.currentSlide).find(".language-sequence, .language-seq, .language-flowchart, .language-flow").length > 0) {
28
+ diagramPresentSlide();
29
+ Reveal.layout(); //重新Layout一下,否则生成的图有点偏下
30
+ }
31
+ });
32
+
33
+ // sequence 是有动画的版本
34
+ // seq 无动画
35
+ function diagramPresentSlide(){
36
+ initAnimatedSequenceDiagram("section.present .language-sequence");
37
+ initSequenceDiagram("section.present .language-seq");
38
+
39
+ // -----------以下为flowchart---------------
40
+ $("section.present .language-flow, section.present .language-flowchart").flowChart();
41
+ $("section.present .language-flow > svg, section.present .language-flowchart > svg ").unwrap().unwrap().wrap("<div class=\"flowchart-diagram\"></div>"); // 把外层的<pre><code>给去掉
42
+ }
43
+
44
+ function initSequenceDiagram(_selector) {
45
+ $(_selector).sequenceDiagram({theme: 'simple'});
46
+ $(_selector + " > svg").unwrap().unwrap().wrap("<div class=\"sequence-diagram\"></div>");
47
+
48
+ $(".sequence-diagram > svg > rect[fill=\"#ffffff\"]").remove(); // 不知道为啥有个大框框, js-sequence-sequence-diagram
49
+ $(".sequence-diagram > svg > rect").css('fill',$("body").css("background-color"));
50
+
51
+ //$('.sequence-diagram > svg > text').css("font-family","\"Open Sans\",sans-serif"); //设置字体
52
+ }
53
+
54
+ function initAnimatedSequenceDiagram(_selector) { // 参考自 https://gist.github.com/jzaeske/e2de8b14142818f8d8f5e74e8b6ae2b0
55
+
56
+ initSequenceDiagram(_selector);
57
+
58
+ selector="section.present .sequence-diagram";
59
+
60
+ $(selector + " svg").each(function() {
61
+ var each_svg = $(this);
62
+
63
+ var paths = each_svg.find("path[marker-end]");
64
+ // 竖着的Path--(text-path)--(rect--text)--(rect--text)--(text--path)--
65
+ paths.first().prevUntil(selector + " path", "rect, text").each(function() {
66
+ //第一条线之前的方框(可能存在)
67
+ $(this).attr('class', 'fragment');
68
+ $(this).attr('data-fragment-index', 0);
69
+
70
+ $(this).next("path").attr('class', 'fragment');
71
+ $(this).next("path").attr('data-fragment-index', 0);
72
+ });
73
+
74
+
75
+ var i = 1;
76
+ paths.first().nextAll("path, rect").each(function() {
77
+ //第一条线之后
78
+ var element = $(this);
79
+ if ( element.is("path") ) {
80
+ element.prev("text").attr('class', 'fragment');
81
+ element.prev("text").attr('data-fragment-index', i);
82
+ element.attr('class', 'fragment');
83
+ element.attr('data-fragment-index', i);
84
+ i++;
85
+ } else if ( element.is("rect") ) {
86
+ element.next("text").attr('class', 'fragment');
87
+ element.next("text").attr('data-fragment-index', i);
88
+ element.attr('class', 'fragment');
89
+ element.attr('data-fragment-index', i);
90
+ i++;
91
+ }
92
+ });
93
+ });
94
+
95
+ }
96
+
97
+ </script>
@@ -0,0 +1,20 @@
1
+ <script src="/js/raphael-min.js"></script>
2
+ <script src="/js/underscore-min.js"></script>
3
+ <script src="/js/jquery-3.1.1.min.js"></script>
4
+ <script src="/js/sequence-diagram-min.js"></script>
5
+ <script src="/js/flowchart-latest.js"></script>
6
+
7
+
8
+ <script>
9
+ $(".language-seq").sequenceDiagram({theme: 'simple'});
10
+ $(".language-seq > svg").unwrap().unwrap(); // 把外层的<pre><code>给去掉
11
+
12
+ $(".language-sequence").sequenceDiagram({theme: 'simple'});
13
+ $(".language-sequence > svg").unwrap().unwrap(); // 把外层的<pre><code>给去掉
14
+
15
+ $(".language-flow").flowChart();
16
+ $(".language-flow > svg").unwrap().unwrap(); // 把外层的<pre><code>给去掉
17
+
18
+ $(".language-flowchart").flowChart();
19
+ $(".language-flowchart > svg").unwrap().unwrap(); // 把外层的<pre><code>给去掉
20
+ </script>
@@ -0,0 +1,12 @@
1
+ <div id="disqus_thread"></div>
2
+ <script type="text/javascript">
3
+ var disqus_shortname = 'scateugithubio';
4
+
5
+ /* * * DON'T EDIT BELOW THIS LINE * * */
6
+ (function() {
7
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
8
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
9
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
10
+ })();
11
+ </script>
12
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
@@ -0,0 +1,75 @@
1
+ <footer class="site-footer">
2
+
3
+ <div class="wrapper">
4
+
5
+ <h2 class="footer-heading">{{ site.title }}</h2>
6
+
7
+ <div class="footer-col-wrapper">
8
+ <div class="footer-col footer-col-1">
9
+ <ul class="contact-list">
10
+ <li>{{ site.title }}</li>
11
+ <li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
12
+ </ul>
13
+ </div>
14
+
15
+ <div class="footer-col footer-col-2">
16
+ <ul class="social-media-list">
17
+ {% if site.github_username %}
18
+ <li>
19
+ <a href="https://github.com/{{ site.github_username }}">
20
+ <span class="icon icon--github">
21
+ <svg viewBox="0 0 16 16">
22
+ <path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
23
+ </svg>
24
+ </span>
25
+
26
+ <span class="username">{{ site.github_username }}</span>
27
+ </a>
28
+ </li>
29
+ {% endif %}
30
+
31
+ {% if site.twitter_username %}
32
+ <li>
33
+ <a href="https://twitter.com/{{ site.twitter_username }}">
34
+ <span class="icon icon--twitter">
35
+ <svg viewBox="0 0 16 16">
36
+ <path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
37
+ c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
38
+ </svg>
39
+ </span>
40
+
41
+ <span class="username">@{{ site.twitter_username }}</span>
42
+ </a>
43
+ </li>
44
+ {% endif %}
45
+
46
+ {% if site.linkedin_url%}
47
+ <li>
48
+ <a href="{{ site.linkedin_url }}">
49
+ <span class="icon icon--linkedin">
50
+ <svg viewBox="0 0 16 16">
51
+ <path fill="#828282" d="M0.119,5.093l3.224-0.04v10.556l-3.224,0.039V5.093L0.119,5.093z"></path>
52
+ <path d="M6.04,5.093l3.08-0.039v1.342l0.001,0.38c0.91-0.894,1.852-1.57,3.354-1.57c1.773,0,3.486,0.742,3.486,3.163v7.241 l-3.125,0.046v-5.532c0-1.219-0.307-2.005-1.764-2.005c-1.281,0-1.818,0.23-1.818,1.918v5.573L6.04,15.647V5.093L6.04,5.093z" fill="#828282"></path>
53
+ <path fill="#828282" d="M3.529,1.764c0,0.975-0.79,1.765-1.765,1.765C0.79,3.529,0,2.739,0,1.764S0.79,0,1.764,0C2.739,0,3.529,0.79,3.529,1.764
54
+ L3.529,1.764z"></path>
55
+
56
+ </svg>
57
+ </span>
58
+
59
+ <span class="username">LinkedIn</span>
60
+ </a>
61
+ </li>
62
+ {% endif %}
63
+ </ul>
64
+ </div>
65
+
66
+ <div class="footer-col footer-col-3">
67
+ <p class="text">{{ site.description }}</p>
68
+ <p class="rss-subscribe">Subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
69
+
70
+ </div>
71
+ </div>
72
+
73
+ </div>
74
+
75
+ </footer>
@@ -0,0 +1,11 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta name="viewport" content="width=device-width initial-scale=1" />
4
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
5
+
6
+ <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7
+ <meta name="description" content="{{ site.description }}">
8
+
9
+ <link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
10
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
11
+ </head>
@@ -0,0 +1,27 @@
1
+ <header class="site-header">
2
+
3
+ <div class="wrapper">
4
+
5
+ <a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
6
+
7
+ <nav class="site-nav">
8
+ <a href="#" class="menu-icon">
9
+ <svg viewBox="0 0 18 15">
10
+ <path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
11
+ <path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
12
+ <path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
13
+ </svg>
14
+ </a>
15
+
16
+ <div class="trigger">
17
+ {% for page in site.pages %}
18
+ {% if page.title %}
19
+ <a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
20
+ {% endif %}
21
+ {% endfor %}
22
+ </div>
23
+ </nav>
24
+
25
+ </div>
26
+
27
+ </header>
@@ -0,0 +1,18 @@
1
+ <script type="text/x-mathjax-config">
2
+ MathJax.Hub.Config({
3
+ TeX: {
4
+ equationNumbers: {
5
+ autoNumber: "AMS"
6
+ }
7
+ },
8
+ tex2jax: {
9
+ inlineMath: [ ['$','$'], ['\\(', '\\)'] ],
10
+ displayMath: [ ['$$','$$'] ],
11
+ processEscapes: true,
12
+ }
13
+ });
14
+ </script>
15
+
16
+ <!--<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> -->
17
+
18
+ <script src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@@ -0,0 +1,28 @@
1
+ <link href="https://cdn.bootcss.com/prism/1.6.0/themes/prism.min.css" rel="stylesheet">
2
+ <!--<link href="https://cdn.bootcss.com/prism/1.6.0/themes/prism-tomorrow.min.css" rel="stylesheet"> -->
3
+
4
+ <script src="https://cdn.bootcss.com/prism/1.6.0/prism.min.js"></script>
5
+
6
+ <script src="https://cdn.bootcss.com/prism/1.6.0/components/prism-bash.min.js"></script>
7
+ <script src="https://cdn.bootcss.com/prism/1.6.0/components/prism-c.min.js"></script>
8
+ <script src="https://cdn.bootcss.com/prism/1.6.0/components/prism-python.min.js"></script>
9
+ <script src="https://cdn.bootcss.com/prism/1.6.0/components/prism-makefile.min.js"></script>
10
+ <script src="https://cdn.bootcss.com/prism/1.6.0/components/prism-go.min.js"></script>
11
+
12
+ <script>
13
+
14
+ //把所有没class的 pre code标签加上一个language-default类别,以便被prism.js处理
15
+ //$('code:not([class])').addClass("language-default");
16
+
17
+ // 暂时先不用,注释掉。
18
+ /*
19
+ window.onload = function(){
20
+ var codes = document.querySelectorAll('pre > code:not([class])');
21
+
22
+ for(var i = 0; i < codes.length; ++i){
23
+ codes[i].setAttribute("class","language-default");
24
+ codes[i].parentNode.setAttribute("class","language-default");
25
+ }
26
+ };
27
+ */
28
+ </script>
@@ -0,0 +1,3 @@
1
+ <script>
2
+ document.body.innerHTML = document.body.innerHTML.replace(/\[(.+?)\]\{(.+?)\}/g, "<ruby><rb><a href=\"http://www.thefreedictionary.com/$1\"> $1 </a> </rb><rp>(</rp><rt>$2</rt><rp>)</rp></ruby>")
3
+ </script>
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ {% include head.html %}
5
+
6
+ <body>
7
+
8
+ {% include header.html %}
9
+
10
+ <div class="page-content">
11
+ <div class="wrapper">
12
+ {{ content }}
13
+ </div>
14
+ </div>
15
+
16
+ {% include footer.html %}
17
+
18
+ </body>
19
+
20
+ </html>
@@ -0,0 +1,16 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div class="post">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title">{{ page.title }}</h1>
8
+ </header>
9
+
10
+ <article class="post-content">
11
+ {{ content }}
12
+ </article>
13
+
14
+ {% include disqus.html %}
15
+
16
+ </div>
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% include prism.html %}
5
+
6
+ <div class="post">
7
+
8
+ <header class="post-header">
9
+ <h1 class="post-title">{{ page.title }}</h1>
10
+ <p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
11
+ </header>
12
+
13
+ <article class="post-content">
14
+ {% if page.mathjax %} {% include mathjax.html %} {% endif %}
15
+ {{ content }}
16
+ </article>
17
+
18
+ {% if page.diagram %} {% include diagram.html %} {% endif %}
19
+
20
+ {% include disqus.html %}
21
+ {% if page.ruby_notation %} {% include ruby_notation.html %} {% endif %}
22
+
23
+ </div>
@@ -0,0 +1,142 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+
6
+ <title>
7
+ {% if page.title %}
8
+ {{ page.title }} | {{ site.title }}
9
+ {% else %}
10
+ {{ site.title }}
11
+ {% endif %}
12
+ </title>
13
+
14
+ <meta name="author" content="{{ site.author }}" />
15
+
16
+ <!-- Description -->
17
+ {% if page.description %}
18
+ <meta name="description" content="{{ page.description }}" />
19
+ {% else %}
20
+ <meta name="description" content="{{ site.description }}">
21
+ {% endif %}
22
+
23
+ <meta name="apple-mobile-web-app-capable" content="yes" />
24
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
25
+
26
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
27
+
28
+ <link rel="stylesheet" href="{{ "/js/reveal.js/css/reveal.css" | prepend: site.baseurl }}"/>
29
+ {%if page.theme %}
30
+ <link rel="stylesheet" href="{{ "/js/reveal.js/css/theme/" | prepend: site.baseurl | append: page.theme | append: '.css' }}" id="theme"/>
31
+ {% else %}
32
+ <link rel="stylesheet" href="{{ "/js/reveal.js/css/theme/black.css" | prepend: site.baseurl }}" id="theme"/>
33
+ {% endif %}
34
+
35
+ <!-- Code syntax highlighting -->
36
+ <link rel="stylesheet" href="{{ "/js/reveal.js/lib/css/zenburn.css" | prepend: site.baseurl }}"/>
37
+
38
+
39
+ <!-- Printing and PDF exports -->
40
+ <script>
41
+ var link = document.createElement( 'link' );
42
+ link.rel = 'stylesheet';
43
+ link.type = 'text/css';
44
+ link.href = window.location.search.match( /print-pdf/gi ) ? '{{ "/js/reveal.js/css/print/pdf.css" | prepend: site.baseurl }}' : '{{ "/js/reveal.js/css/print/paper.css" | prepend: site.baseurl }}';
45
+ document.getElementsByTagName( 'head' )[0].appendChild( link );
46
+ </script>
47
+
48
+ <link rel="apple-touch-icon" href="{{ "/apple-touch-icon.png" | prepend: site.baseurl }}" />
49
+
50
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
51
+
52
+ <!--[if lt IE 9]>
53
+ <script src="lib/js/html5shiv.js"></script>
54
+ <![endif]-->
55
+ </head>
56
+
57
+ <body>
58
+
59
+
60
+ <div class="reveal">
61
+ <div class="slides">
62
+ {{ content }}
63
+ <!--scateu-->
64
+ {% if page.ruby_notation %} {% include ruby_notation.html %} {% endif %}
65
+ </div>
66
+ </div>
67
+
68
+
69
+ <script src="{{ "/js/reveal.js/lib/js/head.min.js" | prepend: site.baseurl }}"></script>
70
+ <script src="{{ "/js/reveal.js/js/reveal.js" | prepend: site.baseurl }}"></script>
71
+ <script>
72
+ function findGetParameter(parameterName) {
73
+ var result = null,
74
+ tmp = [];
75
+ var items = location.search.substr(1).split("&");
76
+ for (var index = 0; index < items.length; index++) {
77
+ tmp = items[index].split("=");
78
+ if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
79
+ }
80
+ return result;
81
+ }
82
+ </script>
83
+ <script>
84
+ // Full list of configuration options available at:
85
+ // https://github.com/hakimel/reveal.js#configuration
86
+ Reveal.initialize({
87
+ {% if page.mathjax %}
88
+ math: {
89
+ mathjax: 'https://cdn.bootcss.com/mathjax/2.7.0/MathJax.js',
90
+ config: 'TeX-AMS-MML_HTMLorMML' // See http://docs.mathjax.org/en/latest/config-files.html
91
+ },
92
+ {% endif %}
93
+ {% if page.multiplex %}
94
+ multiplex: {
95
+ secret: findGetParameter("multiplex_secret"), // http://example.com/index.html?multiplex_secret=1234567876332352262
96
+ id: '{{ page.multiplex.id }}', // Obtained from socket.io server
97
+ url: '{{ page.multiplex.url }}' // Location of socket.io server
98
+ },
99
+ {% endif %}
100
+ controls: true,
101
+ progress: true,
102
+ history: true,
103
+ center: true,
104
+ {%if page.transition %}
105
+ transition: '{{page.transition}}',
106
+ {% else %}
107
+ transition: 'slide', // none/fade/slide/convex/concave/zoom
108
+ {% endif %}
109
+ // Optional reveal.js plugins
110
+ dependencies: [
111
+ { src: '{{ "/js/reveal.js/lib/js/classList.js" | prepend: site.baseurl }}', condition: function() { return !document.body.classList; } },
112
+ { src: '{{ "/js/reveal.js/plugin/markdown/marked.js" | prepend: site.baseurl }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
113
+ { src: '{{ "/js/reveal.js/plugin/markdown/markdown.js" | prepend: site.baseurl }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
114
+ { src: '{{ "/js/reveal.js/plugin/highlight/highlight.js" | prepend: site.baseurl }}', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
115
+ { src: '{{ "/js/reveal.js/plugin/zoom-js/zoom.js" | prepend: site.baseurl }}', async: true },
116
+ {% if page.multiplex %}
117
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
118
+ { src: '{{ "/js/reveal.js/plugin/multiplex/" | prepend: site.baseurl }}' + (findGetParameter("multiplex_secret") ? "master.js" : "client.js"), async: true },
119
+ {% endif %}
120
+ {% if page.mathjax %}
121
+ { src: '{{ "/js/reveal.js/plugin/math/math.js" | prepend: site.baseurl }}', async: true },
122
+ {% endif %}
123
+ { src: '{{ "/js/reveal.js/plugin/notes/notes.js" | prepend: site.baseurl }}', async: true }
124
+ ]
125
+ });
126
+ </script>
127
+
128
+ {% if page.diagram %} {% include diagram-slide.html %} {% endif %}
129
+
130
+ {% if page.multiplex %}
131
+ <script>
132
+ // 强制停掉multiplex
133
+ if (findGetParameter("no_multiplex")) {
134
+ for ( var i in io.managers ) {
135
+ io.managers[i].removeAllListeners();
136
+ }
137
+ }
138
+ </script>
139
+ {% endif %}
140
+
141
+ </body>
142
+ </html>