This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
88 lines (85 loc) · 3.18 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!-- NOTE: During deployment replace localhost with your hosts IP (if you do not use a reverse-proxy). -->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<title>SafeSurf Chatbot</title>
</head>
<style>
body {
background: url("https://banifli.de/images/indexbg.jpg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-position: center;
}
.rw-conversation-container .rw-header{background-color:hsl(250, 69%, 61%);}
.rw-conversation-container .rw-messages-container .rw-message .rw-client{background-color: hsl(250, 69%, 61%);}
.rw-launcher{background-color: hwb(234 34% 12%);}
.rw-conversation-container .rw-reply{background-color: hsl(250, 69%, 61%); border: 1px solid hsl(250, 69%, 61%);}
</style>
<body><!--
<div>
id="rasa-chat-widget"
data-websocket-url="http://bot.banifli.de:5005/"
data-height=700
data-width=550
data-avatar-url="./chatbot.png"
data-avatar-background="#FFFFFF"
data-primary="#2472b7"
data-default-open="true"
data-primary-highlight="#2b85d3">
</div> -->
<script>
setInterval(function(){
if((window.innerHeight + window.pageYOffset) >= document.body.offsetHeight) {
// Do nothing, user is already at the bottom of the page
} else {
window.scroll({
top: document.body.scrollHeight,
left: 0,
behavior: 'smooth'
});
}
}, 2500);
</script>
<script>
!(function () {
let e = document.createElement("script"),
t = document.head || document.getElementsByTagName("head")[0];
(e.src =
"https://cdn.jsdelivr.net/npm/rasa-webchat@1.0.1/lib/index.min.js"),
(e.async = !0),
(e.onload = () => {
window.WebChat.default(
{
customData: { language: "de" },
socketUrl: "http://bot.banifli.de:5005/",
title: 'SafeSurf bot',
subtitle: 'Sage Hallo um zu starten!',
profileAvatar: "https://banifli.de/images/avatar.jpg",
showMessageDate: true,
showFullScreenButton: true,
inputTextFieldHint: "Frage SafeSurf...",
customMessageDelay: (message) => {
let delay = message.length * 20;
if (delay > 2 * 1000) delay = 3 * 1000;
if (delay < 400) delay = 1000;
return delay;
}
},
null
);
}),
t.insertBefore(e, t.firstChild);
})();
</script>
<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>
</body>
</html>