forked from shy2850/node-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfolder.html
More file actions
44 lines (39 loc) · 2.41 KB
/
folder.html
File metadata and controls
44 lines (39 loc) · 2.41 KB
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
<!doctype html>
<%var $ = request.$, mime = request.util.mime;%>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><%=$.title%></title>
<link rel="stylesheet" href="<%=$.staticServer%>static/css/bootstrap.css" data-noprefix>
<link rel="stylesheet" href="<%=$.staticServer%>static/css/folder.less" data-noprefix>
<link rel="stylesheet" data-href="/agent?<%=$.staticServer%>static/css/folder.css3.less">
<script src="<%=$.staticServer%>static/js/modernizr-min.js"></script>
<script data-main="<%=$.staticServer%>static/js/folder.coffee" src="<%=$.staticServer%>static/js/require-min.js"></script>
</head>
<body>
<div class="fixed-line">
<a class="btn btn-primary" href="javascript:void(0);" id="switch-icon">切换图标</a>
<a href="http://twbs.github.io/bootstrap/css/" target="_blank" class="btn btn-default">bootstrap-API</a>
<a href="javascript:void(0);" id="send-words" data-domain="<%=$.staticServer%>" class="btn btn-info">留个言</a>
<a href="javascript:void(0)" class="btn btn-default" id="ajaxUpload">上传文件</a>
<iframe src="/upload?iframe=true&uploadUrl=<%=$.title%>" frameborder="0" id="ajaxFrame"></iframe>
<div id="clock" data-clock="<%=$.staticServer%>static/img/clock.gif"></div>
</div>
<ul id="list-container">
<% var all_ico={"/":1,"3gp":1,"7z":1,"apk":1,"asp":1,"aspx":1,"avi":1,"bat":1,"bmp":1,"c":1,"chm":1,"css":1,"db":1,"dll":1,"doc":1,"docx":1,"dwf":1,"exe":1,"fla":1,"flv":1,"folder":1,"gif":1,"h":1,"htm":1,"html":1,"img":1,"ini":1,"iso":1,"java":1,"jpeg":1,"jpg":1,"js":1,"jsp":1,"lnk":1,"log":1,"mdb":1,"mov":1,"mp3":1,"mp4":1,"mpg":1,"note":1,"notesort":1,"pdf":1,"php":1,"png":1,"pps":1,"ppt":1,"pptx":1,"psd":1,"qt":1,"quicktime":1,"rar":1,"reg":1,"rm":1,"rmvb":1,"rtf":1,"shtml":1,"swf":1,"tb":1,"tif":1,"torrent":1,"txt":1,"unknown":1,"vbs":1,"video":1,"vsd":1,"wav":1,"wma":1,"wmv":1,"xls":1,"xlsx":1,"xml":1,"xsl":1,"zip":1};
for(var i=0; i<$.fileList.length; i++){
var t = $.fileList[i], temp = t.name.split("."), type = temp.length>1?temp.pop():"folder", onclick="";
type = type=="/" ? "folder" : type;
if( type == "psd" ){ onclick = "location.href = '/psd?' + decodeURI(this.href); return false;"; }
%>
<li>
<a href="<%=t.href%>" onclick="<%=onclick%>" class="<% if( mime.isTXT(type) ){%>txt<%}%>"><img src="<%=$.staticServer%>static/img/fileicon/<%=all_ico[type] ? type : 'unknown'%>.png" alt="<%=type%>.png">
<%=t.name%>
</a>
</li>
<%
}
%>
</ul>
</body>
</html>