aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-01-30 23:51:25 +0100
committerache <ache@ache.one>2019-01-30 23:51:25 +0100
commit158875b0c708a51a8f47c226879f9beeee58fc4f (patch)
treee3459892af2b85832591d4afca5de0daab652fd1 /src
parentSet skel of the project (diff)
New base
Diffstat (limited to 'src')
-rw-r--r--src/app.mjs24
-rw-r--r--src/views/index.html53
2 files changed, 77 insertions, 0 deletions
diff --git a/src/app.mjs b/src/app.mjs
new file mode 100644
index 0000000..2903c58
--- /dev/null
+++ b/src/app.mjs
@@ -0,0 +1,24 @@
+'use-strict';
+
+const express = require('express');
+const mustache = require('mustache-express');
+const path = require('path');
+
+const app = express();
+
+app.engine('html', mustache());
+app.set('view engine', 'html');
+app.set('views',path.join(__dirname, 'views'));
+
+app.use(express.static('default'));
+app.use(express.static('static'));
+
+app.get('/', (req, res) => {
+ res.render('index.html', {yourdata: 'Hello from Mustache Template'});
+});
+
+const server = app.listen(8100, () => {
+ const host = server.address().address;
+ const port = server.address().port;
+ console.log(`[${new Date()}] > App listening at http://%s:%s`, host, port);
+});
diff --git a/src/views/index.html b/src/views/index.html
new file mode 100644
index 0000000..f64e470
--- /dev/null
+++ b/src/views/index.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>Synhestesis - Test</title>
+ </head>
+ <style type="text/css">
+ div.fileinputs {
+ position: relative;
+ }
+ div.fakefile {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ z-index: 1;
+ }
+ div.fakefile input[type=button] {
+ /* enough width to completely overlap the real hidden file control */
+ cursor: pointer;
+ }
+ div.fileinputs input.file {
+ position: relative;
+ text-align: right;
+ -moz-opacity:0 ;
+ filter:alpha(opacity: 0);
+ opacity: 0;
+ z-index: 2;
+ }
+ </style>
+ <body>
+ <div style="margin-top:5%;margin-left:auto;margin-right:auto;width:80%;height:100px;z-index:4;" id="onTop">
+ <span id="compteur"></span>
+ <span id="ratio"></span>
+
+ <div class="fileinputs">
+ <input type="file" class="file" id="getFile" />
+
+ <div class="fakefile">
+ <input type="button" value="Open" />
+ </div>
+ <select name="select" id="select">
+ <option value="hiragana_romaji.json">Hiragana</option>
+ <option value="katakana_romaji.json">Katakana</option>
+ <option value="capitale_EU.json">Capitales Européennes</option>
+ <option value="vocab_jap.json">Vocabulaire japonais</option>
+ </select>
+ </div>
+ </div>
+ <div id="output" style="margin-left:auto;margin-right:auto;text-align:center;">
+ </div>
+ <script type="text/javascript" src="./synhestesis.js"></script>
+ </body>
+</html>