Nodification of app. #1

Merged
florian merged 3 commits from feature/ihm-improvement into master 2020-07-12 13:22:37 +02:00
3 changed files with 17 additions and 12 deletions
Showing only changes of commit 677e3bffc5 - Show all commits

View File

@@ -16,6 +16,7 @@ body {
.choice-div {
border: 1px green solid;
margin-left: auto;
}
.node-div {
@@ -25,4 +26,11 @@ body {
#content {
width: 500px;
margin: auto;
}
#history div {
width: 450px;
margin-top: 10px;
margin-bottom: 10px;
padding: 5px;
}

View File

@@ -17,9 +17,6 @@ app.get('/nodes', (request, response) => {
response.setHeader('Content-Type', 'application/json');
response.end(JSON.stringify(nodes));
});
app.get('/app-bundle.js', (request, response) => {
response.download(`${__dirname}/../../dist/app-bundle.js`);
})
app.listen(3000, () => {
console.log('Example app listening on port 3000!');

View File

@@ -1,37 +1,37 @@
[
{
"id": "node-1",
"text": "Node 1",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"choices": [
{
"id": "choice-1",
"text": "Choice 1",
"text": "Sed ut perspiciatis unde omnis.",
"nextNode": "node-2"
},
{
"id": "choice-2",
"text": "Choice 2",
"text": "Nemo enim ipsam voluptatem",
"nextNode": "node-exit"
},
{
"id": "choice-3",
"text": "Choice 3",
"text": "Ut enim ad minima veniam",
"nextNode": "node-exit"
}
]
},
{
"id": "node-2",
"text": "Node 2",
"text": "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"choices": [
{
"id": "choice-3",
"text": "Choice 3",
"id": "choice-4",
"text": "Quis autem vel eum iure",
"nextNode": "node-exit"
},
{
"id": "choice-4",
"text": "Choice 4",
"id": "choice-5",
"text": "At vero eos et accusamus",
"nextNode": "node-exit"
}
]