This commit is contained in:
MrFry 2019-10-26 10:21:30 +02:00
commit 19246d6931
14 changed files with 425 additions and 239 deletions

View file

@ -5,6 +5,7 @@
<head>
<title>FryLabs.net</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
<style>
body {
font: normal 14px Verdana;

View file

@ -5,6 +5,7 @@
<head>
<title>All questions</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
<style>
body {
font: normal 14px Verdana;
@ -79,7 +80,12 @@
<% include aludni.ejs %>
<% for (var i = 0; i < data.Subjects.length; i++) { %>
<button class="collapsible">
<button
class="collapsible"
style='<%= i % 2 === 0 ? "background-color: #2f2f37" : "" %>'
onmouseenter='mouseEnter(this, <%= i %>)'
onmouseleave='mouseLeave(this, <%= i %>)'
>
<h2>
<table id=<%=i%>>
<td>
@ -90,41 +96,51 @@
</td>
</table>
</h2>
</button>
</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>
<% } %>
<% 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;
<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";
}
});
}
function openall () {
var coll = document.getElementsByClassName("content");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].style.display = "block";
}
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>
});
}
function openall () {
var coll = document.getElementsByClassName("content");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].style.display = "block";
}
}
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>
<% include b.ejs %>
</body>
</html>

View file

@ -5,6 +5,7 @@
<head>
<title>All questions</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
<style>
body {
font: normal 14px Verdana;

View file

@ -5,6 +5,7 @@
<head>
<title>Question mining</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
<style>
body {
font: normal 14px Verdana;

View file

@ -5,6 +5,8 @@
<head>
<title>Moodle/Elearning/KMOOC manual</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
<style>
body {
font: normal 17px Verdana;
@ -196,12 +198,11 @@
</li>
</ul>
<hr> Jogosultságok:
</br>GM_openInTab: help megnyitása új lapon, GM_xmlhttpRequest: online adatbázishoz.
GM_getResourceText: a txt beolvasáshoz. Mást nem bír beolvasni, csak amit megadsz a @resouces
tagnál. GM_info: a scriptről információ, a verzióváltozás érzékeléséhez. GM_getValue/
GM_setValue: oldal bezárásakor megmaradó változók kezelése. Előző verzió tárolására, ugyanúgy
verzióváltozás érzékeléséhez, néhány beállítás, illetve hogy melyik tárgyakból keressen
kérdéseket. Ezek függvények, és a sciptben néhol meg vannak hívva, keresd meg.
</br>GM_openInTab: help megnyitása új lapon, GM_xmlhttpRequest: online adatbázishoz. GM_info: a
scriptről információ, a verzióváltozás érzékeléséhez. GM_getValue/ GM_setValue: oldal
bezárásakor megmaradó változók kezelése. Előző verzió tárolására, ugyanúgy verzióváltozás
érzékeléséhez, néhány beállítás, illetve hogy melyik tárgyakból keressen kérdéseket. Ezek
függvények, és a sciptben néhol meg vannak hívva, keresd meg.
</p> Elküldött adatok online módban: Minden teszt végén az összes kérdés, és rá a moodle szerint
helyesnek vélt válaszok. Fogadott adatok: az összes eddig ismert moodle kérdés
<hr>

View file

@ -3,6 +3,8 @@
<body bgcolor="#212127">
<head>
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
<meta charset="UTF-8">
<style>
body {
font: normal 14px Verdana;

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,12 @@
}
td {
vertical-align: top
vertical-align: top;
word-wrap: break-word;
word-break: break-all;
table-layout: fixed;
padding: 0 12;
vertical-align: middle;
}
textarea {
@ -39,7 +45,6 @@
border: none !important;
}
tr {
line-height: 29px;
width:32%;
}
.butt {
@ -53,11 +58,6 @@
font-size: 13px;
}
.active,
.butt:hover {
background-color: #555;
}
</style>
</head>
<center>
@ -65,27 +65,32 @@
<%=dirname%>
</h1>
</center>
<a href=<%= "http://stuff.frylabs.net" + prevDir%> > Up one level </a>
<a href="<%= url + prevDir%>" > Up one level </a>
</p>
<table class="maintable">
<% 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">
<tr height="62">
<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 %>
</td>
<td style='width:10%;'>
<%=folders[i].size %> MB
<%= folders[i].size === 0 ? "Dir" : folders[i].size + 'MB' %>
</td>
</tr>
</table>
</button>
</td>
@ -93,4 +98,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>

72
views/stuff/nofile.ejs Normal file
View file

@ -0,0 +1,72 @@
<html>
<body bgcolor="#212127">
<head>
<title>No such file/folder</title>
<meta charset="UTF-8">
<style>
body {
font: normal 14px Verdana;
color: #999999;
}
td {
vertical-align: top
}
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 {
line-height: 29px;
width:32%;
}
.butt {
background-color: #212127;
color: #999999;
cursor: pointer;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 13px;
}
.active,
.butt:hover {
background-color: #555;
}
</style>
</head>
<center>
<h1>
No such file / folder:
</br>
<%= missingFile %>
</br>
<a href="<%= url %>" > Back to root </a>
</h1>
</center>
</body>
</html>