mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added logging to accesible folder, and made all questions page more readable
This commit is contained in:
parent
ccc7f31e3a
commit
59640eaddf
16 changed files with 149 additions and 15 deletions
107
views/alldata.ejs
Normal file
107
views/alldata.ejs
Normal file
|
@ -0,0 +1,107 @@
|
|||
|
||||
<html>
|
||||
<body bgcolor="#212127">
|
||||
<head>
|
||||
<title>All questions</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
font: normal 14px Verdana;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
td {
|
||||
font: normal 16px Verdana;
|
||||
}
|
||||
|
||||
td {
|
||||
font: normal 16px Verdana;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
textarea {
|
||||
font: normal 14px Verdana;
|
||||
color: #999999;
|
||||
background-color: #212127;
|
||||
width: 100%;
|
||||
height: 700
|
||||
}
|
||||
|
||||
a {
|
||||
color: #9999ff;
|
||||
}
|
||||
|
||||
.collapsible {
|
||||
background-color: #212127;
|
||||
color: #999999;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
border: none;
|
||||
text-align: left;
|
||||
outline: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.active, .collapsible:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 18px;
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
background-color: #212127;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<center><h2>
|
||||
Ennek az oldalnak a tartalma dinamikusan frissül minden beküldött kérdés után
|
||||
</h2></center>
|
||||
|
||||
<% for (var i = 0; i < data.Subjects.length; i++) { %>
|
||||
<button class="collapsible">
|
||||
<h2>
|
||||
<table>
|
||||
<td>
|
||||
<%=data.Subjects[i].Name %>
|
||||
</td>
|
||||
<td style="vertical-align:middle;text-align:right">
|
||||
<%=data.Subjects[i].length %>
|
||||
</td>
|
||||
</table>
|
||||
</h2>
|
||||
</button>
|
||||
<div class="content">
|
||||
<% var a = data.Subjects[i].toString().split('\n')%>
|
||||
<% for (var j = 1; j < a.length; j++) { %>
|
||||
<% if (a[j][0] == '?') { %>
|
||||
</br>
|
||||
<% } %>
|
||||
<%=a[j] %>
|
||||
</br>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
|
||||
<script>
|
||||
var coll = document.getElementsByClassName("collapsible");
|
||||
var i;
|
||||
|
||||
for (i = 0; i < coll.length; i++) {
|
||||
coll[i].addEventListener("click", function() {
|
||||
this.classList.toggle("active");
|
||||
var content = this.nextElementSibling;
|
||||
if (content.style.display === "block") {
|
||||
content.style.display = "none";
|
||||
} else {
|
||||
content.style.display = "block";
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue