-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathindex.html
78 lines (72 loc) · 3.22 KB
/
index.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
---
layout: default
title: Snippets
---
<ul style="position:absolute;left:-9999px;">
{% for item in site.pages %}<li><a href="#!{{ item.url }}">{{ item.title }}</a></li>
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
<span href="{{site.new_path}}" class="add-snippet" target="_blank">+<b>添加 Snippet</b></span>
<div class="search-mask"><i class="icon search-close" title="关闭"></i></div>
<div class="codeTypes" id="codeTypes"></div>
<div class="codePreview" id="codePreview">
<div class="search">
<span class="search-info"></span>
<input type="text" placeholder="按 Enter 展示结果" id="q" name="q" autocomplete="false" />
</div>
<div class="typeList" id="typeList"></div>
<div class="codebox" id="codebox" data-baseurl="{{site.edit_path}}">
<i class="icon close" id="close" title="关闭预览"></i>
<a class="icon pen" title="编辑代码" href="#" target="_blank"></a>
<a href="javascript:var d=document;var b=d.body;if(b&&!document.xmlVersion){if(!d.getElementById('bsBox')){void(y=document.createElement('script'));void(y.src='http://static.bshare.cn/b/bookmark.js#lang=zh');void(b.appendChild(y));}else{bShare.show();}}" class="icon share" title="分享网页"></a>
<div class="code" id="code">
<i class="icon close" id="close"></i>
<div class="codectt" id="codectt"></div>
</div>
</div>
</div>
<!--<div class="commitCode" id="commitCode">
<iframe style="display:none;" id="ifr" name="ifr"></iframe>
<form method="post" target="ifr" id="commitForm" class="commitForm"
action="http://snippet-be.coding.io/post" enctype="multipart/form-data">
<p>
<span>
<label for="f_title">标题: </label>
<input type="text" name="title" if="f_title" placeholder="Snippet的标题(必填)" required />
</span>
<span class="fselect">
<label for="f_type">类型: </label>
<select name="type" id="f_type" required>
<option value="">--选择类型--</option>
</select>
<input type="text" name="type" id="f_type_other" value="" placeholder="其他类型" />
</span>
</p>
<p>
<span>
<label for="f_author">作者: </label>
<input type="text" name="author" id="f_author" placeholder="您的大名(必填)" required />
</span>
<span>
<label for="f_email">邮箱: </label>
<input type="text" name="email" id="f_email" placeholder="您的邮箱(必填)" required />
</span>
</p>
<textarea name="content" id="f_content" required placeholder='使用 markdown 编写,代码要放到 "``` code ```" 中!'>
使用 markdown 编写,代码要这样放:
```
code
```
提交审核通过之后就会展示在这里啦!
P.S:如果点击提交木有反应,应该是后端程序挂了,您可以点击右上角的 fork 按钮,fork 代码之后提 PR。
</textarea>
<input type="submit" value="提交" id="f_submit" /><b class="info">info</b>
</form>
</div>
-->
<script>
var snippets = [
{% for item in site.pages %}{% assign type = item.dir | split: "/" %} {% if type != '/' %}{ type: "{{ type[2] }}", title: "{{ item.title }}", url: "{{ item.url }}" },{% endif %}
{% endfor %}{}].slice(0, -1);
</script>