Add some style and replace texts lorem ipsums.

This commit is contained in:
2020-07-12 13:21:42 +02:00
parent b997194a96
commit 677e3bffc5
3 changed files with 17 additions and 12 deletions

View File

@@ -16,6 +16,7 @@ body {
.choice-div { .choice-div {
border: 1px green solid; border: 1px green solid;
margin-left: auto;
} }
.node-div { .node-div {
@@ -25,4 +26,11 @@ body {
#content { #content {
width: 500px; width: 500px;
margin: auto; 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.setHeader('Content-Type', 'application/json');
response.end(JSON.stringify(nodes)); response.end(JSON.stringify(nodes));
}); });
app.get('/app-bundle.js', (request, response) => {
response.download(`${__dirname}/../../dist/app-bundle.js`);
})
app.listen(3000, () => { app.listen(3000, () => {
console.log('Example app listening on port 3000!'); console.log('Example app listening on port 3000!');

View File

@@ -1,37 +1,37 @@
[ [
{ {
"id": "node-1", "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": [ "choices": [
{ {
"id": "choice-1", "id": "choice-1",
"text": "Choice 1", "text": "Sed ut perspiciatis unde omnis.",
"nextNode": "node-2" "nextNode": "node-2"
}, },
{ {
"id": "choice-2", "id": "choice-2",
"text": "Choice 2", "text": "Nemo enim ipsam voluptatem",
"nextNode": "node-exit" "nextNode": "node-exit"
}, },
{ {
"id": "choice-3", "id": "choice-3",
"text": "Choice 3", "text": "Ut enim ad minima veniam",
"nextNode": "node-exit" "nextNode": "node-exit"
} }
] ]
}, },
{ {
"id": "node-2", "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": [ "choices": [
{ {
"id": "choice-3", "id": "choice-4",
"text": "Choice 3", "text": "Quis autem vel eum iure",
"nextNode": "node-exit" "nextNode": "node-exit"
}, },
{ {
"id": "choice-4", "id": "choice-5",
"text": "Choice 4", "text": "At vero eos et accusamus",
"nextNode": "node-exit" "nextNode": "node-exit"
} }
] ]