forked from isnowfy/isnowfy.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello.html
135 lines (121 loc) · 5.67 KB
/
hello.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="Keywords" content="blog"/>
<meta name="Description" content="blog"/>
<title>Simple</title>
<link rel="shortcut icon" href="/static/favicon.png"/>
<link rel="stylesheet" type="text/css" href="/main.css" />
</head>
<body>
<div class="main">
<div class="header">
<ul id="pages">
<li><a href="/">home</a></li>
<li><a href="/#/tags">tags</a></li>
<li><a href="/#/archive">archive</a></li>
</ul>
</div>
<div class="wrap-header">
<h1>
<a href="/" id="title"></a>
</h1>
</div>
<div id="md" style="display: none;">
<!-- markdown -->
##Hello
This is a `test`.
`$` and `$$` and \$
You can write with Latex math symbol like $x^2=1$
You need write the markdown, [here](https://daringfireball.net/projects/markdown/) is the markdown syntax document.
And you can also write code here.
~~~~{python}
print 'Hello World!'
~~~~
Enjoy it!
<!-- markdown end -->
</div>
<div class="entry" id="main">
<!-- content -->
<h2 id="hello">Hello</h2>
<p>This is a <code>test</code>.</p>
<p><code>$</code> and <code>$$</code> and <span>$</span></p>
<p>You can write with Latex math symbol like <span class="MathJax_Preview" style="color: inherit;"></span><span class="MathJax" id="MathJax-Element-2-Frame"><nobr><span class="math" id="MathJax-Span-7" role="math" style="width: 3.652em; display: inline-block;"><span style="display: inline-block; position: relative; width: 2.902em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.702em 1000.002em 2.853em -999.998em); top: -2.698em; left: 0.003em;"><span class="mrow" id="MathJax-Span-8"><span class="msubsup" id="MathJax-Span-9"><span style="display: inline-block; position: relative; width: 1.002em; height: 0px;"><span style="position: absolute; clip: rect(3.402em 1000.002em 4.152em -999.998em); top: -3.998em; left: 0.003em;"><span class="mi" id="MathJax-Span-10" style="font-family: MathJax_Math-italic;">x</span><span style="display: inline-block; width: 0px; height: 4.002em;"></span></span><span style="position: absolute; top: -4.348em; left: 0.552em;"><span class="mn" id="MathJax-Span-11" style="font-size: 70.7%; font-family: MathJax_Main;">2</span><span style="display: inline-block; width: 0px; height: 4.002em;"></span></span></span></span><span class="mo" id="MathJax-Span-12" style="font-family: MathJax_Main; padding-left: 0.302em;">=</span><span class="mn" id="MathJax-Span-13" style="font-family: MathJax_Main; padding-left: 0.302em;">1</span></span><span style="display: inline-block; width: 0px; height: 2.702em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.191em; vertical-align: -0.059em;"></span></span></nobr></span><script type="math/tex" id="MathJax-Element-2">x^2=1</script></p>
<p>You need write the markdown, <a href="https://daringfireball.net/projects/markdown/">here</a> is the markdown syntax document.</p>
<p>And you can also write code here.</p>
<pre class=" language-python"><code class=" language-python"><span class="token keyword">print</span> <span class="token string">'Hello World!'</span>
</code></pre>
<p>Enjoy it!</p>
<!-- content end -->
</div>
<br>
<br>
<div id="disqus_thread"></div>
<div class="footer">
<p>© Copyright 2014 by isnowfy, Designed by isnowfy</p>
</div>
</div>
<script src="main.js"></script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ["\\(", "\\)"]], processEscapes: true}});
</script>
<script id="content" type="text/mustache">
<h1>{{title}}</h1>
<div class="tag">
{{date}}
{{#tags}}
<a href="/#/tag/{{name}}">#{{name}}</a>
{{/tags}}
</div>
</script>
<script id="pagesTemplate" type="text/mustache">
{{#pages}}
<li>
<a href="{{path}}">{{title}}</a>
</li>
{{/pages}}
</script>
<script>
$(document).ready(function() {
$.ajax({
url: "main.json",
type: "GET",
dataType: "json",
success: function(data) {
$("#title").html(data.name);
var pagesTemplate = Hogan.compile($("#pagesTemplate").html());
var pagesHtml = pagesTemplate.render({"pages": data.pages});
$("#pages").append(pagesHtml);
//path
var path = "hello.html";
//path end
var now = 0;
for (var i = 0; i < data.posts.length; ++i)
if (path == data.posts[i].path)
now = i;
var post = data.posts[now];
var tmp = post.tags.split(" ");
var tags = [];
for (var i = 0; i < tmp.length; ++i)
if (tmp[i].length > 0)
tags.push({"name": tmp[i]});
var contentTemplate = Hogan.compile($("#content").html());
var contentHtml = contentTemplate.render({"title": post.title, "tags": tags, "date": post.date});
$("#main").prepend(contentHtml);
if (data.disqus_shortname.length > 0) {
var disqus_shortname = data.disqus_shortname;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
}
}
});
});
</script>
</body>
</html>