Spaces:
Running
Running
loic.ledreck
commited on
Commit
·
0108e19
1
Parent(s):
9b11351
feat: sequence ok
Browse files- static/index.html +7 -5
- static/next-sequence.html +0 -82
static/index.html
CHANGED
@@ -163,8 +163,10 @@
|
|
163 |
typeMessage(trumpMessageDiv, data.character_response)
|
164 |
console.log("chat ended: ", data.chat_ended);
|
165 |
if (data.chat_ended === true) {
|
166 |
-
endSequence(data.idea, data.
|
167 |
-
console.log("data.
|
|
|
|
|
168 |
console.log("data.idea", data.idea)
|
169 |
}
|
170 |
//addMessageToChat(data.character_response, false);
|
@@ -256,9 +258,9 @@
|
|
256 |
const popup = document.getElementById('sequencePopup');
|
257 |
|
258 |
const message = [
|
259 |
-
idea_accepted ===
|
260 |
-
? "You
|
261 |
-
: "
|
262 |
idea,
|
263 |
];
|
264 |
|
|
|
163 |
typeMessage(trumpMessageDiv, data.character_response)
|
164 |
console.log("chat ended: ", data.chat_ended);
|
165 |
if (data.chat_ended === true) {
|
166 |
+
endSequence(data.idea, data.idea_is_accepted);
|
167 |
+
console.log("data.idea_is_accepted", data.idea_is_accepted)
|
168 |
+
console.log("data.idea_is_accepted true", data.idea_is_accepted === true)
|
169 |
+
console.log("data.idea_is_accepted false", data.idea_is_accepted === false)
|
170 |
console.log("data.idea", data.idea)
|
171 |
}
|
172 |
//addMessageToChat(data.character_response, false);
|
|
|
258 |
const popup = document.getElementById('sequencePopup');
|
259 |
|
260 |
const message = [
|
261 |
+
idea_accepted === true
|
262 |
+
? "You couldn't change Donald's mind, consequently he will:"
|
263 |
+
: "Congratulations, you have been able to change Donald's mind, so he won't:",
|
264 |
idea,
|
265 |
];
|
266 |
|
static/next-sequence.html
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="fr">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8">
|
5 |
-
<title>Next Sequence</title>
|
6 |
-
<style>
|
7 |
-
html, body {
|
8 |
-
margin: 0;
|
9 |
-
padding: 0;
|
10 |
-
height: 100%;
|
11 |
-
font-family: Arial, sans-serif;
|
12 |
-
overflow: hidden;
|
13 |
-
background-color: transparent;
|
14 |
-
}
|
15 |
-
|
16 |
-
body {
|
17 |
-
background: url('/images/next_sequence/background.jpg') no-repeat center center;
|
18 |
-
background-size: cover;
|
19 |
-
position: relative;
|
20 |
-
}
|
21 |
-
|
22 |
-
#text-container {
|
23 |
-
position: absolute;
|
24 |
-
top: 15%;
|
25 |
-
left: 50%;
|
26 |
-
transform: translateX(-50%);
|
27 |
-
width: 70%;
|
28 |
-
padding: 20px;
|
29 |
-
background-color: rgba(0, 0, 0, 0.8);
|
30 |
-
border-radius: 8px;
|
31 |
-
color: #fff;
|
32 |
-
text-align: center;
|
33 |
-
font-size: 1.2rem;
|
34 |
-
z-index: 3;
|
35 |
-
max-height: 70%; /* Prevent overflowing of text */
|
36 |
-
overflow-y: auto; /* Add scroll for long content */
|
37 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
38 |
-
}
|
39 |
-
|
40 |
-
#text-container p {
|
41 |
-
margin: 10px 0;
|
42 |
-
line-height: 1.5;
|
43 |
-
}
|
44 |
-
|
45 |
-
#action-container {
|
46 |
-
position: absolute;
|
47 |
-
bottom: 10%;
|
48 |
-
left: 50%;
|
49 |
-
transform: translateX(-50%);
|
50 |
-
text-align: center;
|
51 |
-
}
|
52 |
-
|
53 |
-
</style>
|
54 |
-
</head>
|
55 |
-
<body>
|
56 |
-
<div id="text-container"></div>
|
57 |
-
|
58 |
-
<script>
|
59 |
-
|
60 |
-
const action = sessionStorage.getItem('idea');
|
61 |
-
const isAccepted = sessionStorage.getItem('idea_accepted');
|
62 |
-
|
63 |
-
console.log("action : ", action)
|
64 |
-
console.log("action : ", isAccepted)
|
65 |
-
const message = [
|
66 |
-
isAccepted === "True"
|
67 |
-
? "You have not been able to deter Donald Trump from doing what he had in mind his idea. Then,"
|
68 |
-
: "You couldn't change Donald's mind, consequently:",
|
69 |
-
action,
|
70 |
-
];
|
71 |
-
|
72 |
-
const textContainer = document.getElementById('text-container');
|
73 |
-
|
74 |
-
// Dynamically add text to the text container
|
75 |
-
message.forEach((line) => {
|
76 |
-
const p = document.createElement('p');
|
77 |
-
p.textContent = line;
|
78 |
-
textContainer.appendChild(p);
|
79 |
-
});
|
80 |
-
</script>
|
81 |
-
</body>
|
82 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|