mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Small website redesign
This commit is contained in:
parent
4370a1717c
commit
774ff64b36
2 changed files with 19 additions and 11 deletions
15
server.js
15
server.js
|
@ -34,7 +34,7 @@ var bodyParser = require('body-parser');
|
||||||
const recivedFiles = "public/recivedfiles";
|
const recivedFiles = "public/recivedfiles";
|
||||||
const motdFile = "public/motd";
|
const motdFile = "public/motd";
|
||||||
const staticFile = "public/data/static";
|
const staticFile = "public/data/static";
|
||||||
const dataFile = "public/data/data";
|
const dataFile = "public/data.json";
|
||||||
const countFile = "public/data/count";
|
const countFile = "public/data/count";
|
||||||
const manFile = "public/man.html";
|
const manFile = "public/man.html";
|
||||||
const simpOutFile = "public/simplified";
|
const simpOutFile = "public/simplified";
|
||||||
|
@ -114,6 +114,19 @@ app.get('/static', function(req, res) {
|
||||||
res.end();
|
res.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get('/legacy', function(req, res) {
|
||||||
|
var f = utils.ReadFile(dataFile);
|
||||||
|
var r = '<html><body bgcolor="#212127"><head><meta charset="UTF-8">';
|
||||||
|
r += '<style>body { font: normal 14px Verdana; color: #999999;}</style>';
|
||||||
|
var d = actions.LoadJSON(f).toString().split("\n");
|
||||||
|
for (var i = 0; i < d.length; i++)
|
||||||
|
r += d[i] + "</br>";
|
||||||
|
r += '</head></body></html>';
|
||||||
|
|
||||||
|
res.write(r);
|
||||||
|
res.end();
|
||||||
|
});
|
||||||
|
|
||||||
app.post('/postfeedback', function(req, res) {
|
app.post('/postfeedback', function(req, res) {
|
||||||
res.redirect('back');
|
res.redirect('back');
|
||||||
newMessages += "\n" + req.body.message_field;
|
newMessages += "\n" + req.body.message_field;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<body bgcolor="#212127">
|
<body bgcolor="#212127">
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
|
<meta charset="UTF-8">
|
||||||
<style>
|
<style>
|
||||||
body { font: normal 14px Verdana; color: #999999;}
|
body { font: normal 14px Verdana; color: #999999;}
|
||||||
td {vertical-align: top }
|
td {vertical-align: top }
|
||||||
|
@ -24,18 +25,12 @@ greasyforkon</a>
|
||||||
<a href="http://questionmining.tk/servergit">Szerver repó</a>
|
<a href="http://questionmining.tk/servergit">Szerver repó</a>
|
||||||
|
|
|
|
||||||
<a href="http://questionmining.tk/scriptgit">Userscript repó</a>
|
<a href="http://questionmining.tk/scriptgit">Userscript repó</a>
|
||||||
|
|
|
||||||
|
<a href="http://questionmining.tk/data.json">Összes kérdés (JSON)</a>
|
||||||
|
|
|
||||||
|
<a href="http://questionmining.tk/legacy">Összes kérdés (Régi formátum)</a>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<table style="table-layout:fixed;width:100%">
|
|
||||||
<td >
|
|
||||||
<a href="http://questionmining.tk/static">Összes kérdés</a>
|
|
||||||
</br>
|
|
||||||
<textarea readonly ><%= sdata %></textarea>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table style="table-layout:fixed;width:100%">
|
<table style="table-layout:fixed;width:100%">
|
||||||
<td>
|
<td>
|
||||||
<form action="/postfeedback", method="post">
|
<form action="/postfeedback", method="post">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue