mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
130 lines
2.9 KiB
Text
Executable file
130 lines
2.9 KiB
Text
Executable file
<html>
|
|
|
|
<body bgcolor="#212127">
|
|
|
|
<head>
|
|
<title><%=dirname%></title>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.6" />
|
|
<style>
|
|
body {
|
|
font: normal 14px Verdana;
|
|
color: #999999;
|
|
}
|
|
|
|
td {
|
|
vertical-align: top;
|
|
word-wrap: break-word;
|
|
word-break: break-all;
|
|
table-layout: fixed;
|
|
padding: 0 12;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
textarea {
|
|
font: normal 14px Verdana;
|
|
color: #999999;
|
|
background-color: #212127;
|
|
width: 100%;
|
|
height: 700;
|
|
}
|
|
|
|
a {
|
|
color: #9999ff;
|
|
}
|
|
.subtable {
|
|
border-collapse: collapse;
|
|
table-layout:fixed;
|
|
width:100%
|
|
}
|
|
.maintable {
|
|
border-collapse: collapse;
|
|
table-layout:fixed;
|
|
width:100%
|
|
padding:0; margin:0;
|
|
border: none !important;
|
|
}
|
|
tr {
|
|
width:32%;
|
|
}
|
|
.butt {
|
|
background-color: #212127;
|
|
color: #999999;
|
|
cursor: pointer;
|
|
width: 100%;
|
|
border: none;
|
|
text-align: left;
|
|
outline: none;
|
|
font-size: 13px;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<center>
|
|
<h1>
|
|
<%=dirname%>
|
|
</h1>
|
|
</center>
|
|
<h2>
|
|
<a href="<%= url + prevDir%>" > Up one level </a>
|
|
</h2>
|
|
</p>
|
|
|
|
<table class="maintable">
|
|
<% for (var i = 0; i < folders.length; i++) { %>
|
|
<tr>
|
|
<td>
|
|
<a
|
|
href="<%= url + folders[i].path %>"
|
|
style="font-size: 0px"
|
|
>
|
|
<button
|
|
class="butt"
|
|
style='<%= i % 2 === 0 ? "background-color: #2f2f37" : "" %>'
|
|
onmouseenter='mouseEnter(this, <%= i %>)'
|
|
onmouseleave='mouseLeave(this, <%= i %>)'
|
|
>
|
|
<table class="subtable">
|
|
<tr height="62">
|
|
<td style='width:30%;'>
|
|
<%=folders[i].name %>
|
|
</td>
|
|
<td style='width:20%;'>
|
|
<%=folders[i].mtime %>
|
|
</td>
|
|
<td style='width:10%;'>
|
|
<%
|
|
if (folders[i].isDir) {
|
|
%> <%= "DIR" %> <%
|
|
} else {
|
|
if (folders[i].size === 0) {
|
|
%> <%= "~0 MB" %> <%
|
|
} else {
|
|
%> <%= folders[i].size + ' MB' %> <%
|
|
}
|
|
}
|
|
%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</button>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<% } %>
|
|
</table>
|
|
</body>
|
|
<script>
|
|
console.log('hi')
|
|
function mouseEnter (e, i) {
|
|
e.style.backgroundColor = "#555"
|
|
}
|
|
function mouseLeave (e, i) {
|
|
if (i % 2 == 0) {
|
|
e.style.backgroundColor = "#2f2f37"
|
|
} else {
|
|
e.style.backgroundColor = "#212127"
|
|
}
|
|
}
|
|
</script>
|
|
</html>
|