diff --git a/public/default.css b/public/default.css
index b0ff0dc..79cb7e5 100644
--- a/public/default.css
+++ b/public/default.css
@@ -45,11 +45,13 @@ body {
position: fixed;
top: 15px;
right: 20px;
+ z-index: 2;
}
.list {
position: fixed;
top: 15px;
left: 20px;
+ z-index: 2;
}
.sub {
position: fixed;
@@ -71,11 +73,13 @@ body {
position: fixed;
top: 36px;
right: 20px;
+ z-index: 2;
}
.list-parade {
position: fixed;
top: 68px;
right: 20px;
+ z-index: 2;
}
a,
diff --git a/public/entry.js b/public/entry.js
index e613504..9f06add 100644
--- a/public/entry.js
+++ b/public/entry.js
@@ -63,9 +63,9 @@ function draw() {
//pointer
fill(0, 255, 0);
strokeWeight(0);
- circle(mouseX, mouseY, 10);
- //
+ //mouse way
+ circle(mouseX, mouseY, 10);
if (mouseIsPressed && mouseButton === LEFT) {
//find slot under the pointer
var mouseC = int(mouseX/(unit+sw));
@@ -75,6 +75,18 @@ function draw() {
img.fill(255);
img.rect(mouseC*(unit+sw), mouseR*(unit+sw), unit+sw*2, unit+sw*2);
}
+
+ //touch way
+ if (touches.length > 0) {
+ circle(touches[0].x, touches[0].y, 10);
+ //find slot under the pointer
+ var mouseC = int(touches[0].x/(unit+sw));
+ var mouseR = int(touches[0].y/(unit+sw));
+ if (mouseC < cols && mouseR < rows) p[mouseC*cols + mouseR] = 1;
+ img.strokeWeight(0);
+ img.fill(255);
+ img.rect(mouseC*(unit+sw), mouseR*(unit+sw), unit+sw*2, unit+sw*2);
+ }
}
function submitForm(event) {
diff --git a/server.js b/server.js
index 2f8af9a..4e03d7c 100644
--- a/server.js
+++ b/server.js
@@ -93,6 +93,7 @@ fastify.get("/", function (request, reply) {
//get list
let list = await fs.readdir('/media/storage/public/sound-parade/');
+ list.reverse();
// console.log(list);
@@ -115,6 +116,35 @@ fastify.get("/", function (request, reply) {
});
});
+//get '/en/list', '/en/list/'
+["/en/list", "/en/list/"].forEach(function(item) {
+ fastify.get(item, async function (request, reply) {
+
+ //get list
+ let list = await fs.readdir('/media/storage/public/sound-parade/');
+ list.reverse();
+
+ // console.log(list);
+
+ let folders = [];
+ for (const item of list) {
+ var fields = JSON.parse((await fs.readFile('/media/storage/public/sound-parade/' + item + '/fields.json')).toString('utf8'));
+ folders.push({
+ foldername: item,
+ group: fields.group,
+ title: fields.title,
+ comment: fields.comment,
+ });
+ }
+
+ // console.log(folders);
+
+ reply.view("/src/pages/list.en.html", {
+ list: folders,
+ });
+ });
+});
+
//get '/entries'
fastify.get("/entries", async function (request, reply) {
diff --git a/src/pages/entry.en.html b/src/pages/entry.en.html
index e3121c4..3b8b633 100644
--- a/src/pages/entry.en.html
+++ b/src/pages/entry.en.html
@@ -15,9 +15,9 @@
-
+
-
+
+
@@ -132,6 +137,5 @@
-