Folders view tidy up, fix path with spaces, update url added to qmining

This commit is contained in:
MrFry 2019-10-24 15:05:08 +02:00
parent d5cf846433
commit 90de7e926b
5 changed files with 160 additions and 135 deletions

View file

@ -5,6 +5,7 @@
<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;
@ -12,7 +13,10 @@
}
td {
vertical-align: top
vertical-align: top;
word-wrap: break-word;
word-break: break-all;
table-layout: fixed;
}
textarea {
@ -53,11 +57,6 @@
font-size: 13px;
}
.active,
.butt:hover {
background-color: #555;
}
</style>
</head>
<center>
@ -72,13 +71,16 @@
<% for (var i = 0; i < folders.length; i++) { %>
<tr>
<td>
<button class="butt">
<button
class="butt"
onclick='itemClick("<%= "http://stuff.frylabs.net" + folders[i].path %>")'
style='<%= i % 2 === 0 ? "background-color: #2f2f37" : "" %>'
onmouseenter='mouseEnter(this, <%= i %>)'
onmouseleave='mouseLeave(this, <%= i %>)'
>
<table class="subtable">
<td style='width:30%;'>
<a href="<%= "http://stuff.frylabs.net" + folders[i].path%>"> <%=folders[i].name %> </a>
</td>
<td style='width:30%;'>
<%=folders[i].path %>
<%=folders[i].name %>
</td>
<td style='width:20%;'>
<%=folders[i].mtime %>
@ -93,4 +95,20 @@
<% } %>
</table>
</body>
<script>
console.log('hi')
function itemClick (e) {
location.href = e
}
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>